Fix Status test

This commit is contained in:
Eric Espie
2023-01-11 10:28:32 +01:00
parent 5729d6a9cd
commit 030f1e2463

View File

@@ -72,17 +72,14 @@ class StatusIncTest extends ItopTestCase {
public function testStatusStartupWrongDbPwd()
{
$this->expectException(MySQLException::class);
$oStatus = new Status();
$this->InvokeNonPublicMethod("Combodo\iTop\Application\Status\Status", "StatusCheckConfigFile", $oStatus, []);
$this->RequireOnceItopFile('core/cmdbobject.class.inc.php');
$this->RequireOnceItopFile('application/utils.inc.php');
$this->RequireOnceItopFile('core/contexttag.class.inc.php');
$oConfigWrong = new Config(ITOP_DEFAULT_CONFIG_FILE);
$oConfigWrong->Set('db_pwd', $oConfigWrong->Get('db_pwd').'_unittest');
$this->InvokeNonPublicMethod(Status::class, "StatusStartup", $oStatus, [$oConfigWrong]);
$this->expectException(MySQLException::class);
new Status($oConfigWrong);
}
/**