diff --git a/test/application/DashboardLayoutTest.php b/test/application/DashboardLayoutTest.php index 0d6eb2397..fc4e2dcc0 100644 --- a/test/application/DashboardLayoutTest.php +++ b/test/application/DashboardLayoutTest.php @@ -20,9 +20,6 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase; /** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled * @covers utils */ class DashboardLayoutTest extends ItopTestCase diff --git a/test/application/UtilsTest.php b/test/application/UtilsTest.php index b90033b4d..39c08405f 100644 --- a/test/application/UtilsTest.php +++ b/test/application/UtilsTest.php @@ -20,9 +20,6 @@ */ /** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled * @covers utils */ class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase @@ -247,6 +244,7 @@ class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase } /** + * @runInSeparateProcess * @dataProvider GetAbsoluteUrlAppRootPersistency */ public function testGetAbsoluteUrlAppRootPersistency($bBehindReverseProxy,$bForceTrustProxy1 ,$sExpectedAppRootUrl1,$bForceTrustProxy2 , $sExpectedAppRootUrl2,$bForceTrustProxy3 , $sExpectedAppRootUrl3) diff --git a/test/core/CMDBSource/CMDBSourceTest.php b/test/core/CMDBSource/CMDBSourceTest.php index 592786b02..9eb26c9a2 100644 --- a/test/core/CMDBSource/CMDBSourceTest.php +++ b/test/core/CMDBSource/CMDBSourceTest.php @@ -13,11 +13,6 @@ use utils; * @package Combodo\iTop\Test\UnitTest\Core */ -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class CMDBSourceTest extends ItopTestCase { protected function setUp() diff --git a/test/core/CMDBSource/TransactionsTest.php b/test/core/CMDBSource/TransactionsTest.php index 227ebe7d7..b5f548e7e 100644 --- a/test/core/CMDBSource/TransactionsTest.php +++ b/test/core/CMDBSource/TransactionsTest.php @@ -13,7 +13,9 @@ use MetaModel; /** * @runTestsInSeparateProcesses - * + * @preserveGlobalState disabled + * @backupGlobals disabled + * * @group itopRequestMgmt * Class TransactionsTest * diff --git a/test/core/ConfigPlaceholdersResolverTest.php b/test/core/ConfigPlaceholdersResolverTest.php index a9589360a..74bd10add 100644 --- a/test/core/ConfigPlaceholdersResolverTest.php +++ b/test/core/ConfigPlaceholdersResolverTest.php @@ -23,13 +23,7 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; use ConfigPlaceholdersResolver; -use PHPUnit\Framework\TestCase; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class ConfigPlaceholdersResolverTest extends ItopTestCase { protected function setUp() @@ -37,6 +31,7 @@ class ConfigPlaceholdersResolverTest extends ItopTestCase parent::setUp(); require_once (APPROOT.'core/config.class.inc.php'); } + /** * @dataProvider providerResolve */ diff --git a/test/core/ConfigTest.php b/test/core/ConfigTest.php index f990cda08..eb78a05b8 100644 --- a/test/core/ConfigTest.php +++ b/test/core/ConfigTest.php @@ -23,13 +23,7 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; use Config; -use PHPUnit\Framework\TestCase; - /** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class ConfigTest extends ItopTestCase { protected function setUp() diff --git a/test/core/ExpressionTest.php b/test/core/ExpressionTest.php index 1ba63daa5..f7a4894cf 100644 --- a/test/core/ExpressionTest.php +++ b/test/core/ExpressionTest.php @@ -7,6 +7,8 @@ use Expression; /** * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + * @backupGlobals disabled */ class ExpressionTest extends ItopDataTestCase { diff --git a/test/core/LogAPITest.php b/test/core/LogAPITest.php index 006d06ba8..1a47561ba 100644 --- a/test/core/LogAPITest.php +++ b/test/core/LogAPITest.php @@ -12,11 +12,6 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class LogAPITest extends ItopTestCase { private $mockFileLog; diff --git a/test/core/LogFileNameBuilderTest.php b/test/core/LogFileNameBuilderTest.php index 2db4a28f4..6144a6f32 100644 --- a/test/core/LogFileNameBuilderTest.php +++ b/test/core/LogFileNameBuilderTest.php @@ -6,15 +6,8 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; use DailyRotatingLogFileNameBuilder; -use WeeklyRotatingLogFileNameBuilder; -use MonthlyRotatingLogFileNameBuilder; use DateTime; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class LogFileNameBuilderTest extends ItopTestCase { const TEST_LOGFILE_PREFIX = 'fileNameBuilder.test'; diff --git a/test/core/UniquenessConstraintTest.php b/test/core/UniquenessConstraintTest.php index a583c4815..8411eefe5 100644 --- a/test/core/UniquenessConstraintTest.php +++ b/test/core/UniquenessConstraintTest.php @@ -14,11 +14,7 @@ use MetaModel; * * @package Combodo\iTop\Test\UnitTest\Core */ -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */class UniquenessConstraintTest extends ItopTestCase +class UniquenessConstraintTest extends ItopTestCase { protected function setUp() { diff --git a/test/core/WeeklyScheduledProcessTest.php b/test/core/WeeklyScheduledProcessTest.php index ffd879b64..b1c31c4c4 100644 --- a/test/core/WeeklyScheduledProcessTest.php +++ b/test/core/WeeklyScheduledProcessTest.php @@ -2,17 +2,9 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; -use Config; use DateTime; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - * - * @package Combodo\iTop\Test\UnitTest\Core - */ class WeeklyScheduledProcessTest extends ItopTestCase { protected function setUp() diff --git a/test/core/apcEmulationTest.php b/test/core/apcEmulationTest.php index 65a1d6f13..012a833e4 100644 --- a/test/core/apcEmulationTest.php +++ b/test/core/apcEmulationTest.php @@ -27,16 +27,10 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; -use PHPUnit\Framework\TestCase; define('UNIT_MAX_CACHE_FILES', 10); -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class apcEmulationTest extends ItopTestCase { diff --git a/test/core/dictTest.php b/test/core/dictTest.php index 5bea10386..4f98c17a0 100644 --- a/test/core/dictTest.php +++ b/test/core/dictTest.php @@ -31,11 +31,6 @@ use Dict; use Exception; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class dictTest extends ItopTestCase { private $sEnvName; diff --git a/test/core/sanitizer/AbstractDOMSanitizerTest.php b/test/core/sanitizer/AbstractDOMSanitizerTest.php index 469de3f2a..bff69cf43 100644 --- a/test/core/sanitizer/AbstractDOMSanitizerTest.php +++ b/test/core/sanitizer/AbstractDOMSanitizerTest.php @@ -4,11 +4,6 @@ namespace Combodo\iTop\Test\UnitTest\Core\Sanitizer; use Combodo\iTop\Test\UnitTest\ItopTestCase; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ abstract class AbstractDOMSanitizerTest extends ItopTestCase { const INPUT_DIRECTORY = 'input'; diff --git a/test/core/sanitizer/SvgDOMSanitizerTest.php b/test/core/sanitizer/SvgDOMSanitizerTest.php index a7e611793..b86424a20 100644 --- a/test/core/sanitizer/SvgDOMSanitizerTest.php +++ b/test/core/sanitizer/SvgDOMSanitizerTest.php @@ -8,11 +8,6 @@ use SVGDOMSanitizer; require_once __DIR__.'/AbstractDOMSanitizerTest.php'; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class SVGDOMSanitizerTest extends AbstractDOMSanitizerTest { /** diff --git a/test/coreExtensions/UserLocalTest.php b/test/coreExtensions/UserLocalTest.php index b05ba6be3..c765d909b 100644 --- a/test/coreExtensions/UserLocalTest.php +++ b/test/coreExtensions/UserLocalTest.php @@ -9,14 +9,7 @@ namespace coreExtensions; use Combodo\iTop\Test\UnitTest\ItopDataTestCase; -use Combodo\iTop\Test\UnitTest\ItopTestCase; use UserLocal; -use UserLocalPasswordPolicyMockNotValid; -use UserLocalPasswordPolicyMockNotValidBis; -use UserLocalPasswordPolicyMockValid; -use UserLocalPasswordPolicyMockValidBis; -use UserLocalPasswordValidity; -use UserPasswordPolicyRegex; /** * test class for UserLocal class @@ -39,10 +32,6 @@ class UserLocalTest extends ItopDataTestCase /** * @dataProvider ProviderValidatePassword - * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled */ public function testValidatePassword($sPassword, $aValidatorNames, $aConfigValueMap, $bExpectedCheckStatus, $expectedCheckIssues = null, $sUserLanguage = null) { diff --git a/test/integration/iTopModulesPhpVersionChecklistTest.php b/test/integration/iTopModulesPhpVersionChecklistTest.php index 77907ec54..ff5068d60 100644 --- a/test/integration/iTopModulesPhpVersionChecklistTest.php +++ b/test/integration/iTopModulesPhpVersionChecklistTest.php @@ -20,15 +20,9 @@ use iTopDesignFormat; /** - * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled * @group itop-community * * @covers iTopDesignFormat - * - * @package Combodo\iTop\Test\UnitTest\Setup */ class iTopModulesPhpVersionIntegrationTest extends ItopTestCase { diff --git a/test/integration/iTopModulesXmlVersionChecklistTest.php b/test/integration/iTopModulesXmlVersionChecklistTest.php index 194b7f193..eab8a3441 100644 --- a/test/integration/iTopModulesXmlVersionChecklistTest.php +++ b/test/integration/iTopModulesXmlVersionChecklistTest.php @@ -21,15 +21,9 @@ use iTopDesignFormat; /** - * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled * @group itop-community * * @covers iTopDesignFormat - * - * @package Combodo\iTop\Test\UnitTest\Setup */ class iTopModulesXmlVersionIntegrationTest extends ItopTestCase { diff --git a/test/postbuild_integration/SetupCssIntegrityChecklistTest.php b/test/postbuild_integration/SetupCssIntegrityChecklistTest.php index b9f918baa..6aa97d265 100644 --- a/test/postbuild_integration/SetupCssIntegrityChecklistTest.php +++ b/test/postbuild_integration/SetupCssIntegrityChecklistTest.php @@ -22,31 +22,16 @@ namespace Combodo\iTop\Test\UnitTest\ReleaseChecklist; use Combodo\iTop\Test\UnitTest\ItopTestCase; -use DOMDocument; use iTopDesignFormat; /** * Class iTopDesignFormatChecklistTest * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - * * @covers iTopDesignFormat - * - * @package Combodo\iTop\Test\UnitTest\Setup */ class SetupCssIntegrityChecklistTest extends ItopTestCase { - - protected function setUp() - { - parent::setUp(); - } - - /** - */ public function testSetupCssIntegrity() { $sSetupCssPath = APPROOT.'css/setup.css'; @@ -55,5 +40,4 @@ class SetupCssIntegrityChecklistTest extends ItopTestCase $this->assertContains('/* integrityCheck: end (do not remove/edit) */', $sSetupCssContent); $this->assertGreaterThan(4000, strlen($sSetupCssContent), "Test if the resulting file $sSetupCssPath is long enough, the value is totally arbitrary (at the time of the writing the file is 5660o long"); } - } diff --git a/test/postbuild_integration/iTopDesignFormatChecklistTest.php b/test/postbuild_integration/iTopDesignFormatChecklistTest.php index 0518c84d5..abd4b13bd 100644 --- a/test/postbuild_integration/iTopDesignFormatChecklistTest.php +++ b/test/postbuild_integration/iTopDesignFormatChecklistTest.php @@ -10,13 +10,8 @@ use PHPUnit\Exception; /** * Class iTopDesignFormatChecklistTest * Ticket 3053 - Check XML conversion methods - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled * * @covers iTopDesignFormat - * - * @package Combodo\iTop\Test\UnitTest\Setup */ class TestForITopDesignFormatClass extends ItopTestCase { diff --git a/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php b/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php index 307d16564..1cee3f03b 100644 --- a/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php +++ b/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php @@ -3,28 +3,17 @@ namespace Combodo\iTop\Test\UnitTest\ReleaseChecklist; use Combodo\iTop\Test\UnitTest\ItopTestCase; -use DOMDocument; use iTopDesignFormat; /** * Class iTopDesignFormatChecklistTest * Ticket 3061 - Automatically check the installation.xml consistency - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled * * @covers iTopDesignFormat - * - * @package Combodo\iTop\Test\UnitTest\Setup */ class iTopModuleXmlInstallationChecklistTest extends ItopTestCase { - protected function setUp() - { - parent::setUp(); - } - /** * make sure installation.xml is provided and respects XML format */ diff --git a/test/setup/SetupUtilsTest.php b/test/setup/SetupUtilsTest.php index f2f931ce0..c2c43221a 100644 --- a/test/setup/SetupUtilsTest.php +++ b/test/setup/SetupUtilsTest.php @@ -10,10 +10,6 @@ use SetupUtils; /** * Class SetupUtilsTest * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - * * @covers SetupUtils * * @since 2.7.4 N°3412 diff --git a/test/setup/iTopDesignFormat/iTopDesignFormatTest.php b/test/setup/iTopDesignFormat/iTopDesignFormatTest.php index cabfbba24..9e1ed1171 100644 --- a/test/setup/iTopDesignFormat/iTopDesignFormatTest.php +++ b/test/setup/iTopDesignFormat/iTopDesignFormatTest.php @@ -10,10 +10,6 @@ use iTopDesignFormat; /** * Class iTopDesignFormatTest * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - * * @covers iTopDesignFormat * * @since 2.7.0 N°2586 diff --git a/test/status/StatusTest.php b/test/status/StatusTest.php index dac665b5b..b19c4756f 100644 --- a/test/status/StatusTest.php +++ b/test/status/StatusTest.php @@ -9,16 +9,7 @@ namespace Combodo\iTop\Test\UnitTest\Status; use Combodo\iTop\Test\UnitTest\ItopTestCase; -/** - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @backupGlobals disabled - */ class StatusTest extends ItopTestCase { - - /** - * - */ public function testStatusWrongUrl() { $sPath = __DIR__ . '/status_wrong.php'; @@ -27,9 +18,6 @@ class StatusTest extends ItopTestCase { } - /** - * - */ public function testStatusGood() { $sPath = __DIR__ . '/status.php'; @@ -37,9 +25,6 @@ class StatusTest extends ItopTestCase { $this->assertEquals(0, $iRet, "Problem executing status page: $sPath, $iRet, aOutput:\n" . var_export($aOutput, true)); } - /** - * - */ public function testStatusGoodWithJson() { $sPath = __DIR__ . '/status.php'; @@ -62,5 +47,4 @@ class StatusTest extends ItopTestCase { $this->assertArrayHasKey('message', $aResponseDecoded, 'JSON does not have a message\' field. ' . $sAdditionnalInfo); $this->assertEmpty($aResponseDecoded['message'], 'Message is not empty. ' . $sAdditionnalInfo); } - }