From 030f1e24631f0a41ea2c20ed1f602e0301119b89 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 11 Jan 2023 10:28:32 +0100 Subject: [PATCH] :white_check_mark: Fix Status test --- .../sources/application/status/StatusIncTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/php-unit-tests/unitary-tests/sources/application/status/StatusIncTest.php b/tests/php-unit-tests/unitary-tests/sources/application/status/StatusIncTest.php index c09ae0731..92d1dfbbf 100644 --- a/tests/php-unit-tests/unitary-tests/sources/application/status/StatusIncTest.php +++ b/tests/php-unit-tests/unitary-tests/sources/application/status/StatusIncTest.php @@ -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); } /**