Add more phpunit tests

This commit is contained in:
Laurent Destailleur
2010-10-13 19:01:22 +00:00
parent 2dadffa9b4
commit 6f26f35529
15 changed files with 744 additions and 71 deletions

View File

@@ -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)