Fix: regression

This commit is contained in:
Regis Houssin 2012-10-28 13:37:09 +01:00
parent 6b06b37116
commit d6a3b76270

View File

@ -249,13 +249,13 @@ class FactureTest extends PHPUnit_Framework_TestCase
/** /**
* testFactureDelete * testFactureDelete
* *
* @param Object $localobject Invoice * @param int $id Id of invoice
* @return int * @return int
* *
* @depends testFactureOther * @depends testFactureOther
* The depends says test is run only if previous is ok * The depends says test is run only if previous is ok
*/ */
public function testFactureDelete($localobject) public function testFactureDelete($id)
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
$conf=$this->savconf; $conf=$this->savconf;
@ -264,11 +264,11 @@ class FactureTest extends PHPUnit_Framework_TestCase
$db=$this->savdb; $db=$this->savdb;
$localobject=new Facture($this->savdb); $localobject=new Facture($this->savdb);
$result=$localobject->fetch($localobject->id); $result=$localobject->fetch($id);
$result=$localobject->delete($localobject->id); $result=$localobject->delete($id);
print __METHOD__." id=".$localobject->id." result=".$result."\n"; print __METHOD__." id=".$id." result=".$result."\n";
$this->assertEquals($result, 1); $this->assertLessThan(0, $result);
return $result; return $result;
} }