Skip to content
Snippets Groups Projects
Commit 0c62709a authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: save and restore value of $this->id

parent 04326095
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,8 @@ class CategorieTest extends PHPUnit_Framework_TestCase ...@@ -135,7 +135,8 @@ class CategorieTest extends PHPUnit_Framework_TestCase
print __METHOD__." result=".$result."\n"; print __METHOD__." result=".$result."\n";
$this->assertGreaterThan(0, $result); $this->assertGreaterThan(0, $result);
// Unset $this->id for good check test // Save and unset $this->id for good check test
$saveid = $localobject->id;
unset($localobject->id); unset($localobject->id);
// We check if exist // We check if exist
...@@ -148,6 +149,9 @@ class CategorieTest extends PHPUnit_Framework_TestCase ...@@ -148,6 +149,9 @@ class CategorieTest extends PHPUnit_Framework_TestCase
print __METHOD__." result=".$result."\n"; print __METHOD__." result=".$result."\n";
$this->assertEquals(-4, $result); $this->assertEquals(-4, $result);
// Restore $this->id with save value
$localobject->id = $saveid;
return $result; return $result;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment