Mutualize code

This commit is contained in:
Laurent Destailleur
2024-02-17 15:34:19 +01:00
parent 671257e8e3
commit eccff949d6
40 changed files with 3 additions and 3143 deletions

View File

@@ -78,36 +78,6 @@ print "\n";
*/
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
*
@@ -136,46 +106,6 @@ class FunctionsLibTest extends CommonClassTest
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