mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
✅ GivenObjectInDB() and additional improvements in the tests suite to address false positive and slow tests
Rewrite tests on impact analysis to make them readable in the first place, then simplifiy the tests to focus on risk reduction, then complete with some edge case Rewrite tests on impact graph build when the current user has restricted access to some parts of the graph
This commit is contained in:
committed by
Romain Quetiez
parent
b8d8ec640d
commit
984f676d6e
@@ -20,9 +20,7 @@ class StatusTest extends ItopTestCase
|
||||
|
||||
protected function GetPHPCommand()
|
||||
{
|
||||
$this->RequireOnceItopFile('application/utils.inc.php');
|
||||
$oConfig = new Config(ITOP_DEFAULT_CONFIG_FILE);
|
||||
return $oConfig->Get('php_path');
|
||||
return PHP_BINARY;
|
||||
}
|
||||
|
||||
public function testStatusPageRepliesAsExpected()
|
||||
@@ -30,6 +28,7 @@ class StatusTest extends ItopTestCase
|
||||
$sPath = APPROOT.'/webservices/status.php';
|
||||
|
||||
$sPHP = $this->GetPHPCommand();
|
||||
echo "About to execute: $sPHP $sPath\n";
|
||||
exec("$sPHP $sPath", $aOutput, $iRet);
|
||||
$this->assertEquals(0, $iRet, "Problem executing status page: $sPath, $iRet, aOutput:\n".var_export($aOutput, true));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user