Doxygen
This commit is contained in:
parent
61e226fe43
commit
9b3bab5ff9
@ -621,7 +621,7 @@ function dol_syslog($message, $level=LOG_INFO)
|
|||||||
// database or config file because we must be able to log data before database or config file read.
|
// database or config file because we must be able to log data before database or config file read.
|
||||||
$oldinclude=get_include_path();
|
$oldinclude=get_include_path();
|
||||||
set_include_path('/usr/share/php/');
|
set_include_path('/usr/share/php/');
|
||||||
require_once('FirePHPCore/FirePHP.class.php');
|
include_once('FirePHPCore/FirePHP.class.php');
|
||||||
set_include_path($oldinclude);
|
set_include_path($oldinclude);
|
||||||
ob_start();
|
ob_start();
|
||||||
$firephp = FirePHP::getInstance(true);
|
$firephp = FirePHP::getInstance(true);
|
||||||
|
|||||||
@ -114,6 +114,9 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testChargeSocialesCreate
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testChargeSocialesCreate()
|
public function testChargeSocialesCreate()
|
||||||
{
|
{
|
||||||
@ -133,6 +136,11 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testChargeSocialesFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of social contribution
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testChargeSocialesCreate
|
* @depends testChargeSocialesCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -153,27 +161,11 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testChargeSocialesFetch
|
* testChargeSocialesValid
|
||||||
* The depends says test is run only if previous is ok
|
*
|
||||||
*/
|
* @param Object $localobject Social contribution
|
||||||
/* public function testChargeSocialesUpdate($localobject)
|
* @return void
|
||||||
{
|
*
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject->note='New note after update';
|
|
||||||
$result=$localobject->update($user);
|
|
||||||
|
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
return $localobject;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @depends testChargeSocialesFetch
|
* @depends testChargeSocialesFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -193,6 +185,11 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testChargeSocialesOther
|
||||||
|
*
|
||||||
|
* @param Object $localobject Social contribution
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testChargeSocialesValid
|
* @depends testChargeSocialesValid
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -212,10 +209,15 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
|||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||||
$this->assertLessThanOrEqual($result, 0);
|
$this->assertLessThanOrEqual($result, 0);
|
||||||
|
|
||||||
return $localobject->id;
|
return $localobject->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testChargeSocialesDelete
|
||||||
|
*
|
||||||
|
* @param int $id Social contribution
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testChargeSocialesOther
|
* @depends testChargeSocialesOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -236,26 +238,5 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/*public function testVerifyNumRef()
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject=new ChargeSociales($this->savdb);
|
|
||||||
$result=$localobject->ref='refthatdoesnotexists';
|
|
||||||
$result=$localobject->VerifyNumRef();
|
|
||||||
|
|
||||||
print __METHOD__." result=".$result."\n";
|
|
||||||
$this->assertEquals($result, 0);
|
|
||||||
return $result;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -116,6 +116,9 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeFournisseurCreate
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCommandeFournisseurCreate()
|
public function testCommandeFournisseurCreate()
|
||||||
{
|
{
|
||||||
@ -135,6 +138,11 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeFournisseurFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of supplier order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeFournisseurCreate
|
* @depends testCommandeFournisseurCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -153,28 +161,13 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
return $localobject;
|
return $localobject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @depends testCommandeFournisseurFetch
|
|
||||||
* The depends says test is run only if previous is ok
|
|
||||||
*/
|
|
||||||
/* public function testCommandeFournisseurUpdate($localobject)
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject->note='New note after update';
|
|
||||||
$result=$localobject->update($user);
|
|
||||||
|
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
return $localobject->id;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeFournisseurValid
|
||||||
|
*
|
||||||
|
* @param Object $localobject Supplier order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeFournisseurFetch
|
* @depends testCommandeFournisseurFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -194,6 +187,11 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeFournisseurCancel
|
||||||
|
*
|
||||||
|
* @param Object $localobject Supplier order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeFournisseurValid
|
* @depends testCommandeFournisseurValid
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -213,6 +211,11 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeFournisseurOther
|
||||||
|
*
|
||||||
|
* @param Object $localobject Supplier order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeFournisseurCancel
|
* @depends testCommandeFournisseurCancel
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -238,6 +241,11 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeFournisseurDelete
|
||||||
|
*
|
||||||
|
* @param int $id Id of order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeFournisseurOther
|
* @depends testCommandeFournisseurOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -259,7 +267,9 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testVerifyNumRef
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testVerifyNumRef()
|
public function testVerifyNumRef()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,6 +115,9 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeCreate
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCommandeCreate()
|
public function testCommandeCreate()
|
||||||
{
|
{
|
||||||
@ -134,6 +137,9 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeFetch
|
||||||
|
* @param int $id Id order
|
||||||
|
*
|
||||||
* @depends testCommandeCreate
|
* @depends testCommandeCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -154,26 +160,11 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testCommandeFetch
|
* testCommandeValid
|
||||||
* The depends says test is run only if previous is ok
|
*
|
||||||
*/
|
* @param Object $localobject Order
|
||||||
/* public function testCommandeUpdate($localobject)
|
* @return void
|
||||||
{
|
*
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject->note='New note after update';
|
|
||||||
$result=$localobject->update($user);
|
|
||||||
|
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
return $localobject->id;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @depends testCommandeFetch
|
* @depends testCommandeFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -193,6 +184,11 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeCancel
|
||||||
|
*
|
||||||
|
* @param Object $localobject Order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeValid
|
* @depends testCommandeValid
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -212,6 +208,11 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeOther
|
||||||
|
*
|
||||||
|
* @param Object $localobject Order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeCancel
|
* @depends testCommandeCancel
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -236,6 +237,11 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCommandeDelete
|
||||||
|
*
|
||||||
|
* @param int $id Id of order
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCommandeOther
|
* @depends testCommandeOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -257,7 +263,9 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testVerifyNumRef
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testVerifyNumRef()
|
public function testVerifyNumRef()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,6 +115,9 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCompanyBankAccountCreate
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function testCompanyBankAccountCreate()
|
public function testCompanyBankAccountCreate()
|
||||||
{
|
{
|
||||||
@ -134,6 +137,11 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCompanyBankAccountFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of bank account
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testCompanyBankAccountCreate
|
* @depends testCompanyBankAccountCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -154,6 +162,10 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCompanyBankAccountUpdate
|
||||||
|
*
|
||||||
|
* @param Object $localobject Bank account object
|
||||||
|
*
|
||||||
* @depends testCompanyBankAccountFetch
|
* @depends testCompanyBankAccountFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -174,6 +186,11 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testCompanyBankAccountOther
|
||||||
|
*
|
||||||
|
* @param Object $localobject Bank account
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
* @depends testCompanyBankAccountFetch
|
* @depends testCompanyBankAccountFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -193,26 +210,5 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
return $localobject->id;
|
return $localobject->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @depends testCompanyBankAccountOther
|
|
||||||
* The depends says test is run only if previous is ok
|
|
||||||
*/
|
|
||||||
/* public function testCompanyBankAccountDelete($id)
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject=new CompanyBankAccount($this->savdb);
|
|
||||||
$result=$localobject->fetch($id);
|
|
||||||
$result=$localobject->delete($user);
|
|
||||||
|
|
||||||
print __METHOD__." id=".$id." result=".$result."\n";
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -116,6 +116,9 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testContactCreate
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function testContactCreate()
|
public function testContactCreate()
|
||||||
{
|
{
|
||||||
@ -136,6 +139,9 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testContactFetch
|
||||||
|
*
|
||||||
|
* @param int Id of contact
|
||||||
* @depends testContactCreate
|
* @depends testContactCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -114,6 +114,9 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testContratCreate
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function testContratCreate()
|
public function testContratCreate()
|
||||||
{
|
{
|
||||||
@ -134,6 +137,11 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testContratFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of contract
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
* @depends testContratCreate
|
* @depends testContratCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -155,27 +163,11 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testContratFetch
|
* testContratValid
|
||||||
* The depends says test is run only if previous is ok
|
*
|
||||||
*/
|
* @param int $id Id of contract
|
||||||
/* public function testContratUpdate($localobject)
|
* @return int
|
||||||
{
|
*
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject->note='New note after update';
|
|
||||||
$result=$localobject->update($user);
|
|
||||||
|
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
return $localobject;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @depends testContratFetch
|
* @depends testContratFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -195,6 +187,11 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testContratValid
|
||||||
|
*
|
||||||
|
* @param Object $localobject Object contract
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
* @depends testContratValid
|
* @depends testContratValid
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -219,6 +216,11 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testContratDelete
|
||||||
|
*
|
||||||
|
* @param int $id Id of contract
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
* @depends testContratOther
|
* @depends testContratOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -241,7 +243,9 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testVerifyNumRef
|
||||||
*
|
*
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function testVerifyNumRef()
|
public function testVerifyNumRef()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,6 +115,9 @@ class DiscountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testDiscountCreate
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function testDiscountCreate()
|
public function testDiscountCreate()
|
||||||
{
|
{
|
||||||
@ -134,6 +137,11 @@ class DiscountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testDiscountFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of discount
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
* @depends testDiscountCreate
|
* @depends testDiscountCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -154,6 +162,10 @@ class DiscountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testDiscountDelete
|
||||||
|
*
|
||||||
|
* @param int $id Id of discount
|
||||||
|
*
|
||||||
* @depends testDiscountFetch
|
* @depends testDiscountFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -89,8 +89,11 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Init phpunit tests
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$conf=$this->savconf;
|
$conf=$this->savconf;
|
||||||
@ -100,9 +103,13 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* End phpunit tests
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
@ -110,6 +117,7 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testFactureRoundingCreate1
|
||||||
* Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
* Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
@ -148,10 +156,12 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testFactureRoundingCreate2
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
* @depends testFactureRoundingCreate1
|
* @depends testFactureRoundingCreate1
|
||||||
* Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
* Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function testFactureRoundingCreate2()
|
public function testFactureRoundingCreate2()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -290,8 +290,8 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$result=dol_mktime(2,0,0,1,1,1970,0); // 1970-01-01 02:00:00 in local area Europe/Paris -> 3600 GMT
|
$result=dol_mktime(2,0,0,1,1,1970,0); // 1970-01-01 02:00:00 in local area Europe/Paris -> 3600 GMT
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
$tz=getServerTimeZoneInt('1970-01-01 02:00:00'); // +1 in Europe/Paris at this time (we are winter)
|
$tz=getServerTimeZoneInt('1970-01-01 02:00:00'); // +1 in Europe/Paris at this time (this time is winter)
|
||||||
$this->assertEquals(7200-($tz*3600),$result); // Should be 7200 if we are at greenwich
|
$this->assertEquals(7200-($tz*3600),$result); // Should be 7200 if we are at greenwich winter
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -119,7 +119,7 @@ class PricesTest extends PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Test function calcul_price_total
|
* Test function calcul_price_total
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
* @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
||||||
*/
|
*/
|
||||||
public function testCalculPriceTotal()
|
public function testCalculPriceTotal()
|
||||||
@ -157,7 +157,7 @@ class PricesTest extends PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Test function addline and update_price
|
* Test function addline and update_price
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
* @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage
|
||||||
*/
|
*/
|
||||||
public function testUpdatePrice()
|
public function testUpdatePrice()
|
||||||
@ -199,7 +199,6 @@ class PricesTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals(2.48,$newlocalobject->total_ht);
|
$this->assertEquals(2.48,$newlocalobject->total_ht);
|
||||||
//$this->assertEquals(0.25,$newlocalobject->total_tva);
|
//$this->assertEquals(0.25,$newlocalobject->total_tva);
|
||||||
//$this->assertEquals(2.73,$newlocalobject->total_ttc);
|
//$this->assertEquals(2.73,$newlocalobject->total_ttc);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -141,6 +141,10 @@ class ProductTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testProductFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id product
|
||||||
|
*
|
||||||
* @depends testProductCreate
|
* @depends testProductCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -161,6 +165,11 @@ class ProductTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testProductUpdate
|
||||||
|
*
|
||||||
|
* @param Product $localobject Product
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testProductFetch
|
* @depends testProductFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -181,6 +190,11 @@ class ProductTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testProductOther
|
||||||
|
*
|
||||||
|
* @param Product $localobject Product
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testProductUpdate
|
* @depends testProductUpdate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -197,6 +211,11 @@ class ProductTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testProductDelete
|
||||||
|
*
|
||||||
|
* @param int $id Id of product
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testProductOther
|
* @depends testProductOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -219,27 +238,9 @@ class ProductTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* testProductStatic
|
||||||
*/
|
*
|
||||||
/*public function testVerifyNumRef()
|
* @return void
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject=new Adherent($this->savdb);
|
|
||||||
$result=$localobject->ref='refthatdoesnotexists';
|
|
||||||
$result=$localobject->VerifyNumRef();
|
|
||||||
|
|
||||||
print __METHOD__." result=".$result."\n";
|
|
||||||
$this->assertEquals($result, 0);
|
|
||||||
return $result;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
*/
|
||||||
public function testProductStatic()
|
public function testProductStatic()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,6 +115,9 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testPropalCreate
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testPropalCreate()
|
public function testPropalCreate()
|
||||||
{
|
{
|
||||||
@ -134,6 +137,11 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testPropalFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of object
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testPropalCreate
|
* @depends testPropalCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -154,26 +162,11 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testPropalFetch
|
* testPropalValid
|
||||||
* The depends says test is run only if previous is ok
|
*
|
||||||
*/
|
* @param Proposal $localobject Proposal
|
||||||
/* public function testPropalUpdate($localobject)
|
* @return Proposal
|
||||||
{
|
*
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject->note='New note after update';
|
|
||||||
$result=$localobject->update($user);
|
|
||||||
|
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
return $localobject->id;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @depends testPropalFetch
|
* @depends testPropalFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -193,6 +186,11 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testPropalOther
|
||||||
|
*
|
||||||
|
* @param Proposal $localobject Proposal
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
* @depends testPropalValid
|
* @depends testPropalValid
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -217,6 +215,11 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testPropalDelete
|
||||||
|
*
|
||||||
|
* @param int $id Id of proposal
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
* @depends testPropalOther
|
* @depends testPropalOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -238,7 +241,9 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testVerifyNumRef
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testVerifyNumRef()
|
public function testVerifyNumRef()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,6 +115,9 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserGroupCreate
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testUserGroupCreate()
|
public function testUserGroupCreate()
|
||||||
{
|
{
|
||||||
@ -134,6 +137,10 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserGroupFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of group
|
||||||
|
* @return void
|
||||||
* @depends testUserGroupCreate
|
* @depends testUserGroupCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -154,6 +161,10 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserGroupUpdate
|
||||||
|
*
|
||||||
|
* @param Object $localobject Group
|
||||||
|
* @return void
|
||||||
* @depends testUserGroupFetch
|
* @depends testUserGroupFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -174,6 +185,10 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserGroupAddRight
|
||||||
|
*
|
||||||
|
* @param Object $localobject Object to show
|
||||||
|
* @return void
|
||||||
* @depends testUserGroupUpdate
|
* @depends testUserGroupUpdate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -193,6 +208,10 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserGroupDelRight
|
||||||
|
*
|
||||||
|
* @param Object $localobject Object
|
||||||
|
* @return void
|
||||||
* @depends testUserGroupAddRight
|
* @depends testUserGroupAddRight
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -212,6 +231,10 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserGroupOther
|
||||||
|
*
|
||||||
|
* @param Object $localobject Object
|
||||||
|
* @return void
|
||||||
* @depends testUserGroupDelRight
|
* @depends testUserGroupDelRight
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -236,6 +259,10 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserGroupDelete
|
||||||
|
*
|
||||||
|
* @param int $id Id of object
|
||||||
|
* @return void
|
||||||
* @depends testUserGroupOther
|
* @depends testUserGroupOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -256,24 +283,5 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/*public function testVerifyNumRef()
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject=new UserGroup($this->savdb);
|
|
||||||
$result=$localobject->ref='refthatdoesnotexists';
|
|
||||||
$result=$localobject->VerifyNumRef();
|
|
||||||
|
|
||||||
print __METHOD__." result=".$result."\n";
|
|
||||||
$this->assertEquals($result, 0);
|
|
||||||
return $result;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -115,6 +115,9 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserCreate
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testUserCreate()
|
public function testUserCreate()
|
||||||
{
|
{
|
||||||
@ -134,6 +137,10 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserFetch
|
||||||
|
*
|
||||||
|
* @param int $id Id of user
|
||||||
|
* @return void
|
||||||
* @depends testUserCreate
|
* @depends testUserCreate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -154,6 +161,10 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserUpdate
|
||||||
|
*
|
||||||
|
* @param Object $localobject User
|
||||||
|
* @return void
|
||||||
* @depends testUserFetch
|
* @depends testUserFetch
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -174,6 +185,10 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserDisable
|
||||||
|
*
|
||||||
|
* @param Object $localobject User
|
||||||
|
* @return void
|
||||||
* @depends testUserUpdate
|
* @depends testUserUpdate
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -193,6 +208,10 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserOther
|
||||||
|
*
|
||||||
|
* @param Object $localobject User
|
||||||
|
* @return void
|
||||||
* @depends testUserDisable
|
* @depends testUserDisable
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -217,6 +236,10 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* testUserDelete
|
||||||
|
*
|
||||||
|
* @param Object $localobject User
|
||||||
|
* @return void
|
||||||
* @depends testUserOther
|
* @depends testUserOther
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
*/
|
*/
|
||||||
@ -237,25 +260,5 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/*public function testVerifyNumRef()
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
$localobject=new User($this->savdb);
|
|
||||||
$result=$localobject->ref='refthatdoesnotexists';
|
|
||||||
$result=$localobject->VerifyNumRef();
|
|
||||||
|
|
||||||
print __METHOD__." result=".$result."\n";
|
|
||||||
$this->assertEquals($result, 0);
|
|
||||||
return $result;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user