New: Add phpunit tests

This commit is contained in:
Laurent Destailleur 2010-04-27 00:22:15 +00:00
parent 09ec63c6db
commit 70924ba14e
3 changed files with 5 additions and 15 deletions

View File

@ -40,6 +40,7 @@ if (empty($user->id))
/**
* @backupGlobals disabled
* @backupStaticAttributes enabled
* @covers Commande
* @remarks backupGlobals must be disabled to have db,conf,user and lang not erased.
*/
class CommandeTest extends PHPUnit_Framework_TestCase
@ -106,7 +107,6 @@ class CommandeTest extends PHPUnit_Framework_TestCase
}
/**
* @covers Commande::create
*/
public function testCommandeCreate()
{
@ -127,7 +127,6 @@ class CommandeTest extends PHPUnit_Framework_TestCase
/**
* @depends testCommandeCreate
* @covers Commande::fetch
* The depends says test is run only if previous is ok
*/
public function testCommandeFetch($id)
@ -148,7 +147,6 @@ class CommandeTest extends PHPUnit_Framework_TestCase
/**
* @depends testCommandeFetch
* @covers Commande::update
* The depends says test is run only if previous is ok
*/
/* public function testCommandeUpdate($localobject)
@ -169,7 +167,6 @@ class CommandeTest extends PHPUnit_Framework_TestCase
*/
/**
* @depends testCommandeFetch
* @covers Commande::valid
* The depends says test is run only if previous is ok
*/
public function testCommandeValid($localobject)
@ -189,7 +186,6 @@ class CommandeTest extends PHPUnit_Framework_TestCase
/**
* @depends testCommandeValid
* @covers Commande::delete
* The depends says test is run only if previous is ok
*/
public function testCommandeDelete($id)

View File

@ -46,6 +46,9 @@ if (empty($user->id))
* @covers Conf
* @covers Interfaces
* @covers CommonObject
* @covers Societe
* @covers Contact
* @covers Facture
* @remarks backupGlobals must be disabled to have db,conf,user and lang not erased.
*/
class FactureTest extends PHPUnit_Framework_TestCase
@ -111,7 +114,6 @@ class FactureTest extends PHPUnit_Framework_TestCase
}
/**
* @covers Facture::create
*/
public function testFactureCreate()
{
@ -132,7 +134,6 @@ class FactureTest extends PHPUnit_Framework_TestCase
/**
* @depends testFactureCreate
* @covers Facture::fetch
* The depends says test is run only if previous is ok
*/
public function testFactureFetch($id)
@ -153,7 +154,6 @@ class FactureTest extends PHPUnit_Framework_TestCase
/**
* @depends testFactureFetch
* @covers Facture::update
* The depends says test is run only if previous is ok
*/
public function testFactureUpdate($localobject)
@ -174,7 +174,6 @@ class FactureTest extends PHPUnit_Framework_TestCase
/**
* @depends testFactureUpdate
* @covers Facture::set_valid
* The depends says test is run only if previous is ok
*/
public function testFactureValid($localobject)
@ -194,7 +193,6 @@ class FactureTest extends PHPUnit_Framework_TestCase
/**
* @depends testFactureValid
* @covers Facture::delete
* The depends says test is run only if previous is ok
*/
public function testFactureDelete($id)

View File

@ -40,6 +40,7 @@ if (empty($user->id))
/**
* @backupGlobals disabled
* @backupStaticAttributes enabled
* @covers Propal
* @remarks backupGlobals must be disabled to have db,conf,user and lang not erased.
*/
class PropalTest extends PHPUnit_Framework_TestCase
@ -106,7 +107,6 @@ class PropalTest extends PHPUnit_Framework_TestCase
}
/**
* @covers Propal::create
*/
public function testPropalCreate()
{
@ -127,7 +127,6 @@ class PropalTest extends PHPUnit_Framework_TestCase
/**
* @depends testPropalCreate
* @covers Propal::fetch
* The depends says test is run only if previous is ok
*/
public function testPropalFetch($id)
@ -148,7 +147,6 @@ class PropalTest extends PHPUnit_Framework_TestCase
/**
* @depends testPropalFetch
* @covers Propal::update
* The depends says test is run only if previous is ok
*/
/* public function testPropalUpdate($localobject)
@ -169,7 +167,6 @@ class PropalTest extends PHPUnit_Framework_TestCase
*/
/**
* @depends testPropalFetch
* @covers Propal::valid
* The depends says test is run only if previous is ok
*/
public function testPropalValid($localobject)
@ -189,7 +186,6 @@ class PropalTest extends PHPUnit_Framework_TestCase
/**
* @depends testPropalValid
* @covers Propal::delete
* The depends says test is run only if previous is ok
*/
public function testPropalDelete($id)