mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-24 22:04:27 +01:00
More robust phpunit
This commit is contained in:
@@ -30,6 +30,7 @@ global $conf,$user,$langs,$db;
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/blockedlog/class/blockedlog.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/modBlockedLog.class.php';
|
||||
require_once dirname(__FILE__).'/CommonClassTest.class.php';
|
||||
|
||||
if (empty($user->id)) {
|
||||
@@ -51,6 +52,23 @@ $langs->load("main");
|
||||
*/
|
||||
class BlockedLogAndLNETest extends CommonClassTest
|
||||
{
|
||||
/**
|
||||
* setUpBeforeClass
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
self::assertTrue(isModEnabled('invoice'), " module customer invoice must be enabled");
|
||||
self::assertFalse(isModEnabled('ecotaxdeee'), " module ecotaxdeee must not be enabled");
|
||||
parent::setUpBeforeClass();
|
||||
|
||||
// We disable module blocked log to avoid interference with tests
|
||||
global $db;
|
||||
$blockedlogmodule = new modBlockedLog($db);
|
||||
$blockedlogmodule->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* testBlockedLogAndLNETest
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user