mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-02 15:44:11 +01: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
@@ -57,6 +57,19 @@ abstract class ItopTestCase extends TestCase
|
||||
// setUp might be called multiple times, so protecting the define() call !
|
||||
define(ITOP_PHPUNIT_RUNNING_CONSTANT_NAME, true);
|
||||
}
|
||||
|
||||
// This is mostly for interactive usage, to warn the developer that the tests will be slow and point her to the php.ini file
|
||||
static $bCheckedXDebug = false;
|
||||
if (!$bCheckedXDebug) {
|
||||
$bCheckedXDebug = true;
|
||||
if (extension_loaded('xdebug') && ini_get('xdebug.mode') != '') {
|
||||
echo "Xdebug is enabled (xdebug.mode='".ini_get('xdebug.mode')."'), this will slow down the tests.\n";
|
||||
$sIniFile = php_ini_loaded_file();
|
||||
if ($sIniFile) {
|
||||
echo "This can be tuned in $sIniFile\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user