From 75587b3a1581cf19e6513cba2a150eb94d30da55 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 28 Oct 2012 13:18:15 +0100 Subject: [PATCH] Fix: wrong delete invoice test --- test/phpunit/FactureTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 0470b70e57a..7fd9e03b082 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -249,13 +249,13 @@ class FactureTest extends PHPUnit_Framework_TestCase /** * testFactureDelete * - * @param int $id Id of invoice + * @param Object $localobject Invoice * @return int * * @depends testFactureOther * The depends says test is run only if previous is ok */ - public function testFactureDelete($id) + public function testFactureDelete($localobject) { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -264,11 +264,11 @@ class FactureTest extends PHPUnit_Framework_TestCase $db=$this->savdb; $localobject=new Facture($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($id); + $result=$localobject->fetch($localobject->id); + $result=$localobject->delete($localobject->id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertEquals($result, 1); return $result; }