Permalink
Browse files

Fixing DynamicOperations tests

  • Loading branch information...
1 parent 111cc6e commit e97c8000ff9c612f61d0be9bb24d611babb78158 phalcon committed Mar 29, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 unit-tests/ModelsDynamicOperationsTest.php
@@ -116,19 +116,19 @@ protected function _executeTestsRenamed($di, &$tracer)
$personer = Dynamic\Personers::findFirst();
$this->assertTrue($personer->save());
- $this->assertEquals(count($tracer), 1);
+ $this->assertEquals(count($tracer), 3);
$personer->navnes = 'Other Name '.mt_rand(0, 150000);
$this->assertTrue($personer->save());
- $this->assertEquals('UPDATE `personas` SET `nombres` = ? WHERE `cedula` = ?', $tracer[1]);
+ $this->assertEquals('UPDATE `personas` SET `nombres` = ? WHERE `cedula` = ?', $tracer[3]);
$this->assertEquals($personer->getChangedFields(), array('navnes'));
$personer->navnes = 'Other Name '.mt_rand(0, 150000);
$personer->adresse = 'Address '.mt_rand(0, 150000);
$this->assertTrue($personer->save());
- $this->assertEquals('UPDATE `personas` SET `nombres` = ?, `direccion` = ? WHERE `cedula` = ?', $tracer[2]);
+ $this->assertEquals('UPDATE `personas` SET `nombres` = ?, `direccion` = ? WHERE `cedula` = ?', $tracer[4]);
$this->assertEquals($personer->getChangedFields(), array('navnes', 'adresse'));
}

0 comments on commit e97c800

Please sign in to comment.