Qual: FactureTest - use assertions rather than dying in the setup. (#28585)

# Qual: FactureTest - use assertions rather than dying in the setup.

The 'die()' instructions have been replaced - not all tests should fail
because the preconditions for a test case are not met.
This commit is contained in:
MDW 2024-03-03 17:08:57 +01:00 committed by GitHub
parent 9e1cfb7c52
commit e2fba5d03f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,20 +56,9 @@ class FactureTest extends CommonClassTest
*/
public static function setUpBeforeClass(): void
{
global $conf,$user,$langs,$db;
if (!isModEnabled('facture')) {
print __METHOD__." module customer invoice must be enabled.\n";
die(1);
}
if (isModEnabled('ecotaxdeee')) {
print __METHOD__." ecotaxdeee module must not 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";
self::assertTrue(isModEnabled('facture'), " module customer invoice must be enabled");
self::assertFalse(isModEnabled('ecotaxdeee'), " module customer invoice must be enabled");
parent::setUpBeforeClass();
}