mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Add more phpunit tests
This commit is contained in:
@@ -203,11 +203,35 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
return $localobject->id;
|
||||
return $localobject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testCommandeCancel
|
||||
* @depends testCommandeCancel
|
||||
* The depends says test is run only if previous is ok
|
||||
*/
|
||||
public function testCommandeOther($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 testCommandeOther
|
||||
* The depends says test is run only if previous is ok
|
||||
*/
|
||||
public function testCommandeDelete($id)
|
||||
|
||||
Reference in New Issue
Block a user