This commit is contained in:
ldestailleur
2025-03-25 22:31:49 +01:00
parent 507262a1a8
commit fd0889cebb
3 changed files with 32 additions and 4 deletions

View File

@@ -51,6 +51,26 @@ use PHPUnit\Framework\TestCase;
*/
class ModulesTest extends CommonClassTest // TestCase //CommonClassTest
{
/**
* 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.
if ((int) getenv('PHPUNIT_DEBUG') > 0) {
print get_called_class()."::".__FUNCTION__.PHP_EOL;
}
$infotable = $db->DDLListTablesFull($db->database_name);
print "List of existing tables before running test ModulesTest\n";
print var_export($infotable, true)."\n";
}
/**
* Return list of modules for which to test initialisation
*
@@ -90,7 +110,7 @@ class ModulesTest extends CommonClassTest // TestCase //CommonClassTest
$mod = new $class($db);
$result = $mod->remove();
print __METHOD__." test remove for module ".$modlabel.", result=".$result."\n";
print __METHOD__." test remove for module ".$modlabel.", result=".$result."\n";
$result = $mod->init();
print __METHOD__." test init for module ".$modlabel.", result=".$result."\n";