From 8d1b86db491a261526e74abb49d3416783158aea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Jul 2013 15:58:07 +0200 Subject: [PATCH] Qual: Add method addline --- test/phpunit/PropalTest.php | 44 ++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index 86b90fda99d..df083e15b94 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -116,7 +116,7 @@ class PropalTest extends PHPUnit_Framework_TestCase /** * testPropalCreate - * + * * @return void */ public function testPropalCreate() @@ -138,10 +138,10 @@ class PropalTest extends PHPUnit_Framework_TestCase /** * testPropalFetch - * + * * @param int $id Id of object * @return void - * + * * @depends testPropalCreate * The depends says test is run only if previous is ok */ @@ -161,13 +161,37 @@ class PropalTest extends PHPUnit_Framework_TestCase return $localobject; } + /** + * testPropalAddLine + * + * @param int $localobject Proposal + * @return void + * + * @depends testPropalFetch + * The depends says test is run only if previous is ok + */ + public function testPropalAddLine($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->addline($localobject->id, 'Added line', 10, 2, 19.6); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + return $localobject; + } + /** * testPropalValid - * + * * @param Proposal $localobject Proposal * @return Proposal - * - * @depends testPropalFetch + * + * @depends testPropalAddLine * The depends says test is run only if previous is ok */ public function testPropalValid($localobject) @@ -187,10 +211,10 @@ class PropalTest extends PHPUnit_Framework_TestCase /** * testPropalOther - * + * * @param Proposal $localobject Proposal * @return int - * + * * @depends testPropalValid * The depends says test is run only if previous is ok */ @@ -216,10 +240,10 @@ class PropalTest extends PHPUnit_Framework_TestCase /** * testPropalDelete - * + * * @param int $id Id of proposal * @return void - * + * * @depends testPropalOther * The depends says test is run only if previous is ok */