Fix: save and restore value of $this->id
This commit is contained in:
parent
0432609502
commit
0c62709a9c
@ -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
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user