forked from Wavyzz/dolibarr
Add more phpunit tests
This commit is contained in:
@@ -189,11 +189,35 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
|
||||
$this->assertLessThan($result, 0);
|
||||
return $localobject->id;
|
||||
return $localobject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testContratValid
|
||||
/**
|
||||
* @depends testContratValid
|
||||
* The depends says test is run only if previous is ok
|
||||
*/
|
||||
public function testContratOther($localobject)
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
$conf=$this->savconf;
|
||||
$user=$this->savuser;
|
||||
$langs=$this->savlangs;
|
||||
$db=$this->savdb;
|
||||
|
||||
/*$result=$localobject->setstatus(0);
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
*/
|
||||
|
||||
$localobject->info($localobject->id);
|
||||
print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
|
||||
$this->assertNotEquals($localobject->date_creation, '');
|
||||
|
||||
return $localobject->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testContratOther
|
||||
* The depends says test is run only if previous is ok
|
||||
*/
|
||||
public function testContratDelete($id)
|
||||
|
||||
Reference in New Issue
Block a user