Skip to content

Commit

Permalink
Fix: save and restore value of $this->id
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Mar 21, 2012
1 parent 0432609 commit 0c62709
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/phpunit/CategorieTest.php
Expand Up @@ -135,7 +135,8 @@ public function testCategorieCreate()
print __METHOD__." result=".$result."\n";
$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);

// We check if exist
Expand All @@ -147,6 +148,9 @@ public function testCategorieCreate()
$result=$localobject->create($user);
print __METHOD__." result=".$result."\n";
$this->assertEquals(-4, $result);

// Restore $this->id with save value
$localobject->id = $saveid;


return $result;
Expand Down

0 comments on commit 0c62709

Please sign in to comment.