mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Clean code
This commit is contained in:
@@ -52,34 +52,6 @@ $conf->global->MAIN_DISABLE_ALL_MAILS = 1;
|
||||
*/
|
||||
class KnowledgeRecordTest extends CommonClassTest
|
||||
{
|
||||
protected $savconf;
|
||||
protected $savuser;
|
||||
protected $savlangs;
|
||||
protected $savdb;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* We save global variables into local variables
|
||||
*
|
||||
* @param string $name Name
|
||||
* @return KnowledgeRecordTest
|
||||
*/
|
||||
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
|
||||
*
|
||||
@@ -96,45 +68,6 @@ class KnowledgeRecordTest extends CommonClassTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testKnowledgeRecordCreate
|
||||
|
||||
Reference in New Issue
Block a user