mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
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";
|
||||
$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
|
||||
|
|
@ -147,6 +148,9 @@ class CategorieTest extends PHPUnit_Framework_TestCase
|
|||
$result=$localobject->create($user);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals(-4, $result);
|
||||
|
||||
// Restore $this->id with save value
|
||||
$localobject->id = $saveid;
|
||||
|
||||
|
||||
return $result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user