forked from Wavyzz/dolibarr
Mutualize code
This commit is contained in:
@@ -50,87 +50,6 @@ $langs->load("main");
|
|||||||
*/
|
*/
|
||||||
class AssetModelTest extends CommonClassTest
|
class AssetModelTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return AssetModelTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$this->savconf = $conf;
|
|
||||||
$this->savuser = $user;
|
|
||||||
$this->savlangs = $langs;
|
|
||||||
$this->savdb = $db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Global test setup
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test setup
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$conf = $this->savconf;
|
|
||||||
$user = $this->savuser;
|
|
||||||
$langs = $this->savlangs;
|
|
||||||
$db = $this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test teardown
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Global test teardown
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testAssetModelCreate
|
* testAssetModelCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -49,86 +49,6 @@ $langs->load("main");
|
|||||||
*/
|
*/
|
||||||
class BOMTest extends CommonClassTest
|
class BOMTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return BOMTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testBOMCreate
|
* testBOMCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -51,86 +51,6 @@ $langs->load("main");
|
|||||||
*/
|
*/
|
||||||
class BankAccountTest extends CommonClassTest
|
class BankAccountTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return BankAccountTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testBankAccountCreate
|
* testBankAccountCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -50,87 +50,6 @@ $langs->load("main");
|
|||||||
*/
|
*/
|
||||||
class BarcodeTest extends CommonClassTest
|
class BarcodeTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return BarcodeTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testBarcodeZATCAEncode
|
* testBarcodeZATCAEncode
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -50,85 +50,6 @@ $langs->load("main");
|
|||||||
*/
|
*/
|
||||||
class BonPrelevementTest extends CommonClassTest
|
class BonPrelevementTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return BankAccountTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testBonPrevelementCreate
|
* testBonPrevelementCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -78,34 +78,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class BuildDocTest extends CommonClassTest
|
class BuildDocTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return BuildDocTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setUpBeforeClass
|
* setUpBeforeClass
|
||||||
*
|
*
|
||||||
@@ -151,43 +123,6 @@ class BuildDocTest extends CommonClassTest
|
|||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFactureBuild
|
* testFactureBuild
|
||||||
|
|||||||
@@ -49,88 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS = 1;
|
|||||||
*/
|
*/
|
||||||
class CMailFileTest extends CommonClassTest
|
class CMailFileTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CMailFile
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$this->savconf = $conf;
|
|
||||||
$this->savuser = $user;
|
|
||||||
$this->savlangs = $langs;
|
|
||||||
$this->savdb = $db;
|
|
||||||
|
|
||||||
print __METHOD__ . " db->type=" . $db->type . " user->id=" . $user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__ . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__ . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf, $user, $langs, $db;
|
|
||||||
$conf = $this->savconf;
|
|
||||||
$user = $this->savuser;
|
|
||||||
$langs = $this->savlangs;
|
|
||||||
$db = $this->savdb;
|
|
||||||
|
|
||||||
$conf->global->MAIN_DISABLE_ALL_MAILS = 1; // If I comment/remove this lien, unit test still works alone but failed when ran from AllTest. Don't know why.
|
|
||||||
|
|
||||||
print __METHOD__ . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__ . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testCMailFileText
|
* testCMailFileText
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -49,85 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CategorieTest extends CommonClassTest
|
class CategorieTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CategorieTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testCategorieCreate
|
* testCategorieCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,85 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class ChargeSocialesTest extends CommonClassTest
|
class ChargeSocialesTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return ChargeSocialesTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testChargeSocialesCreate
|
* testChargeSocialesCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -80,86 +80,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CodingPhpTest extends CommonClassTest
|
class CodingPhpTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return SecurityTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testPHP
|
* testPHP
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -80,86 +80,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CodingSqlTest extends CommonClassTest
|
class CodingSqlTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return SecurityTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testEscape
|
* testEscape
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -50,86 +50,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CommandeFournisseurTest extends CommonClassTest
|
class CommandeFournisseurTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CommandeFournisseurTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
//print $db->getVersion()."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testCommandeFournisseurCreate
|
* testCommandeFournisseurCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,34 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CommandeTest extends CommonClassTest
|
class CommandeTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CommandeTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setUpBeforeClass
|
* setUpBeforeClass
|
||||||
*
|
*
|
||||||
@@ -94,45 +66,6 @@ class CommandeTest extends CommonClassTest
|
|||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
//print $db->getVersion()."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testCommandeCreate
|
* testCommandeCreate
|
||||||
|
|||||||
@@ -48,88 +48,8 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CommonInvoiceTest extends CommonClassTest
|
class CommonInvoiceTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* testCalculateDateLimReglement
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CommonObjectTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* testFetchUser
|
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -49,86 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CommonObjectTest extends CommonClassTest
|
class CommonObjectTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CommonObjectTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFetchUser
|
* testFetchUser
|
||||||
*
|
*
|
||||||
@@ -153,11 +73,11 @@ class CommonObjectTest extends CommonClassTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFetchProjet
|
* testFetchProject
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testFetchProjet()
|
public function testFetchProject()
|
||||||
{
|
{
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$conf=$this->savconf;
|
$conf=$this->savconf;
|
||||||
|
|||||||
@@ -48,86 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CompanyBankAccountTest extends CommonClassTest
|
class CompanyBankAccountTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CompanyBankAccountTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
//print $db->getVersion()."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testCompanyBankAccountCreate
|
* testCompanyBankAccountCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,85 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class CompanyLibTest extends CommonClassTest
|
class CompanyLibTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return AdminLibTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testNameCurrency
|
* testNameCurrency
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -56,86 +56,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class ContactTest extends CommonClassTest
|
class ContactTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return ContactTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testContactCreate
|
* testContactCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,85 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class ContratTest extends CommonClassTest
|
class ContratTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return ContratTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testContratCreate
|
* testContratCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -73,86 +73,6 @@ if (! defined("NOLOGIN")) {
|
|||||||
*/
|
*/
|
||||||
class CoreTest extends CommonClassTest
|
class CoreTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CoreTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
//print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
//$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
//$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testDetectURLROOT
|
* testDetectURLROOT
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -52,88 +52,6 @@ print "\n";
|
|||||||
*/
|
*/
|
||||||
class DateLibTest extends CommonClassTest
|
class DateLibTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return DateLibTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
$langs->load("admin");
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testNumBetweenDay
|
* testNumBetweenDay
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,34 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class DateLibTzFranceTest extends CommonClassTest
|
class DateLibTzFranceTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return DateLibTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setUpBeforeClass
|
* setUpBeforeClass
|
||||||
*
|
*
|
||||||
@@ -97,43 +69,6 @@ class DateLibTzFranceTest extends CommonClassTest
|
|||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testDolPrintDateTzFrance
|
* testDolPrintDateTzFrance
|
||||||
|
|||||||
@@ -48,86 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class DiscountTest extends CommonClassTest
|
class DiscountTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return DiscountTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
//print $db->getVersion()."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testDiscountCreate
|
* testDiscountCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,86 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class DoliDBTest extends CommonClassTest
|
class DoliDBTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return DiscountTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
//print $db->getVersion()."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testDDLUpdateField
|
* testDDLUpdateField
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -50,86 +50,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class EmailCollectorTest extends CommonClassTest
|
class EmailCollectorTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return ExpenseReportTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
//print $db->getVersion()."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testEmailCollectorCreate
|
* testEmailCollectorCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,92 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class EntrepotTest extends CommonClassTest
|
class EntrepotTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return EntrepotTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
|
|
||||||
if (!isModEnabled('stock')) {
|
|
||||||
print __METHOD__." Module Stock must be enabled.\n";
|
|
||||||
die(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testEntrepotCreate
|
* testEntrepotCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -47,87 +47,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class EvalMathTest extends CommonClassTest
|
class EvalMathTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return InventoryTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test postfix evaluation function
|
* test postfix evaluation function
|
||||||
* @return void
|
* @return void
|
||||||
|
|||||||
@@ -49,86 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class ExpenseReportTest extends CommonClassTest
|
class ExpenseReportTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return ExpenseReportTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
//print $db->getVersion()."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testExpenseReportCreate
|
* testExpenseReportCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -73,85 +73,6 @@ if (! defined("NOLOGIN")) {
|
|||||||
*/
|
*/
|
||||||
class ExportTest extends CommonClassTest
|
class ExportTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return ExportTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
//$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
//$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Other tests
|
* Other tests
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -49,85 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class FactureFournisseurTest extends CommonClassTest
|
class FactureFournisseurTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FactureFournisseurTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFactureFournisseurCreate
|
* testFactureFournisseurCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -49,86 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class FactureRecTest extends CommonClassTest
|
class FactureRecTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FactureTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFactureRecCreate
|
* testFactureRecCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -49,34 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class FactureTest extends CommonClassTest
|
class FactureTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FactureTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setUpBeforeClass
|
* setUpBeforeClass
|
||||||
*
|
*
|
||||||
@@ -100,44 +72,6 @@ class FactureTest extends CommonClassTest
|
|||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFactureCreate
|
* testFactureCreate
|
||||||
|
|||||||
@@ -47,88 +47,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class FactureTestRounding extends CommonClassTest
|
class FactureTestRounding extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FactureTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFactureRoundingCreate1
|
* 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
|
||||||
|
|||||||
@@ -48,85 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class FichinterTest extends CommonClassTest
|
class FichinterTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return ContratTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFichinterCreate
|
* testFichinterCreate
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -50,86 +50,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS = 1;
|
|||||||
*/
|
*/
|
||||||
class FilesLibTest extends CommonClassTest
|
class FilesLibTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FilesLibTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf = $conf;
|
|
||||||
$this->savuser = $user;
|
|
||||||
$this->savlangs = $langs;
|
|
||||||
$this->savdb = $db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf = $this->savconf;
|
|
||||||
$user = $this->savuser;
|
|
||||||
$langs = $this->savlangs;
|
|
||||||
$db = $this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testDolBasename
|
* testDolBasename
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,86 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class FormAdminTest extends CommonClassTest
|
class FormAdminTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FactureTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testSelectPaperFormat
|
* testSelectPaperFormat
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,86 +48,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class FormTest extends CommonClassTest
|
class FormTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FactureTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testSelectProduitsList
|
* testSelectProduitsList
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -72,86 +72,6 @@ if (! defined("NOLOGIN")) {
|
|||||||
*/
|
*/
|
||||||
class Functions2LibTest extends CommonClassTest
|
class Functions2LibTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CoreTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
//$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
//$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testJsUnEscape
|
* testJsUnEscape
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -78,36 +78,6 @@ print "\n";
|
|||||||
*/
|
*/
|
||||||
class FunctionsLibTest extends CommonClassTest
|
class FunctionsLibTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
protected $savmysoc;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return CoreTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db,$mysoc;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
$this->savmysoc=$mysoc;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setUpBeforeClass
|
* setUpBeforeClass
|
||||||
*
|
*
|
||||||
@@ -136,46 +106,6 @@ class FunctionsLibTest extends CommonClassTest
|
|||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
//$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests. Restore variables before each test.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db,$mysoc;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
$mysoc=$this->savmysoc;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testDolCheckFilters
|
* testDolCheckFilters
|
||||||
|
|||||||
@@ -49,86 +49,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
|
|||||||
*/
|
*/
|
||||||
class GetUrlLibTest extends CommonClassTest
|
class GetUrlLibTest extends CommonClassTest
|
||||||
{
|
{
|
||||||
protected $savconf;
|
|
||||||
protected $savuser;
|
|
||||||
protected $savlangs;
|
|
||||||
protected $savdb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* We save global variables into local variables
|
|
||||||
*
|
|
||||||
* @param string $name Name
|
|
||||||
* @return FilesLibTest
|
|
||||||
*/
|
|
||||||
public function __construct($name = '')
|
|
||||||
{
|
|
||||||
parent::__construct($name);
|
|
||||||
|
|
||||||
//$this->sharedFixture
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$this->savconf=$conf;
|
|
||||||
$this->savuser=$user;
|
|
||||||
$this->savlangs=$langs;
|
|
||||||
$this->savdb=$db;
|
|
||||||
|
|
||||||
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
|
|
||||||
//print " - db ".$db->db;
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setUpBeforeClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tearDownAfterClass
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$db->rollback();
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* End phpunit tests
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function tearDown(): void
|
|
||||||
{
|
|
||||||
print __METHOD__."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testGetRootURLFromURL
|
* testGetRootURLFromURL
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user