Qual: Add method addline

This commit is contained in:
Laurent Destailleur 2013-07-10 15:58:07 +02:00
parent 57dbf87d0a
commit 8d1b86db49

View File

@ -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
*/