From 1d7e4e1a42838285bbe7c119a5f4f6a91bd8c70d Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 13:07:57 +0200 Subject: [PATCH 01/19] =?UTF-8?q?N=C2=B05608=20-=20Move=20unit=20tests=20t?= =?UTF-8?q?o=20a=20dedicated=20folder=20and=20start=20reorganizing=20to=20?= =?UTF-8?q?match=20iTop=20folder=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +- test/ci_description.ini | 2 +- .../{ => php-unit-tests}/ItopDataTestCase.php | 0 test/{ => php-unit-tests}/ItopTestCase.php | 0 test/{ => php-unit-tests}/composer.json | 0 .../DictionariesConsistencyTest.php | 0 .../iTopModulesPhpVersionChecklistTest.php | 0 .../iTopModulesXmlVersionChecklistTest.php | 0 test/{ => php-unit-tests}/phpunit.xml.dist | 24 +- .../postbuild_integration.xml.dist | 6 +- .../SetupCssIntegrityChecklistTest.php | 0 .../iTopDesignFormatChecklistTest.php | 0 ...iTopModuleXmlInstallationChecklistTest.php | 0 .../application/DashboardLayoutTest.php | 0 .../tests}/application/UtilsTest.php | 0 .../application/composer/iTopComposerTest.php | 0 .../application/privUITransactionFileTest.php | 0 .../search/CriterionConversionTest.php | 0 .../search/CriterionParserTest.php | 0 .../application/search/SearchFormTest.php | 0 .../tests}/core/BulkChangeTest.inc.php | 0 .../tests}/core/CMDBObjectTest.php | 0 .../tests}/core/CMDBSource/CMDBSourceTest.php | 0 .../core/CMDBSource/DeadLockInjection.php | 0 .../core/CMDBSource/TransactionsTest.php | 0 .../core/ConfigPlaceholdersResolverTest.php | 0 .../tests}/core/ConfigTest.php | 0 .../core/ConfigTest/config-itop-joker.php | 0 .../core/ConfigTest/config-itop-var.php | 0 .../config-itop_KO_config_plus_code.php | 0 .../config-itop_KO_function.php | 0 .../ConfigValidator/config-itop_VALID.php | 0 .../config-itop_VALID_log-level-min_const.php | 0 .../iTopConfigAstValidatorTest.php | 0 .../tests}/core/DBObjectTest.php | 0 .../tests}/core/DBSearchCommitTest.php | 0 .../tests}/core/DBSearchIntersectTest.php | 0 .../tests}/core/DBSearchJoinTest.php | 0 .../tests}/core/DBSearchTest.php | 0 .../core/DBSearchUpdateRealiasingMapTest.php | 0 .../tests}/core/ExpressionTest.php | 0 .../tests}/core/LogAPITest.php | 0 .../tests}/core/LogFileNameBuilderTest.php | 0 .../tests}/core/MetaModelTest.php | 0 .../tests}/core/OQLParserTest.php | 0 .../tests}/core/OQLTest.php | 0 .../tests}/core/TagSetFieldDataTest.php | 0 .../tests}/core/TriggerTest.php | 0 .../tests}/core/UniquenessConstraintTest.php | 0 .../tests}/core/UserRightsTest.php | 0 .../core/WeeklyScheduledProcessMockConfig.php | 0 .../core/WeeklyScheduledProcessTest.php | 0 .../tests}/core/apcEmulationTest.php | 0 .../tests}/core/dictApcuTest.php | 0 .../tests}/core/dictTest.php | 0 .../tests}/core/iTopConfigParserTest.php | 0 .../tests}/core/mockApcEmulation.incphp | 0 .../tests}/core/mockDict.incphp | 0 .../tests}/core/ormLinkSetTest.php | 0 .../tests}/core/ormTagSetTest.php | 0 .../sanitizer/AbstractDOMSanitizerTest.php | 0 .../core/sanitizer/HTMLDOMSanitizerTest.php | 0 .../tests}/core/sanitizer/InlineImageMock.php | 0 .../tests}/core/sanitizer/README.txt | 0 .../core/sanitizer/SvgDOMSanitizerTest.php | 0 .../tests}/core/sanitizer/input/scripts.html | 0 .../tests}/core/sanitizer/input/scripts.svg | 0 .../utf-8_wrong_character_email_truncated.txt | 0 .../core/sanitizer/input/whitelist_test.html | 0 .../tests}/core/sanitizer/output/scripts.html | 0 .../tests}/core/sanitizer/output/scripts.svg | 0 .../utf-8_wrong_character_email_truncated.txt | 0 .../tests}/coreExtensions/UserLocalTest.php | 0 .../UserLocalPasswordPolicyMock.php | 0 .../Validator/iTopConfigAstValidatorTest.php | 0 .../iTopConfigSyntaxValidatorTest.php | 0 .../2.x}/itop-tickets/itopTicketTest.php | 0 .../tests}/setup/DBBackupTest.php | 0 .../tests}/setup/SetupUtilsTest.php | 0 .../iTopDesignFormat/1.7_to_1.6.expected.xml | 0 .../iTopDesignFormat/1.7_to_1.6.input.xml | 0 .../iTopDesignFormat/iTopDesignFormatTest.php | 0 .../tests}/status/StatusIncTest.php | 0 .../tests}/status/StatusTest.php | 0 .../tests}/status/status.php | 0 .../tests}/webservices/RestTest.php | 0 .../{ => php-unit-tests}/unittestautoload.php | 0 {test => tests/php-unit-tests}/composer.lock | 435 ++---------------- 88 files changed, 52 insertions(+), 419 deletions(-) rename test/{ => php-unit-tests}/ItopDataTestCase.php (100%) rename test/{ => php-unit-tests}/ItopTestCase.php (100%) rename test/{ => php-unit-tests}/composer.json (100%) rename test/{ => php-unit-tests}/integration/DictionariesConsistencyTest.php (100%) rename test/{ => php-unit-tests}/integration/iTopModulesPhpVersionChecklistTest.php (100%) rename test/{ => php-unit-tests}/integration/iTopModulesXmlVersionChecklistTest.php (100%) rename test/{ => php-unit-tests}/phpunit.xml.dist (71%) rename test/{ => php-unit-tests}/postbuild_integration.xml.dist (84%) rename test/{ => php-unit-tests}/postbuild_integration/SetupCssIntegrityChecklistTest.php (100%) rename test/{ => php-unit-tests}/postbuild_integration/iTopDesignFormatChecklistTest.php (100%) rename test/{ => php-unit-tests}/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php (100%) rename test/{ => php-unit-tests/tests}/application/DashboardLayoutTest.php (100%) rename test/{ => php-unit-tests/tests}/application/UtilsTest.php (100%) rename test/{ => php-unit-tests/tests}/application/composer/iTopComposerTest.php (100%) rename test/{ => php-unit-tests/tests}/application/privUITransactionFileTest.php (100%) rename test/{ => php-unit-tests/tests}/application/search/CriterionConversionTest.php (100%) rename test/{ => php-unit-tests/tests}/application/search/CriterionParserTest.php (100%) rename test/{ => php-unit-tests/tests}/application/search/SearchFormTest.php (100%) rename test/{ => php-unit-tests/tests}/core/BulkChangeTest.inc.php (100%) rename test/{ => php-unit-tests/tests}/core/CMDBObjectTest.php (100%) rename test/{ => php-unit-tests/tests}/core/CMDBSource/CMDBSourceTest.php (100%) rename test/{ => php-unit-tests/tests}/core/CMDBSource/DeadLockInjection.php (100%) rename test/{ => php-unit-tests/tests}/core/CMDBSource/TransactionsTest.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigPlaceholdersResolverTest.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigTest.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigTest/config-itop-joker.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigTest/config-itop-var.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigValidator/config-itop_KO_config_plus_code.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigValidator/config-itop_KO_function.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigValidator/config-itop_VALID.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigValidator/config-itop_VALID_log-level-min_const.php (100%) rename test/{ => php-unit-tests/tests}/core/ConfigValidator/iTopConfigAstValidatorTest.php (100%) rename test/{ => php-unit-tests/tests}/core/DBObjectTest.php (100%) rename test/{ => php-unit-tests/tests}/core/DBSearchCommitTest.php (100%) rename test/{ => php-unit-tests/tests}/core/DBSearchIntersectTest.php (100%) rename test/{ => php-unit-tests/tests}/core/DBSearchJoinTest.php (100%) rename test/{ => php-unit-tests/tests}/core/DBSearchTest.php (100%) rename test/{ => php-unit-tests/tests}/core/DBSearchUpdateRealiasingMapTest.php (100%) rename test/{ => php-unit-tests/tests}/core/ExpressionTest.php (100%) rename test/{ => php-unit-tests/tests}/core/LogAPITest.php (100%) rename test/{ => php-unit-tests/tests}/core/LogFileNameBuilderTest.php (100%) rename test/{ => php-unit-tests/tests}/core/MetaModelTest.php (100%) rename test/{ => php-unit-tests/tests}/core/OQLParserTest.php (100%) rename test/{ => php-unit-tests/tests}/core/OQLTest.php (100%) rename test/{ => php-unit-tests/tests}/core/TagSetFieldDataTest.php (100%) rename test/{ => php-unit-tests/tests}/core/TriggerTest.php (100%) rename test/{ => php-unit-tests/tests}/core/UniquenessConstraintTest.php (100%) rename test/{ => php-unit-tests/tests}/core/UserRightsTest.php (100%) rename test/{ => php-unit-tests/tests}/core/WeeklyScheduledProcessMockConfig.php (100%) rename test/{ => php-unit-tests/tests}/core/WeeklyScheduledProcessTest.php (100%) rename test/{ => php-unit-tests/tests}/core/apcEmulationTest.php (100%) rename test/{ => php-unit-tests/tests}/core/dictApcuTest.php (100%) rename test/{ => php-unit-tests/tests}/core/dictTest.php (100%) rename test/{ => php-unit-tests/tests}/core/iTopConfigParserTest.php (100%) rename test/{ => php-unit-tests/tests}/core/mockApcEmulation.incphp (100%) rename test/{ => php-unit-tests/tests}/core/mockDict.incphp (100%) rename test/{ => php-unit-tests/tests}/core/ormLinkSetTest.php (100%) rename test/{ => php-unit-tests/tests}/core/ormTagSetTest.php (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/AbstractDOMSanitizerTest.php (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/HTMLDOMSanitizerTest.php (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/InlineImageMock.php (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/README.txt (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/SvgDOMSanitizerTest.php (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/input/scripts.html (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/input/scripts.svg (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/input/whitelist_test.html (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/output/scripts.html (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/output/scripts.svg (100%) rename test/{ => php-unit-tests/tests}/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt (100%) rename test/{ => php-unit-tests/tests}/coreExtensions/UserLocalTest.php (100%) rename test/{ => php-unit-tests/tests}/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php (100%) rename test/{ => php-unit-tests/tests/datamodels/2.x}/itop-config/Validator/iTopConfigAstValidatorTest.php (100%) rename test/{ => php-unit-tests/tests/datamodels/2.x}/itop-config/Validator/iTopConfigSyntaxValidatorTest.php (100%) rename test/{ => php-unit-tests/tests/datamodels/2.x}/itop-tickets/itopTicketTest.php (100%) rename test/{ => php-unit-tests/tests}/setup/DBBackupTest.php (100%) rename test/{ => php-unit-tests/tests}/setup/SetupUtilsTest.php (100%) rename test/{ => php-unit-tests/tests}/setup/iTopDesignFormat/1.7_to_1.6.expected.xml (100%) rename test/{ => php-unit-tests/tests}/setup/iTopDesignFormat/1.7_to_1.6.input.xml (100%) rename test/{ => php-unit-tests/tests}/setup/iTopDesignFormat/iTopDesignFormatTest.php (100%) rename test/{ => php-unit-tests/tests}/status/StatusIncTest.php (100%) rename test/{ => php-unit-tests/tests}/status/StatusTest.php (100%) rename test/{ => php-unit-tests/tests}/status/status.php (100%) rename test/{ => php-unit-tests/tests}/webservices/RestTest.php (100%) rename test/{ => php-unit-tests}/unittestautoload.php (100%) rename {test => tests/php-unit-tests}/composer.lock (77%) diff --git a/.gitignore b/.gitignore index 1fe7f38f4..8a46f7b20 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ # composer reserver directory, from sources, populate/update using "composer install" vendor/* -test/vendor/* +test/*/vendor/* # all conf but listing prevention /conf/** @@ -33,7 +33,7 @@ test/vendor/* !/log/web.config # PHPUnit cache file -/test/.phpunit.result.cache +/test/php-unit-tests/.phpunit.result.cache # Jetbrains diff --git a/test/ci_description.ini b/test/ci_description.ini index dfa005287..ed14d2c87 100644 --- a/test/ci_description.ini +++ b/test/ci_description.ini @@ -5,4 +5,4 @@ itop_backup=test/backups/backup-itop.tar.gz [phpunit] ; when empty phpunit_xml => no phpunit test performed ; phpunit xml file description. required for phpunit testing -phpunit_xml=test/phpunit.xml.dist +phpunit_xml=test/php-unit-tests/phpunit.xml.dist diff --git a/test/ItopDataTestCase.php b/test/php-unit-tests/ItopDataTestCase.php similarity index 100% rename from test/ItopDataTestCase.php rename to test/php-unit-tests/ItopDataTestCase.php diff --git a/test/ItopTestCase.php b/test/php-unit-tests/ItopTestCase.php similarity index 100% rename from test/ItopTestCase.php rename to test/php-unit-tests/ItopTestCase.php diff --git a/test/composer.json b/test/php-unit-tests/composer.json similarity index 100% rename from test/composer.json rename to test/php-unit-tests/composer.json diff --git a/test/integration/DictionariesConsistencyTest.php b/test/php-unit-tests/integration/DictionariesConsistencyTest.php similarity index 100% rename from test/integration/DictionariesConsistencyTest.php rename to test/php-unit-tests/integration/DictionariesConsistencyTest.php diff --git a/test/integration/iTopModulesPhpVersionChecklistTest.php b/test/php-unit-tests/integration/iTopModulesPhpVersionChecklistTest.php similarity index 100% rename from test/integration/iTopModulesPhpVersionChecklistTest.php rename to test/php-unit-tests/integration/iTopModulesPhpVersionChecklistTest.php diff --git a/test/integration/iTopModulesXmlVersionChecklistTest.php b/test/php-unit-tests/integration/iTopModulesXmlVersionChecklistTest.php similarity index 100% rename from test/integration/iTopModulesXmlVersionChecklistTest.php rename to test/php-unit-tests/integration/iTopModulesXmlVersionChecklistTest.php diff --git a/test/phpunit.xml.dist b/test/php-unit-tests/phpunit.xml.dist similarity index 71% rename from test/phpunit.xml.dist rename to test/php-unit-tests/phpunit.xml.dist index a836dbd9a..703b2b363 100644 --- a/test/phpunit.xml.dist +++ b/test/php-unit-tests/phpunit.xml.dist @@ -29,44 +29,44 @@ - application + tests/application - core + tests/core - coreExtensions + tests/coreExtensions integration - itop-config + tests/datamodels/2.x/itop-config - itop-tickets + tests/datamodels/2.x/itop-tickets - setup + tests/setup - status + tests/status - webservices + tests/webservices - ../env-production/*/test + ../../../env-production/*/test - ../core/apc-emulation.php - ../core/ormlinkset.class.inc.php - ../datamodels/2.x/itop-tickets/main.itop-tickets.php + ../../../core/apc-emulation.php + ../../../core/ormlinkset.class.inc.php + ../../../datamodels/2.x/itop-tickets/main.itop-tickets.php diff --git a/test/postbuild_integration.xml.dist b/test/php-unit-tests/postbuild_integration.xml.dist similarity index 84% rename from test/postbuild_integration.xml.dist rename to test/php-unit-tests/postbuild_integration.xml.dist index 5e701b93d..2032e204e 100644 --- a/test/postbuild_integration.xml.dist +++ b/test/php-unit-tests/postbuild_integration.xml.dist @@ -34,9 +34,9 @@ - ../core/apc-emulation.php - ../core/ormlinkset.class.inc.php - ../datamodels/2.x/itop-tickets/main.itop-tickets.php + ../../../core/apc-emulation.php + ../../../core/ormlinkset.class.inc.php + ../../../datamodels/2.x/itop-tickets/main.itop-tickets.php diff --git a/test/postbuild_integration/SetupCssIntegrityChecklistTest.php b/test/php-unit-tests/postbuild_integration/SetupCssIntegrityChecklistTest.php similarity index 100% rename from test/postbuild_integration/SetupCssIntegrityChecklistTest.php rename to test/php-unit-tests/postbuild_integration/SetupCssIntegrityChecklistTest.php diff --git a/test/postbuild_integration/iTopDesignFormatChecklistTest.php b/test/php-unit-tests/postbuild_integration/iTopDesignFormatChecklistTest.php similarity index 100% rename from test/postbuild_integration/iTopDesignFormatChecklistTest.php rename to test/php-unit-tests/postbuild_integration/iTopDesignFormatChecklistTest.php diff --git a/test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php b/test/php-unit-tests/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php similarity index 100% rename from test/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php rename to test/php-unit-tests/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php diff --git a/test/application/DashboardLayoutTest.php b/test/php-unit-tests/tests/application/DashboardLayoutTest.php similarity index 100% rename from test/application/DashboardLayoutTest.php rename to test/php-unit-tests/tests/application/DashboardLayoutTest.php diff --git a/test/application/UtilsTest.php b/test/php-unit-tests/tests/application/UtilsTest.php similarity index 100% rename from test/application/UtilsTest.php rename to test/php-unit-tests/tests/application/UtilsTest.php diff --git a/test/application/composer/iTopComposerTest.php b/test/php-unit-tests/tests/application/composer/iTopComposerTest.php similarity index 100% rename from test/application/composer/iTopComposerTest.php rename to test/php-unit-tests/tests/application/composer/iTopComposerTest.php diff --git a/test/application/privUITransactionFileTest.php b/test/php-unit-tests/tests/application/privUITransactionFileTest.php similarity index 100% rename from test/application/privUITransactionFileTest.php rename to test/php-unit-tests/tests/application/privUITransactionFileTest.php diff --git a/test/application/search/CriterionConversionTest.php b/test/php-unit-tests/tests/application/search/CriterionConversionTest.php similarity index 100% rename from test/application/search/CriterionConversionTest.php rename to test/php-unit-tests/tests/application/search/CriterionConversionTest.php diff --git a/test/application/search/CriterionParserTest.php b/test/php-unit-tests/tests/application/search/CriterionParserTest.php similarity index 100% rename from test/application/search/CriterionParserTest.php rename to test/php-unit-tests/tests/application/search/CriterionParserTest.php diff --git a/test/application/search/SearchFormTest.php b/test/php-unit-tests/tests/application/search/SearchFormTest.php similarity index 100% rename from test/application/search/SearchFormTest.php rename to test/php-unit-tests/tests/application/search/SearchFormTest.php diff --git a/test/core/BulkChangeTest.inc.php b/test/php-unit-tests/tests/core/BulkChangeTest.inc.php similarity index 100% rename from test/core/BulkChangeTest.inc.php rename to test/php-unit-tests/tests/core/BulkChangeTest.inc.php diff --git a/test/core/CMDBObjectTest.php b/test/php-unit-tests/tests/core/CMDBObjectTest.php similarity index 100% rename from test/core/CMDBObjectTest.php rename to test/php-unit-tests/tests/core/CMDBObjectTest.php diff --git a/test/core/CMDBSource/CMDBSourceTest.php b/test/php-unit-tests/tests/core/CMDBSource/CMDBSourceTest.php similarity index 100% rename from test/core/CMDBSource/CMDBSourceTest.php rename to test/php-unit-tests/tests/core/CMDBSource/CMDBSourceTest.php diff --git a/test/core/CMDBSource/DeadLockInjection.php b/test/php-unit-tests/tests/core/CMDBSource/DeadLockInjection.php similarity index 100% rename from test/core/CMDBSource/DeadLockInjection.php rename to test/php-unit-tests/tests/core/CMDBSource/DeadLockInjection.php diff --git a/test/core/CMDBSource/TransactionsTest.php b/test/php-unit-tests/tests/core/CMDBSource/TransactionsTest.php similarity index 100% rename from test/core/CMDBSource/TransactionsTest.php rename to test/php-unit-tests/tests/core/CMDBSource/TransactionsTest.php diff --git a/test/core/ConfigPlaceholdersResolverTest.php b/test/php-unit-tests/tests/core/ConfigPlaceholdersResolverTest.php similarity index 100% rename from test/core/ConfigPlaceholdersResolverTest.php rename to test/php-unit-tests/tests/core/ConfigPlaceholdersResolverTest.php diff --git a/test/core/ConfigTest.php b/test/php-unit-tests/tests/core/ConfigTest.php similarity index 100% rename from test/core/ConfigTest.php rename to test/php-unit-tests/tests/core/ConfigTest.php diff --git a/test/core/ConfigTest/config-itop-joker.php b/test/php-unit-tests/tests/core/ConfigTest/config-itop-joker.php similarity index 100% rename from test/core/ConfigTest/config-itop-joker.php rename to test/php-unit-tests/tests/core/ConfigTest/config-itop-joker.php diff --git a/test/core/ConfigTest/config-itop-var.php b/test/php-unit-tests/tests/core/ConfigTest/config-itop-var.php similarity index 100% rename from test/core/ConfigTest/config-itop-var.php rename to test/php-unit-tests/tests/core/ConfigTest/config-itop-var.php diff --git a/test/core/ConfigValidator/config-itop_KO_config_plus_code.php b/test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_config_plus_code.php similarity index 100% rename from test/core/ConfigValidator/config-itop_KO_config_plus_code.php rename to test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_config_plus_code.php diff --git a/test/core/ConfigValidator/config-itop_KO_function.php b/test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_function.php similarity index 100% rename from test/core/ConfigValidator/config-itop_KO_function.php rename to test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_function.php diff --git a/test/core/ConfigValidator/config-itop_VALID.php b/test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID.php similarity index 100% rename from test/core/ConfigValidator/config-itop_VALID.php rename to test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID.php diff --git a/test/core/ConfigValidator/config-itop_VALID_log-level-min_const.php b/test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php similarity index 100% rename from test/core/ConfigValidator/config-itop_VALID_log-level-min_const.php rename to test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php diff --git a/test/core/ConfigValidator/iTopConfigAstValidatorTest.php b/test/php-unit-tests/tests/core/ConfigValidator/iTopConfigAstValidatorTest.php similarity index 100% rename from test/core/ConfigValidator/iTopConfigAstValidatorTest.php rename to test/php-unit-tests/tests/core/ConfigValidator/iTopConfigAstValidatorTest.php diff --git a/test/core/DBObjectTest.php b/test/php-unit-tests/tests/core/DBObjectTest.php similarity index 100% rename from test/core/DBObjectTest.php rename to test/php-unit-tests/tests/core/DBObjectTest.php diff --git a/test/core/DBSearchCommitTest.php b/test/php-unit-tests/tests/core/DBSearchCommitTest.php similarity index 100% rename from test/core/DBSearchCommitTest.php rename to test/php-unit-tests/tests/core/DBSearchCommitTest.php diff --git a/test/core/DBSearchIntersectTest.php b/test/php-unit-tests/tests/core/DBSearchIntersectTest.php similarity index 100% rename from test/core/DBSearchIntersectTest.php rename to test/php-unit-tests/tests/core/DBSearchIntersectTest.php diff --git a/test/core/DBSearchJoinTest.php b/test/php-unit-tests/tests/core/DBSearchJoinTest.php similarity index 100% rename from test/core/DBSearchJoinTest.php rename to test/php-unit-tests/tests/core/DBSearchJoinTest.php diff --git a/test/core/DBSearchTest.php b/test/php-unit-tests/tests/core/DBSearchTest.php similarity index 100% rename from test/core/DBSearchTest.php rename to test/php-unit-tests/tests/core/DBSearchTest.php diff --git a/test/core/DBSearchUpdateRealiasingMapTest.php b/test/php-unit-tests/tests/core/DBSearchUpdateRealiasingMapTest.php similarity index 100% rename from test/core/DBSearchUpdateRealiasingMapTest.php rename to test/php-unit-tests/tests/core/DBSearchUpdateRealiasingMapTest.php diff --git a/test/core/ExpressionTest.php b/test/php-unit-tests/tests/core/ExpressionTest.php similarity index 100% rename from test/core/ExpressionTest.php rename to test/php-unit-tests/tests/core/ExpressionTest.php diff --git a/test/core/LogAPITest.php b/test/php-unit-tests/tests/core/LogAPITest.php similarity index 100% rename from test/core/LogAPITest.php rename to test/php-unit-tests/tests/core/LogAPITest.php diff --git a/test/core/LogFileNameBuilderTest.php b/test/php-unit-tests/tests/core/LogFileNameBuilderTest.php similarity index 100% rename from test/core/LogFileNameBuilderTest.php rename to test/php-unit-tests/tests/core/LogFileNameBuilderTest.php diff --git a/test/core/MetaModelTest.php b/test/php-unit-tests/tests/core/MetaModelTest.php similarity index 100% rename from test/core/MetaModelTest.php rename to test/php-unit-tests/tests/core/MetaModelTest.php diff --git a/test/core/OQLParserTest.php b/test/php-unit-tests/tests/core/OQLParserTest.php similarity index 100% rename from test/core/OQLParserTest.php rename to test/php-unit-tests/tests/core/OQLParserTest.php diff --git a/test/core/OQLTest.php b/test/php-unit-tests/tests/core/OQLTest.php similarity index 100% rename from test/core/OQLTest.php rename to test/php-unit-tests/tests/core/OQLTest.php diff --git a/test/core/TagSetFieldDataTest.php b/test/php-unit-tests/tests/core/TagSetFieldDataTest.php similarity index 100% rename from test/core/TagSetFieldDataTest.php rename to test/php-unit-tests/tests/core/TagSetFieldDataTest.php diff --git a/test/core/TriggerTest.php b/test/php-unit-tests/tests/core/TriggerTest.php similarity index 100% rename from test/core/TriggerTest.php rename to test/php-unit-tests/tests/core/TriggerTest.php diff --git a/test/core/UniquenessConstraintTest.php b/test/php-unit-tests/tests/core/UniquenessConstraintTest.php similarity index 100% rename from test/core/UniquenessConstraintTest.php rename to test/php-unit-tests/tests/core/UniquenessConstraintTest.php diff --git a/test/core/UserRightsTest.php b/test/php-unit-tests/tests/core/UserRightsTest.php similarity index 100% rename from test/core/UserRightsTest.php rename to test/php-unit-tests/tests/core/UserRightsTest.php diff --git a/test/core/WeeklyScheduledProcessMockConfig.php b/test/php-unit-tests/tests/core/WeeklyScheduledProcessMockConfig.php similarity index 100% rename from test/core/WeeklyScheduledProcessMockConfig.php rename to test/php-unit-tests/tests/core/WeeklyScheduledProcessMockConfig.php diff --git a/test/core/WeeklyScheduledProcessTest.php b/test/php-unit-tests/tests/core/WeeklyScheduledProcessTest.php similarity index 100% rename from test/core/WeeklyScheduledProcessTest.php rename to test/php-unit-tests/tests/core/WeeklyScheduledProcessTest.php diff --git a/test/core/apcEmulationTest.php b/test/php-unit-tests/tests/core/apcEmulationTest.php similarity index 100% rename from test/core/apcEmulationTest.php rename to test/php-unit-tests/tests/core/apcEmulationTest.php diff --git a/test/core/dictApcuTest.php b/test/php-unit-tests/tests/core/dictApcuTest.php similarity index 100% rename from test/core/dictApcuTest.php rename to test/php-unit-tests/tests/core/dictApcuTest.php diff --git a/test/core/dictTest.php b/test/php-unit-tests/tests/core/dictTest.php similarity index 100% rename from test/core/dictTest.php rename to test/php-unit-tests/tests/core/dictTest.php diff --git a/test/core/iTopConfigParserTest.php b/test/php-unit-tests/tests/core/iTopConfigParserTest.php similarity index 100% rename from test/core/iTopConfigParserTest.php rename to test/php-unit-tests/tests/core/iTopConfigParserTest.php diff --git a/test/core/mockApcEmulation.incphp b/test/php-unit-tests/tests/core/mockApcEmulation.incphp similarity index 100% rename from test/core/mockApcEmulation.incphp rename to test/php-unit-tests/tests/core/mockApcEmulation.incphp diff --git a/test/core/mockDict.incphp b/test/php-unit-tests/tests/core/mockDict.incphp similarity index 100% rename from test/core/mockDict.incphp rename to test/php-unit-tests/tests/core/mockDict.incphp diff --git a/test/core/ormLinkSetTest.php b/test/php-unit-tests/tests/core/ormLinkSetTest.php similarity index 100% rename from test/core/ormLinkSetTest.php rename to test/php-unit-tests/tests/core/ormLinkSetTest.php diff --git a/test/core/ormTagSetTest.php b/test/php-unit-tests/tests/core/ormTagSetTest.php similarity index 100% rename from test/core/ormTagSetTest.php rename to test/php-unit-tests/tests/core/ormTagSetTest.php diff --git a/test/core/sanitizer/AbstractDOMSanitizerTest.php b/test/php-unit-tests/tests/core/sanitizer/AbstractDOMSanitizerTest.php similarity index 100% rename from test/core/sanitizer/AbstractDOMSanitizerTest.php rename to test/php-unit-tests/tests/core/sanitizer/AbstractDOMSanitizerTest.php diff --git a/test/core/sanitizer/HTMLDOMSanitizerTest.php b/test/php-unit-tests/tests/core/sanitizer/HTMLDOMSanitizerTest.php similarity index 100% rename from test/core/sanitizer/HTMLDOMSanitizerTest.php rename to test/php-unit-tests/tests/core/sanitizer/HTMLDOMSanitizerTest.php diff --git a/test/core/sanitizer/InlineImageMock.php b/test/php-unit-tests/tests/core/sanitizer/InlineImageMock.php similarity index 100% rename from test/core/sanitizer/InlineImageMock.php rename to test/php-unit-tests/tests/core/sanitizer/InlineImageMock.php diff --git a/test/core/sanitizer/README.txt b/test/php-unit-tests/tests/core/sanitizer/README.txt similarity index 100% rename from test/core/sanitizer/README.txt rename to test/php-unit-tests/tests/core/sanitizer/README.txt diff --git a/test/core/sanitizer/SvgDOMSanitizerTest.php b/test/php-unit-tests/tests/core/sanitizer/SvgDOMSanitizerTest.php similarity index 100% rename from test/core/sanitizer/SvgDOMSanitizerTest.php rename to test/php-unit-tests/tests/core/sanitizer/SvgDOMSanitizerTest.php diff --git a/test/core/sanitizer/input/scripts.html b/test/php-unit-tests/tests/core/sanitizer/input/scripts.html similarity index 100% rename from test/core/sanitizer/input/scripts.html rename to test/php-unit-tests/tests/core/sanitizer/input/scripts.html diff --git a/test/core/sanitizer/input/scripts.svg b/test/php-unit-tests/tests/core/sanitizer/input/scripts.svg similarity index 100% rename from test/core/sanitizer/input/scripts.svg rename to test/php-unit-tests/tests/core/sanitizer/input/scripts.svg diff --git a/test/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt b/test/php-unit-tests/tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt similarity index 100% rename from test/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt rename to test/php-unit-tests/tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt diff --git a/test/core/sanitizer/input/whitelist_test.html b/test/php-unit-tests/tests/core/sanitizer/input/whitelist_test.html similarity index 100% rename from test/core/sanitizer/input/whitelist_test.html rename to test/php-unit-tests/tests/core/sanitizer/input/whitelist_test.html diff --git a/test/core/sanitizer/output/scripts.html b/test/php-unit-tests/tests/core/sanitizer/output/scripts.html similarity index 100% rename from test/core/sanitizer/output/scripts.html rename to test/php-unit-tests/tests/core/sanitizer/output/scripts.html diff --git a/test/core/sanitizer/output/scripts.svg b/test/php-unit-tests/tests/core/sanitizer/output/scripts.svg similarity index 100% rename from test/core/sanitizer/output/scripts.svg rename to test/php-unit-tests/tests/core/sanitizer/output/scripts.svg diff --git a/test/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt b/test/php-unit-tests/tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt similarity index 100% rename from test/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt rename to test/php-unit-tests/tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt diff --git a/test/coreExtensions/UserLocalTest.php b/test/php-unit-tests/tests/coreExtensions/UserLocalTest.php similarity index 100% rename from test/coreExtensions/UserLocalTest.php rename to test/php-unit-tests/tests/coreExtensions/UserLocalTest.php diff --git a/test/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php b/test/php-unit-tests/tests/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php similarity index 100% rename from test/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php rename to test/php-unit-tests/tests/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php diff --git a/test/itop-config/Validator/iTopConfigAstValidatorTest.php b/test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php similarity index 100% rename from test/itop-config/Validator/iTopConfigAstValidatorTest.php rename to test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php diff --git a/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php similarity index 100% rename from test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php rename to test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php diff --git a/test/itop-tickets/itopTicketTest.php b/test/php-unit-tests/tests/datamodels/2.x/itop-tickets/itopTicketTest.php similarity index 100% rename from test/itop-tickets/itopTicketTest.php rename to test/php-unit-tests/tests/datamodels/2.x/itop-tickets/itopTicketTest.php diff --git a/test/setup/DBBackupTest.php b/test/php-unit-tests/tests/setup/DBBackupTest.php similarity index 100% rename from test/setup/DBBackupTest.php rename to test/php-unit-tests/tests/setup/DBBackupTest.php diff --git a/test/setup/SetupUtilsTest.php b/test/php-unit-tests/tests/setup/SetupUtilsTest.php similarity index 100% rename from test/setup/SetupUtilsTest.php rename to test/php-unit-tests/tests/setup/SetupUtilsTest.php diff --git a/test/setup/iTopDesignFormat/1.7_to_1.6.expected.xml b/test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml similarity index 100% rename from test/setup/iTopDesignFormat/1.7_to_1.6.expected.xml rename to test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml diff --git a/test/setup/iTopDesignFormat/1.7_to_1.6.input.xml b/test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml similarity index 100% rename from test/setup/iTopDesignFormat/1.7_to_1.6.input.xml rename to test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml diff --git a/test/setup/iTopDesignFormat/iTopDesignFormatTest.php b/test/php-unit-tests/tests/setup/iTopDesignFormat/iTopDesignFormatTest.php similarity index 100% rename from test/setup/iTopDesignFormat/iTopDesignFormatTest.php rename to test/php-unit-tests/tests/setup/iTopDesignFormat/iTopDesignFormatTest.php diff --git a/test/status/StatusIncTest.php b/test/php-unit-tests/tests/status/StatusIncTest.php similarity index 100% rename from test/status/StatusIncTest.php rename to test/php-unit-tests/tests/status/StatusIncTest.php diff --git a/test/status/StatusTest.php b/test/php-unit-tests/tests/status/StatusTest.php similarity index 100% rename from test/status/StatusTest.php rename to test/php-unit-tests/tests/status/StatusTest.php diff --git a/test/status/status.php b/test/php-unit-tests/tests/status/status.php similarity index 100% rename from test/status/status.php rename to test/php-unit-tests/tests/status/status.php diff --git a/test/webservices/RestTest.php b/test/php-unit-tests/tests/webservices/RestTest.php similarity index 100% rename from test/webservices/RestTest.php rename to test/php-unit-tests/tests/webservices/RestTest.php diff --git a/test/unittestautoload.php b/test/php-unit-tests/unittestautoload.php similarity index 100% rename from test/unittestautoload.php rename to test/php-unit-tests/unittestautoload.php diff --git a/test/composer.lock b/tests/php-unit-tests/composer.lock similarity index 77% rename from test/composer.lock rename to tests/php-unit-tests/composer.lock index 1dadb48f1..28f127346 100644 --- a/test/composer.lock +++ b/tests/php-unit-tests/composer.lock @@ -247,233 +247,6 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "7.0.15", @@ -713,29 +486,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "4.0.4", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -760,7 +533,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3" }, "funding": [ { @@ -769,20 +542,20 @@ } ], "abandoned": true, - "time": "2020-08-04T08:28:15+00:00" + "time": "2021-07-26T12:15:06+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.26", + "version": "8.5.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ef117c59fc4c54a979021b26d08a3373e386606d" + "reference": "4fd448df9affda65a5faa58f8b93087d415216ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ef117c59fc4c54a979021b26d08a3373e386606d", - "reference": "ef117c59fc4c54a979021b26d08a3373e386606d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4fd448df9affda65a5faa58f8b93087d415216ce", + "reference": "4fd448df9affda65a5faa58f8b93087d415216ce", "shasum": "" }, "require": { @@ -797,24 +570,20 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", + "sebastian/comparator": "^3.0.5", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", + "sebastian/exporter": "^3.1.5", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", @@ -854,7 +623,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.26" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.30" }, "funding": [ { @@ -864,9 +633,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-04-01T12:34:39+00:00" + "time": "2022-09-25T03:43:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -925,16 +698,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -987,7 +760,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -995,7 +768,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -1128,16 +901,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -1193,7 +966,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -1201,7 +974,7 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", @@ -1635,88 +1408,6 @@ }, "time": "2021-01-04T13:25:10+00:00" }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-10-20T20:35:02+00:00" - }, { "name": "theseer/tokenizer", "version": "1.2.1", @@ -1766,64 +1457,6 @@ } ], "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], @@ -1833,5 +1466,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.1.0" } From c06cbfd4a934a795179803a5b0348bffc62354cb Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 13:21:28 +0200 Subject: [PATCH 02/19] =?UTF-8?q?N=C2=B05608=20-=20Rename=20"coreExtension?= =?UTF-8?q?s"=20test=20suite=20to=20correct=20datamodel=20module=20(authen?= =?UTF-8?q?t-local)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/php-unit-tests/phpunit.xml.dist | 6 +++--- .../2.x/authent-local}/UserLocalTest.php | 2 +- .../UserLocalTest/UserLocalPasswordPolicyMock.php | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename test/php-unit-tests/tests/{coreExtensions => datamodels/2.x/authent-local}/UserLocalTest.php (98%) rename test/php-unit-tests/tests/{coreExtensions => datamodels/2.x/authent-local}/UserLocalTest/UserLocalPasswordPolicyMock.php (100%) diff --git a/test/php-unit-tests/phpunit.xml.dist b/test/php-unit-tests/phpunit.xml.dist index 703b2b363..450a4cc2e 100644 --- a/test/php-unit-tests/phpunit.xml.dist +++ b/test/php-unit-tests/phpunit.xml.dist @@ -34,12 +34,12 @@ tests/core - - tests/coreExtensions - integration + + tests/datamodels/2.x/authent-local + tests/datamodels/2.x/itop-config diff --git a/test/php-unit-tests/tests/coreExtensions/UserLocalTest.php b/test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest.php similarity index 98% rename from test/php-unit-tests/tests/coreExtensions/UserLocalTest.php rename to test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest.php index 889a44813..b82eeee6b 100644 --- a/test/php-unit-tests/tests/coreExtensions/UserLocalTest.php +++ b/test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest.php @@ -25,7 +25,7 @@ class UserLocalTest extends ItopDataTestCase { parent::setUp(); - require_once(APPROOT.'test/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php'); + require_once(APPROOT.'test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php'); require_once(APPROOT.'env-production/authent-local/model.authent-local.php'); } diff --git a/test/php-unit-tests/tests/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php b/test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php similarity index 100% rename from test/php-unit-tests/tests/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php rename to test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php From a3e309acb515848f0b2ee1f703396610e4769407 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 14:31:53 +0200 Subject: [PATCH 03/19] =?UTF-8?q?N=C2=B05608=20-=20Revert=20"authent-local?= =?UTF-8?q?"=20test=20suite=20to=20its=20original=20rank=20as=20it=20is=20?= =?UTF-8?q?crashing=20the=20CI=20=F0=9F=A4=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/php-unit-tests/phpunit.xml.dist | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/php-unit-tests/phpunit.xml.dist b/test/php-unit-tests/phpunit.xml.dist index 450a4cc2e..6bc9513a3 100644 --- a/test/php-unit-tests/phpunit.xml.dist +++ b/test/php-unit-tests/phpunit.xml.dist @@ -34,12 +34,13 @@ tests/core - - integration - + tests/datamodels/2.x/authent-local + + integration + tests/datamodels/2.x/itop-config From d9539f9d01d23c335b3805fb755e975bb86cda61 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 19:55:44 +0200 Subject: [PATCH 04/19] =?UTF-8?q?N=C2=B05608=20-=20Add=20comments=20to=20m?= =?UTF-8?q?ain=20autoloader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/php-unit-tests/unittestautoload.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/php-unit-tests/unittestautoload.php b/test/php-unit-tests/unittestautoload.php index fcc03e10b..1e96a56bf 100644 --- a/test/php-unit-tests/unittestautoload.php +++ b/test/php-unit-tests/unittestautoload.php @@ -1,5 +1,9 @@ Date: Thu, 13 Oct 2022 20:04:48 +0200 Subject: [PATCH 05/19] =?UTF-8?q?N=C2=B05608=20-=20Rename=20"VisualTests"?= =?UTF-8?q?=20folder=20to=20match=20new=20convention?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attributeset_widget_poc.html | 0 test/{VisualTest => manual-visual-tests}/sanitize_test.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/{VisualTest => manual-visual-tests}/attributeset_widget_poc.html (100%) rename test/{VisualTest => manual-visual-tests}/sanitize_test.php (100%) diff --git a/test/VisualTest/attributeset_widget_poc.html b/test/manual-visual-tests/attributeset_widget_poc.html similarity index 100% rename from test/VisualTest/attributeset_widget_poc.html rename to test/manual-visual-tests/attributeset_widget_poc.html diff --git a/test/VisualTest/sanitize_test.php b/test/manual-visual-tests/sanitize_test.php similarity index 100% rename from test/VisualTest/sanitize_test.php rename to test/manual-visual-tests/sanitize_test.php From 4f88a0e7d2693ab49423e2d515911e3c149452ab Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 20:59:02 +0200 Subject: [PATCH 06/19] =?UTF-8?q?N=C2=B05608=20-=20Move=20legacy=20PHP=20u?= =?UTF-8?q?nit=20tests=20(not=20run=20by=20CI)=20to=20a=20dedicated=20fold?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/{ => php-unit-tests/legacy-tests}/GroupByAndFunctions.php | 2 +- test/{ => php-unit-tests/legacy-tests}/VerifyOQL.php | 2 +- test/{ => php-unit-tests/legacy-tests}/benchmark.php | 2 +- test/{ => php-unit-tests/legacy-tests}/build_test_oql.php | 2 +- test/{ => php-unit-tests/legacy-tests}/config-test-farm.php | 0 .../{ => php-unit-tests/legacy-tests}/display_cache_content.php | 2 +- test/{ => php-unit-tests/legacy-tests}/replay_query_log.php | 2 +- test/{ => php-unit-tests/legacy-tests}/test.class.inc.php | 0 test/{ => php-unit-tests/legacy-tests}/test.php | 2 +- test/{ => php-unit-tests/legacy-tests}/testlist.inc.php | 0 10 files changed, 7 insertions(+), 7 deletions(-) rename test/{ => php-unit-tests/legacy-tests}/GroupByAndFunctions.php (99%) rename test/{ => php-unit-tests/legacy-tests}/VerifyOQL.php (99%) rename test/{ => php-unit-tests/legacy-tests}/benchmark.php (99%) rename test/{ => php-unit-tests/legacy-tests}/build_test_oql.php (98%) rename test/{ => php-unit-tests/legacy-tests}/config-test-farm.php (100%) rename test/{ => php-unit-tests/legacy-tests}/display_cache_content.php (98%) rename test/{ => php-unit-tests/legacy-tests}/replay_query_log.php (99%) rename test/{ => php-unit-tests/legacy-tests}/test.class.inc.php (100%) rename test/{ => php-unit-tests/legacy-tests}/test.php (98%) rename test/{ => php-unit-tests/legacy-tests}/testlist.inc.php (100%) diff --git a/test/GroupByAndFunctions.php b/test/php-unit-tests/legacy-tests/GroupByAndFunctions.php similarity index 99% rename from test/GroupByAndFunctions.php rename to test/php-unit-tests/legacy-tests/GroupByAndFunctions.php index ffb1c4862..8806dd737 100644 --- a/test/GroupByAndFunctions.php +++ b/test/php-unit-tests/legacy-tests/GroupByAndFunctions.php @@ -17,7 +17,7 @@ * You should have received a copy of the GNU Affero General Public License */ -require_once ('../approot.inc.php'); +require_once ('../../../approot.inc.php'); require_once(APPROOT.'application/application.inc.php'); require_once(APPROOT.'application/itopwebpage.class.inc.php'); require_once(APPROOT.'application/startup.inc.php'); diff --git a/test/VerifyOQL.php b/test/php-unit-tests/legacy-tests/VerifyOQL.php similarity index 99% rename from test/VerifyOQL.php rename to test/php-unit-tests/legacy-tests/VerifyOQL.php index e9da8e82c..3d07eba31 100644 --- a/test/VerifyOQL.php +++ b/test/php-unit-tests/legacy-tests/VerifyOQL.php @@ -23,7 +23,7 @@ * You should have received a copy of the GNU Affero General Public License */ -require_once('../approot.inc.php'); +require_once('../../../approot.inc.php'); require_once(APPROOT.'/application/application.inc.php'); require_once(APPROOT.'/application/itopwebpage.class.inc.php'); require_once(APPROOT.'/application/startup.inc.php'); diff --git a/test/benchmark.php b/test/php-unit-tests/legacy-tests/benchmark.php similarity index 99% rename from test/benchmark.php rename to test/php-unit-tests/legacy-tests/benchmark.php index 1f5d9428e..26f5dbb70 100644 --- a/test/benchmark.php +++ b/test/php-unit-tests/legacy-tests/benchmark.php @@ -17,7 +17,7 @@ * You should have received a copy of the GNU Affero General Public License */ -require_once('../approot.inc.php'); +require_once('../../../approot.inc.php'); require_once(APPROOT.'/application/application.inc.php'); require_once(APPROOT.'/application/itopwebpage.class.inc.php'); require_once(APPROOT.'/application/wizardhelper.class.inc.php'); diff --git a/test/build_test_oql.php b/test/php-unit-tests/legacy-tests/build_test_oql.php similarity index 98% rename from test/build_test_oql.php rename to test/php-unit-tests/legacy-tests/build_test_oql.php index 417e2b9a5..109598ab1 100644 --- a/test/build_test_oql.php +++ b/test/php-unit-tests/legacy-tests/build_test_oql.php @@ -22,7 +22,7 @@ */ -require_once('../approot.inc.php'); +require_once('../../../approot.inc.php'); require_once(APPROOT.'application/startup.inc.php'); \LoginWebPage::DoLogin(true); diff --git a/test/config-test-farm.php b/test/php-unit-tests/legacy-tests/config-test-farm.php similarity index 100% rename from test/config-test-farm.php rename to test/php-unit-tests/legacy-tests/config-test-farm.php diff --git a/test/display_cache_content.php b/test/php-unit-tests/legacy-tests/display_cache_content.php similarity index 98% rename from test/display_cache_content.php rename to test/php-unit-tests/legacy-tests/display_cache_content.php index 6a22a85c6..2eaac1aaa 100644 --- a/test/display_cache_content.php +++ b/test/php-unit-tests/legacy-tests/display_cache_content.php @@ -21,7 +21,7 @@ * Date: 06/10/2017 */ -require_once('../approot.inc.php'); +require_once('../../../approot.inc.php'); require_once(APPROOT.'application/startup.inc.php'); diff --git a/test/replay_query_log.php b/test/php-unit-tests/legacy-tests/replay_query_log.php similarity index 99% rename from test/replay_query_log.php rename to test/php-unit-tests/legacy-tests/replay_query_log.php index fed149b0c..0a25dac65 100644 --- a/test/replay_query_log.php +++ b/test/php-unit-tests/legacy-tests/replay_query_log.php @@ -203,7 +203,7 @@ class QueryLogEntry // ///////////////////////////////////////////////////////////////////////////// -require_once('../approot.inc.php'); +require_once('../../../approot.inc.php'); require_once(APPROOT.'/application/application.inc.php'); require_once(APPROOT.'/application/ajaxwebpage.class.inc.php'); diff --git a/test/test.class.inc.php b/test/php-unit-tests/legacy-tests/test.class.inc.php similarity index 100% rename from test/test.class.inc.php rename to test/php-unit-tests/legacy-tests/test.class.inc.php diff --git a/test/test.php b/test/php-unit-tests/legacy-tests/test.php similarity index 98% rename from test/test.php rename to test/php-unit-tests/legacy-tests/test.php index 1db1c24e4..26a9aae1b 100644 --- a/test/test.php +++ b/test/php-unit-tests/legacy-tests/test.php @@ -85,7 +85,7 @@ function DisplayEvents($aEvents, $sTitle) date_default_timezone_set('Europe/Paris'); -require_once('../approot.inc.php'); +require_once('../../../approot.inc.php'); require_once(APPROOT.'/application/utils.inc.php'); require_once('./test.class.inc.php'); require_once('./testlist.inc.php'); diff --git a/test/testlist.inc.php b/test/php-unit-tests/legacy-tests/testlist.inc.php similarity index 100% rename from test/testlist.inc.php rename to test/php-unit-tests/legacy-tests/testlist.inc.php From e8bf9cf6881d6d45dcce2668aceab2bfdfe0460a Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 21:08:59 +0200 Subject: [PATCH 07/19] =?UTF-8?q?N=C2=B05608=20-=20Move=20"twig"=20PHP=20u?= =?UTF-8?q?nit=20test=20to=20new=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notice: Test was not working, still not working --- .../tests/sources/application/TwigBase/Twig}/TwigTest.php | 0 .../tests/sources/application/TwigBase/Twig}/attacker/backdoor | 0 .../tests/sources/application/TwigBase/Twig}/test.html | 0 .../tests/sources/application/TwigBase/Twig}/test.html.twig | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename test/{twig => php-unit-tests/tests/sources/application/TwigBase/Twig}/TwigTest.php (100%) rename test/{twig => php-unit-tests/tests/sources/application/TwigBase/Twig}/attacker/backdoor (100%) rename test/{twig => php-unit-tests/tests/sources/application/TwigBase/Twig}/test.html (100%) rename test/{twig => php-unit-tests/tests/sources/application/TwigBase/Twig}/test.html.twig (100%) diff --git a/test/twig/TwigTest.php b/test/php-unit-tests/tests/sources/application/TwigBase/Twig/TwigTest.php similarity index 100% rename from test/twig/TwigTest.php rename to test/php-unit-tests/tests/sources/application/TwigBase/Twig/TwigTest.php diff --git a/test/twig/attacker/backdoor b/test/php-unit-tests/tests/sources/application/TwigBase/Twig/attacker/backdoor similarity index 100% rename from test/twig/attacker/backdoor rename to test/php-unit-tests/tests/sources/application/TwigBase/Twig/attacker/backdoor diff --git a/test/twig/test.html b/test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html similarity index 100% rename from test/twig/test.html rename to test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html diff --git a/test/twig/test.html.twig b/test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html.twig similarity index 100% rename from test/twig/test.html.twig rename to test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html.twig From 471f66649a90a45ad6920562fce950f1e4ee5a0f Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 21:44:29 +0200 Subject: [PATCH 08/19] =?UTF-8?q?N=C2=B05608=20-=20Rename=20unitary=20test?= =?UTF-8?q?=20folders=20for=20better=20understanding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DictionariesConsistencyTest.php | 0 .../iTopModulesPhpVersionChecklistTest.php | 0 .../iTopModulesXmlVersionChecklistTest.php | 0 test/php-unit-tests/phpunit.xml.dist | 18 +++++++++--------- .../SetupCssIntegrityChecklistTest.php | 0 .../iTopDesignFormatChecklistTest.php | 0 .../iTopModuleXmlInstallationChecklistTest.php | 0 .../postbuild_integration.xml.dist | 2 +- .../application/DashboardLayoutTest.php | 0 .../application/UtilsTest.php | 0 .../application/composer/iTopComposerTest.php | 0 .../application/privUITransactionFileTest.php | 0 .../search/CriterionConversionTest.php | 0 .../application/search/CriterionParserTest.php | 0 .../application/search/SearchFormTest.php | 0 .../core/BulkChangeTest.inc.php | 0 .../core/CMDBObjectTest.php | 0 .../core/CMDBSource/CMDBSourceTest.php | 0 .../core/CMDBSource/DeadLockInjection.php | 0 .../core/CMDBSource/TransactionsTest.php | 0 .../core/ConfigPlaceholdersResolverTest.php | 0 .../core/ConfigTest.php | 0 .../core/ConfigTest/config-itop-joker.php | 0 .../core/ConfigTest/config-itop-var.php | 0 .../config-itop_KO_config_plus_code.php | 0 .../config-itop_KO_function.php | 0 .../core/ConfigValidator/config-itop_VALID.php | 0 .../config-itop_VALID_log-level-min_const.php | 0 .../iTopConfigAstValidatorTest.php | 0 .../core/DBObjectTest.php | 0 .../core/DBSearchCommitTest.php | 0 .../core/DBSearchIntersectTest.php | 0 .../core/DBSearchJoinTest.php | 0 .../core/DBSearchTest.php | 0 .../core/DBSearchUpdateRealiasingMapTest.php | 0 .../core/ExpressionTest.php | 0 .../core/LogAPITest.php | 0 .../core/LogFileNameBuilderTest.php | 0 .../core/MetaModelTest.php | 0 .../core/OQLParserTest.php | 0 .../{tests => unitary-tests}/core/OQLTest.php | 0 .../core/TagSetFieldDataTest.php | 0 .../core/TriggerTest.php | 0 .../core/UniquenessConstraintTest.php | 0 .../core/UserRightsTest.php | 0 .../core/WeeklyScheduledProcessMockConfig.php | 0 .../core/WeeklyScheduledProcessTest.php | 0 .../core/apcEmulationTest.php | 0 .../core/dictApcuTest.php | 0 .../{tests => unitary-tests}/core/dictTest.php | 0 .../core/iTopConfigParserTest.php | 0 .../core/mockApcEmulation.incphp | 0 .../core/mockDict.incphp | 0 .../core/ormLinkSetTest.php | 0 .../core/ormTagSetTest.php | 0 .../sanitizer/AbstractDOMSanitizerTest.php | 0 .../core/sanitizer/HTMLDOMSanitizerTest.php | 0 .../core/sanitizer/InlineImageMock.php | 0 .../core/sanitizer/README.txt | 0 .../core/sanitizer/SvgDOMSanitizerTest.php | 0 .../core/sanitizer/input/scripts.html | 0 .../core/sanitizer/input/scripts.svg | 0 .../utf-8_wrong_character_email_truncated.txt | 0 .../core/sanitizer/input/whitelist_test.html | 0 .../core/sanitizer/output/scripts.html | 0 .../core/sanitizer/output/scripts.svg | 0 .../utf-8_wrong_character_email_truncated.txt | 0 .../2.x/authent-local/UserLocalTest.php | 0 .../UserLocalPasswordPolicyMock.php | 0 .../Validator/iTopConfigAstValidatorTest.php | 0 .../iTopConfigSyntaxValidatorTest.php | 0 .../2.x/itop-tickets/itopTicketTest.php | 0 .../setup/DBBackupTest.php | 0 .../setup/SetupUtilsTest.php | 0 .../iTopDesignFormat/1.7_to_1.6.expected.xml | 0 .../iTopDesignFormat/1.7_to_1.6.input.xml | 0 .../iTopDesignFormat/iTopDesignFormatTest.php | 0 .../application/TwigBase/Twig/TwigTest.php | 0 .../TwigBase/Twig/attacker/backdoor | 0 .../application/TwigBase/Twig/test.html | 0 .../application/TwigBase/Twig/test.html.twig | 0 .../status/StatusIncTest.php | 0 .../status/StatusTest.php | 0 .../{tests => unitary-tests}/status/status.php | 0 .../webservices/RestTest.php | 0 85 files changed, 10 insertions(+), 10 deletions(-) rename test/php-unit-tests/{integration => integration-tests}/DictionariesConsistencyTest.php (100%) rename test/php-unit-tests/{integration => integration-tests}/iTopModulesPhpVersionChecklistTest.php (100%) rename test/php-unit-tests/{integration => integration-tests}/iTopModulesXmlVersionChecklistTest.php (100%) rename test/php-unit-tests/{postbuild_integration => post-build-integration-tests}/SetupCssIntegrityChecklistTest.php (100%) rename test/php-unit-tests/{postbuild_integration => post-build-integration-tests}/iTopDesignFormatChecklistTest.php (100%) rename test/php-unit-tests/{postbuild_integration => post-build-integration-tests}/iTopModuleXmlInstallationChecklistTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/application/DashboardLayoutTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/application/UtilsTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/application/composer/iTopComposerTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/application/privUITransactionFileTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/application/search/CriterionConversionTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/application/search/CriterionParserTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/application/search/SearchFormTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/BulkChangeTest.inc.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/CMDBObjectTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/CMDBSource/CMDBSourceTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/CMDBSource/DeadLockInjection.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/CMDBSource/TransactionsTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigPlaceholdersResolverTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigTest/config-itop-joker.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigTest/config-itop-var.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigValidator/config-itop_KO_config_plus_code.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigValidator/config-itop_KO_function.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigValidator/config-itop_VALID.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigValidator/config-itop_VALID_log-level-min_const.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ConfigValidator/iTopConfigAstValidatorTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/DBObjectTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/DBSearchCommitTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/DBSearchIntersectTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/DBSearchJoinTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/DBSearchTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/DBSearchUpdateRealiasingMapTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ExpressionTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/LogAPITest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/LogFileNameBuilderTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/MetaModelTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/OQLParserTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/OQLTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/TagSetFieldDataTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/TriggerTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/UniquenessConstraintTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/UserRightsTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/WeeklyScheduledProcessMockConfig.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/WeeklyScheduledProcessTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/apcEmulationTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/dictApcuTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/dictTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/iTopConfigParserTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/mockApcEmulation.incphp (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/mockDict.incphp (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ormLinkSetTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/ormTagSetTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/AbstractDOMSanitizerTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/HTMLDOMSanitizerTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/InlineImageMock.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/README.txt (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/SvgDOMSanitizerTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/input/scripts.html (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/input/scripts.svg (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/input/whitelist_test.html (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/output/scripts.html (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/output/scripts.svg (100%) rename test/php-unit-tests/{tests => unitary-tests}/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt (100%) rename test/php-unit-tests/{tests => unitary-tests}/datamodels/2.x/authent-local/UserLocalTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/datamodels/2.x/itop-tickets/itopTicketTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/setup/DBBackupTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/setup/SetupUtilsTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/setup/iTopDesignFormat/1.7_to_1.6.expected.xml (100%) rename test/php-unit-tests/{tests => unitary-tests}/setup/iTopDesignFormat/1.7_to_1.6.input.xml (100%) rename test/php-unit-tests/{tests => unitary-tests}/setup/iTopDesignFormat/iTopDesignFormatTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/sources/application/TwigBase/Twig/TwigTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/sources/application/TwigBase/Twig/attacker/backdoor (100%) rename test/php-unit-tests/{tests => unitary-tests}/sources/application/TwigBase/Twig/test.html (100%) rename test/php-unit-tests/{tests => unitary-tests}/sources/application/TwigBase/Twig/test.html.twig (100%) rename test/php-unit-tests/{tests => unitary-tests}/status/StatusIncTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/status/StatusTest.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/status/status.php (100%) rename test/php-unit-tests/{tests => unitary-tests}/webservices/RestTest.php (100%) diff --git a/test/php-unit-tests/integration/DictionariesConsistencyTest.php b/test/php-unit-tests/integration-tests/DictionariesConsistencyTest.php similarity index 100% rename from test/php-unit-tests/integration/DictionariesConsistencyTest.php rename to test/php-unit-tests/integration-tests/DictionariesConsistencyTest.php diff --git a/test/php-unit-tests/integration/iTopModulesPhpVersionChecklistTest.php b/test/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php similarity index 100% rename from test/php-unit-tests/integration/iTopModulesPhpVersionChecklistTest.php rename to test/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php diff --git a/test/php-unit-tests/integration/iTopModulesXmlVersionChecklistTest.php b/test/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php similarity index 100% rename from test/php-unit-tests/integration/iTopModulesXmlVersionChecklistTest.php rename to test/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php diff --git a/test/php-unit-tests/phpunit.xml.dist b/test/php-unit-tests/phpunit.xml.dist index 6bc9513a3..ea11c8160 100644 --- a/test/php-unit-tests/phpunit.xml.dist +++ b/test/php-unit-tests/phpunit.xml.dist @@ -29,32 +29,32 @@ - tests/application + unitary-tests/application - tests/core + unitary-tests/core - tests/datamodels/2.x/authent-local + unitary-tests/datamodels/2.x/authent-local - integration + integration-tests - tests/datamodels/2.x/itop-config + unitary-tests/datamodels/2.x/itop-config - tests/datamodels/2.x/itop-tickets + unitary-tests/datamodels/2.x/itop-tickets - tests/setup + unitary-tests/setup - tests/status + unitary-tests/status - tests/webservices + unitary-tests/webservices diff --git a/test/php-unit-tests/postbuild_integration/SetupCssIntegrityChecklistTest.php b/test/php-unit-tests/post-build-integration-tests/SetupCssIntegrityChecklistTest.php similarity index 100% rename from test/php-unit-tests/postbuild_integration/SetupCssIntegrityChecklistTest.php rename to test/php-unit-tests/post-build-integration-tests/SetupCssIntegrityChecklistTest.php diff --git a/test/php-unit-tests/postbuild_integration/iTopDesignFormatChecklistTest.php b/test/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php similarity index 100% rename from test/php-unit-tests/postbuild_integration/iTopDesignFormatChecklistTest.php rename to test/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php diff --git a/test/php-unit-tests/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php b/test/php-unit-tests/post-build-integration-tests/iTopModuleXmlInstallationChecklistTest.php similarity index 100% rename from test/php-unit-tests/postbuild_integration/iTopModuleXmlInstallationChecklistTest.php rename to test/php-unit-tests/post-build-integration-tests/iTopModuleXmlInstallationChecklistTest.php diff --git a/test/php-unit-tests/postbuild_integration.xml.dist b/test/php-unit-tests/postbuild_integration.xml.dist index 2032e204e..b45e634bb 100644 --- a/test/php-unit-tests/postbuild_integration.xml.dist +++ b/test/php-unit-tests/postbuild_integration.xml.dist @@ -27,7 +27,7 @@ - postbuild_integration + post-build-integration-tests diff --git a/test/php-unit-tests/tests/application/DashboardLayoutTest.php b/test/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php similarity index 100% rename from test/php-unit-tests/tests/application/DashboardLayoutTest.php rename to test/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php diff --git a/test/php-unit-tests/tests/application/UtilsTest.php b/test/php-unit-tests/unitary-tests/application/UtilsTest.php similarity index 100% rename from test/php-unit-tests/tests/application/UtilsTest.php rename to test/php-unit-tests/unitary-tests/application/UtilsTest.php diff --git a/test/php-unit-tests/tests/application/composer/iTopComposerTest.php b/test/php-unit-tests/unitary-tests/application/composer/iTopComposerTest.php similarity index 100% rename from test/php-unit-tests/tests/application/composer/iTopComposerTest.php rename to test/php-unit-tests/unitary-tests/application/composer/iTopComposerTest.php diff --git a/test/php-unit-tests/tests/application/privUITransactionFileTest.php b/test/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php similarity index 100% rename from test/php-unit-tests/tests/application/privUITransactionFileTest.php rename to test/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php diff --git a/test/php-unit-tests/tests/application/search/CriterionConversionTest.php b/test/php-unit-tests/unitary-tests/application/search/CriterionConversionTest.php similarity index 100% rename from test/php-unit-tests/tests/application/search/CriterionConversionTest.php rename to test/php-unit-tests/unitary-tests/application/search/CriterionConversionTest.php diff --git a/test/php-unit-tests/tests/application/search/CriterionParserTest.php b/test/php-unit-tests/unitary-tests/application/search/CriterionParserTest.php similarity index 100% rename from test/php-unit-tests/tests/application/search/CriterionParserTest.php rename to test/php-unit-tests/unitary-tests/application/search/CriterionParserTest.php diff --git a/test/php-unit-tests/tests/application/search/SearchFormTest.php b/test/php-unit-tests/unitary-tests/application/search/SearchFormTest.php similarity index 100% rename from test/php-unit-tests/tests/application/search/SearchFormTest.php rename to test/php-unit-tests/unitary-tests/application/search/SearchFormTest.php diff --git a/test/php-unit-tests/tests/core/BulkChangeTest.inc.php b/test/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php similarity index 100% rename from test/php-unit-tests/tests/core/BulkChangeTest.inc.php rename to test/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php diff --git a/test/php-unit-tests/tests/core/CMDBObjectTest.php b/test/php-unit-tests/unitary-tests/core/CMDBObjectTest.php similarity index 100% rename from test/php-unit-tests/tests/core/CMDBObjectTest.php rename to test/php-unit-tests/unitary-tests/core/CMDBObjectTest.php diff --git a/test/php-unit-tests/tests/core/CMDBSource/CMDBSourceTest.php b/test/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php similarity index 100% rename from test/php-unit-tests/tests/core/CMDBSource/CMDBSourceTest.php rename to test/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php diff --git a/test/php-unit-tests/tests/core/CMDBSource/DeadLockInjection.php b/test/php-unit-tests/unitary-tests/core/CMDBSource/DeadLockInjection.php similarity index 100% rename from test/php-unit-tests/tests/core/CMDBSource/DeadLockInjection.php rename to test/php-unit-tests/unitary-tests/core/CMDBSource/DeadLockInjection.php diff --git a/test/php-unit-tests/tests/core/CMDBSource/TransactionsTest.php b/test/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php similarity index 100% rename from test/php-unit-tests/tests/core/CMDBSource/TransactionsTest.php rename to test/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php diff --git a/test/php-unit-tests/tests/core/ConfigPlaceholdersResolverTest.php b/test/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigPlaceholdersResolverTest.php rename to test/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php diff --git a/test/php-unit-tests/tests/core/ConfigTest.php b/test/php-unit-tests/unitary-tests/core/ConfigTest.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigTest.php rename to test/php-unit-tests/unitary-tests/core/ConfigTest.php diff --git a/test/php-unit-tests/tests/core/ConfigTest/config-itop-joker.php b/test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigTest/config-itop-joker.php rename to test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php diff --git a/test/php-unit-tests/tests/core/ConfigTest/config-itop-var.php b/test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigTest/config-itop-var.php rename to test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php diff --git a/test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_config_plus_code.php b/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_config_plus_code.php rename to test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php diff --git a/test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_function.php b/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigValidator/config-itop_KO_function.php rename to test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php diff --git a/test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID.php b/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID.php rename to test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID.php diff --git a/test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php b/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php rename to test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php diff --git a/test/php-unit-tests/tests/core/ConfigValidator/iTopConfigAstValidatorTest.php b/test/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php similarity index 100% rename from test/php-unit-tests/tests/core/ConfigValidator/iTopConfigAstValidatorTest.php rename to test/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php diff --git a/test/php-unit-tests/tests/core/DBObjectTest.php b/test/php-unit-tests/unitary-tests/core/DBObjectTest.php similarity index 100% rename from test/php-unit-tests/tests/core/DBObjectTest.php rename to test/php-unit-tests/unitary-tests/core/DBObjectTest.php diff --git a/test/php-unit-tests/tests/core/DBSearchCommitTest.php b/test/php-unit-tests/unitary-tests/core/DBSearchCommitTest.php similarity index 100% rename from test/php-unit-tests/tests/core/DBSearchCommitTest.php rename to test/php-unit-tests/unitary-tests/core/DBSearchCommitTest.php diff --git a/test/php-unit-tests/tests/core/DBSearchIntersectTest.php b/test/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php similarity index 100% rename from test/php-unit-tests/tests/core/DBSearchIntersectTest.php rename to test/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php diff --git a/test/php-unit-tests/tests/core/DBSearchJoinTest.php b/test/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php similarity index 100% rename from test/php-unit-tests/tests/core/DBSearchJoinTest.php rename to test/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php diff --git a/test/php-unit-tests/tests/core/DBSearchTest.php b/test/php-unit-tests/unitary-tests/core/DBSearchTest.php similarity index 100% rename from test/php-unit-tests/tests/core/DBSearchTest.php rename to test/php-unit-tests/unitary-tests/core/DBSearchTest.php diff --git a/test/php-unit-tests/tests/core/DBSearchUpdateRealiasingMapTest.php b/test/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php similarity index 100% rename from test/php-unit-tests/tests/core/DBSearchUpdateRealiasingMapTest.php rename to test/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php diff --git a/test/php-unit-tests/tests/core/ExpressionTest.php b/test/php-unit-tests/unitary-tests/core/ExpressionTest.php similarity index 100% rename from test/php-unit-tests/tests/core/ExpressionTest.php rename to test/php-unit-tests/unitary-tests/core/ExpressionTest.php diff --git a/test/php-unit-tests/tests/core/LogAPITest.php b/test/php-unit-tests/unitary-tests/core/LogAPITest.php similarity index 100% rename from test/php-unit-tests/tests/core/LogAPITest.php rename to test/php-unit-tests/unitary-tests/core/LogAPITest.php diff --git a/test/php-unit-tests/tests/core/LogFileNameBuilderTest.php b/test/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php similarity index 100% rename from test/php-unit-tests/tests/core/LogFileNameBuilderTest.php rename to test/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php diff --git a/test/php-unit-tests/tests/core/MetaModelTest.php b/test/php-unit-tests/unitary-tests/core/MetaModelTest.php similarity index 100% rename from test/php-unit-tests/tests/core/MetaModelTest.php rename to test/php-unit-tests/unitary-tests/core/MetaModelTest.php diff --git a/test/php-unit-tests/tests/core/OQLParserTest.php b/test/php-unit-tests/unitary-tests/core/OQLParserTest.php similarity index 100% rename from test/php-unit-tests/tests/core/OQLParserTest.php rename to test/php-unit-tests/unitary-tests/core/OQLParserTest.php diff --git a/test/php-unit-tests/tests/core/OQLTest.php b/test/php-unit-tests/unitary-tests/core/OQLTest.php similarity index 100% rename from test/php-unit-tests/tests/core/OQLTest.php rename to test/php-unit-tests/unitary-tests/core/OQLTest.php diff --git a/test/php-unit-tests/tests/core/TagSetFieldDataTest.php b/test/php-unit-tests/unitary-tests/core/TagSetFieldDataTest.php similarity index 100% rename from test/php-unit-tests/tests/core/TagSetFieldDataTest.php rename to test/php-unit-tests/unitary-tests/core/TagSetFieldDataTest.php diff --git a/test/php-unit-tests/tests/core/TriggerTest.php b/test/php-unit-tests/unitary-tests/core/TriggerTest.php similarity index 100% rename from test/php-unit-tests/tests/core/TriggerTest.php rename to test/php-unit-tests/unitary-tests/core/TriggerTest.php diff --git a/test/php-unit-tests/tests/core/UniquenessConstraintTest.php b/test/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php similarity index 100% rename from test/php-unit-tests/tests/core/UniquenessConstraintTest.php rename to test/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php diff --git a/test/php-unit-tests/tests/core/UserRightsTest.php b/test/php-unit-tests/unitary-tests/core/UserRightsTest.php similarity index 100% rename from test/php-unit-tests/tests/core/UserRightsTest.php rename to test/php-unit-tests/unitary-tests/core/UserRightsTest.php diff --git a/test/php-unit-tests/tests/core/WeeklyScheduledProcessMockConfig.php b/test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php similarity index 100% rename from test/php-unit-tests/tests/core/WeeklyScheduledProcessMockConfig.php rename to test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php diff --git a/test/php-unit-tests/tests/core/WeeklyScheduledProcessTest.php b/test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php similarity index 100% rename from test/php-unit-tests/tests/core/WeeklyScheduledProcessTest.php rename to test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php diff --git a/test/php-unit-tests/tests/core/apcEmulationTest.php b/test/php-unit-tests/unitary-tests/core/apcEmulationTest.php similarity index 100% rename from test/php-unit-tests/tests/core/apcEmulationTest.php rename to test/php-unit-tests/unitary-tests/core/apcEmulationTest.php diff --git a/test/php-unit-tests/tests/core/dictApcuTest.php b/test/php-unit-tests/unitary-tests/core/dictApcuTest.php similarity index 100% rename from test/php-unit-tests/tests/core/dictApcuTest.php rename to test/php-unit-tests/unitary-tests/core/dictApcuTest.php diff --git a/test/php-unit-tests/tests/core/dictTest.php b/test/php-unit-tests/unitary-tests/core/dictTest.php similarity index 100% rename from test/php-unit-tests/tests/core/dictTest.php rename to test/php-unit-tests/unitary-tests/core/dictTest.php diff --git a/test/php-unit-tests/tests/core/iTopConfigParserTest.php b/test/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php similarity index 100% rename from test/php-unit-tests/tests/core/iTopConfigParserTest.php rename to test/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php diff --git a/test/php-unit-tests/tests/core/mockApcEmulation.incphp b/test/php-unit-tests/unitary-tests/core/mockApcEmulation.incphp similarity index 100% rename from test/php-unit-tests/tests/core/mockApcEmulation.incphp rename to test/php-unit-tests/unitary-tests/core/mockApcEmulation.incphp diff --git a/test/php-unit-tests/tests/core/mockDict.incphp b/test/php-unit-tests/unitary-tests/core/mockDict.incphp similarity index 100% rename from test/php-unit-tests/tests/core/mockDict.incphp rename to test/php-unit-tests/unitary-tests/core/mockDict.incphp diff --git a/test/php-unit-tests/tests/core/ormLinkSetTest.php b/test/php-unit-tests/unitary-tests/core/ormLinkSetTest.php similarity index 100% rename from test/php-unit-tests/tests/core/ormLinkSetTest.php rename to test/php-unit-tests/unitary-tests/core/ormLinkSetTest.php diff --git a/test/php-unit-tests/tests/core/ormTagSetTest.php b/test/php-unit-tests/unitary-tests/core/ormTagSetTest.php similarity index 100% rename from test/php-unit-tests/tests/core/ormTagSetTest.php rename to test/php-unit-tests/unitary-tests/core/ormTagSetTest.php diff --git a/test/php-unit-tests/tests/core/sanitizer/AbstractDOMSanitizerTest.php b/test/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/AbstractDOMSanitizerTest.php rename to test/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php diff --git a/test/php-unit-tests/tests/core/sanitizer/HTMLDOMSanitizerTest.php b/test/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/HTMLDOMSanitizerTest.php rename to test/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php diff --git a/test/php-unit-tests/tests/core/sanitizer/InlineImageMock.php b/test/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/InlineImageMock.php rename to test/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php diff --git a/test/php-unit-tests/tests/core/sanitizer/README.txt b/test/php-unit-tests/unitary-tests/core/sanitizer/README.txt similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/README.txt rename to test/php-unit-tests/unitary-tests/core/sanitizer/README.txt diff --git a/test/php-unit-tests/tests/core/sanitizer/SvgDOMSanitizerTest.php b/test/php-unit-tests/unitary-tests/core/sanitizer/SvgDOMSanitizerTest.php similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/SvgDOMSanitizerTest.php rename to test/php-unit-tests/unitary-tests/core/sanitizer/SvgDOMSanitizerTest.php diff --git a/test/php-unit-tests/tests/core/sanitizer/input/scripts.html b/test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.html similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/input/scripts.html rename to test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.html diff --git a/test/php-unit-tests/tests/core/sanitizer/input/scripts.svg b/test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.svg similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/input/scripts.svg rename to test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.svg diff --git a/test/php-unit-tests/tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt b/test/php-unit-tests/unitary-tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt rename to test/php-unit-tests/unitary-tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt diff --git a/test/php-unit-tests/tests/core/sanitizer/input/whitelist_test.html b/test/php-unit-tests/unitary-tests/core/sanitizer/input/whitelist_test.html similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/input/whitelist_test.html rename to test/php-unit-tests/unitary-tests/core/sanitizer/input/whitelist_test.html diff --git a/test/php-unit-tests/tests/core/sanitizer/output/scripts.html b/test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.html similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/output/scripts.html rename to test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.html diff --git a/test/php-unit-tests/tests/core/sanitizer/output/scripts.svg b/test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.svg similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/output/scripts.svg rename to test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.svg diff --git a/test/php-unit-tests/tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt b/test/php-unit-tests/unitary-tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt similarity index 100% rename from test/php-unit-tests/tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt rename to test/php-unit-tests/unitary-tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt diff --git a/test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest.php b/test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php similarity index 100% rename from test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest.php rename to test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php diff --git a/test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php b/test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php similarity index 100% rename from test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php rename to test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php diff --git a/test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php b/test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php similarity index 100% rename from test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php rename to test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php diff --git a/test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php similarity index 100% rename from test/php-unit-tests/tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php rename to test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php diff --git a/test/php-unit-tests/tests/datamodels/2.x/itop-tickets/itopTicketTest.php b/test/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php similarity index 100% rename from test/php-unit-tests/tests/datamodels/2.x/itop-tickets/itopTicketTest.php rename to test/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php diff --git a/test/php-unit-tests/tests/setup/DBBackupTest.php b/test/php-unit-tests/unitary-tests/setup/DBBackupTest.php similarity index 100% rename from test/php-unit-tests/tests/setup/DBBackupTest.php rename to test/php-unit-tests/unitary-tests/setup/DBBackupTest.php diff --git a/test/php-unit-tests/tests/setup/SetupUtilsTest.php b/test/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php similarity index 100% rename from test/php-unit-tests/tests/setup/SetupUtilsTest.php rename to test/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php diff --git a/test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml b/test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml similarity index 100% rename from test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml rename to test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml diff --git a/test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml b/test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml similarity index 100% rename from test/php-unit-tests/tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml rename to test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml diff --git a/test/php-unit-tests/tests/setup/iTopDesignFormat/iTopDesignFormatTest.php b/test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php similarity index 100% rename from test/php-unit-tests/tests/setup/iTopDesignFormat/iTopDesignFormatTest.php rename to test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php diff --git a/test/php-unit-tests/tests/sources/application/TwigBase/Twig/TwigTest.php b/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php similarity index 100% rename from test/php-unit-tests/tests/sources/application/TwigBase/Twig/TwigTest.php rename to test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php diff --git a/test/php-unit-tests/tests/sources/application/TwigBase/Twig/attacker/backdoor b/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/attacker/backdoor similarity index 100% rename from test/php-unit-tests/tests/sources/application/TwigBase/Twig/attacker/backdoor rename to test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/attacker/backdoor diff --git a/test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html b/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html similarity index 100% rename from test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html rename to test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html diff --git a/test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html.twig b/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html.twig similarity index 100% rename from test/php-unit-tests/tests/sources/application/TwigBase/Twig/test.html.twig rename to test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html.twig diff --git a/test/php-unit-tests/tests/status/StatusIncTest.php b/test/php-unit-tests/unitary-tests/status/StatusIncTest.php similarity index 100% rename from test/php-unit-tests/tests/status/StatusIncTest.php rename to test/php-unit-tests/unitary-tests/status/StatusIncTest.php diff --git a/test/php-unit-tests/tests/status/StatusTest.php b/test/php-unit-tests/unitary-tests/status/StatusTest.php similarity index 100% rename from test/php-unit-tests/tests/status/StatusTest.php rename to test/php-unit-tests/unitary-tests/status/StatusTest.php diff --git a/test/php-unit-tests/tests/status/status.php b/test/php-unit-tests/unitary-tests/status/status.php similarity index 100% rename from test/php-unit-tests/tests/status/status.php rename to test/php-unit-tests/unitary-tests/status/status.php diff --git a/test/php-unit-tests/tests/webservices/RestTest.php b/test/php-unit-tests/unitary-tests/webservices/RestTest.php similarity index 100% rename from test/php-unit-tests/tests/webservices/RestTest.php rename to test/php-unit-tests/unitary-tests/webservices/RestTest.php From 0998c73a1a94c08486ff6d6bca58b841461647f1 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 21:57:41 +0200 Subject: [PATCH 09/19] =?UTF-8?q?N=C2=B05608=20-=20Add=20README=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/php-unit-tests/README.md | 6 ++++++ test/php-unit-tests/legacy-tests/README.md | 1 + 2 files changed, 7 insertions(+) create mode 100644 test/php-unit-tests/README.md create mode 100644 test/php-unit-tests/legacy-tests/README.md diff --git a/test/php-unit-tests/README.md b/test/php-unit-tests/README.md new file mode 100644 index 000000000..04d26c928 --- /dev/null +++ b/test/php-unit-tests/README.md @@ -0,0 +1,6 @@ +# Where should I add my test? + +- Covers an iTop PHP class or method? + - Most likely in "unitary-tests". +- Covers the consistency of some data through the app? + - Most likely in "integration-tests". \ No newline at end of file diff --git a/test/php-unit-tests/legacy-tests/README.md b/test/php-unit-tests/legacy-tests/README.md new file mode 100644 index 000000000..08c576281 --- /dev/null +++ b/test/php-unit-tests/legacy-tests/README.md @@ -0,0 +1 @@ +Tests in this folder have been written before the introduction of PHPUnit in iTop, they are not run by the CI. \ No newline at end of file From 11d8547cefd3160dec3ba66b4795043f19102749 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 13 Oct 2022 22:12:14 +0200 Subject: [PATCH 10/19] =?UTF-8?q?N=C2=B05608=20-=20Move/rename=20unit=20te?= =?UTF-8?q?sts=20to=20match=20their=20counterpart=20location/name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/php-unit-tests/phpunit.xml.dist | 7 +++++++ .../application/{UtilsTest.php => utilsTest.php} | 2 +- .../composer => sources/Composer}/iTopComposerTest.php | 9 +++------ .../application/search/CriterionConversionTest.php | 0 .../application/search/CriterionParserTest.php | 0 .../{ => sources}/application/search/SearchFormTest.php | 0 6 files changed, 11 insertions(+), 7 deletions(-) rename test/php-unit-tests/unitary-tests/application/{UtilsTest.php => utilsTest.php} (99%) rename test/php-unit-tests/unitary-tests/{application/composer => sources/Composer}/iTopComposerTest.php (94%) rename test/php-unit-tests/unitary-tests/{ => sources}/application/search/CriterionConversionTest.php (100%) rename test/php-unit-tests/unitary-tests/{ => sources}/application/search/CriterionParserTest.php (100%) rename test/php-unit-tests/unitary-tests/{ => sources}/application/search/SearchFormTest.php (100%) diff --git a/test/php-unit-tests/phpunit.xml.dist b/test/php-unit-tests/phpunit.xml.dist index ea11c8160..099fb9406 100644 --- a/test/php-unit-tests/phpunit.xml.dist +++ b/test/php-unit-tests/phpunit.xml.dist @@ -50,6 +50,13 @@ unitary-tests/setup + + + unitary-tests/sources/application/search + + + unitary-tests/sources/Composer + unitary-tests/status diff --git a/test/php-unit-tests/unitary-tests/application/UtilsTest.php b/test/php-unit-tests/unitary-tests/application/utilsTest.php similarity index 99% rename from test/php-unit-tests/unitary-tests/application/UtilsTest.php rename to test/php-unit-tests/unitary-tests/application/utilsTest.php index e09b7d25c..354146b7c 100644 --- a/test/php-unit-tests/unitary-tests/application/UtilsTest.php +++ b/test/php-unit-tests/unitary-tests/application/utilsTest.php @@ -24,7 +24,7 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase; /** * @covers utils */ -class UtilsTest extends ItopTestCase +class utilsTest extends ItopTestCase { public function testEndsWith() { diff --git a/test/php-unit-tests/unitary-tests/application/composer/iTopComposerTest.php b/test/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php similarity index 94% rename from test/php-unit-tests/unitary-tests/application/composer/iTopComposerTest.php rename to test/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php index e103360aa..6fe8e08e5 100644 --- a/test/php-unit-tests/unitary-tests/application/composer/iTopComposerTest.php +++ b/test/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php @@ -22,8 +22,6 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase; * along with iTop. If not, see * */ - - class iTopComposerTest extends ItopTestCase { @@ -84,8 +82,7 @@ class iTopComposerTest extends ItopTestCase $this->assertTrue(is_array($aDirs)); $aDeniedDirWrongFormat = []; - foreach ($aDirs as $sDir) - { + foreach ($aDirs as $sDir) { if (false === iTopComposer::IsTestDir($sDir)) { $aDeniedDirWrongFormat[] = $sDir; } @@ -138,8 +135,8 @@ class iTopComposerTest extends ItopTestCase $this->assertEmpty( $aMissing, 'Test dirs exists in /lib !'."\n" - .' They must be declared either in the allowed or denied list in '.iTopComposer::class." (see N°2651).\n" - .' List of dirs:'."\n".var_export($aMissing, true) + .' They must be declared either in the allowed or denied list in '.iTopComposer::class." (see N°2651).\n" + .' List of dirs:'."\n".var_export($aMissing, true) ); } } diff --git a/test/php-unit-tests/unitary-tests/application/search/CriterionConversionTest.php b/test/php-unit-tests/unitary-tests/sources/application/search/CriterionConversionTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/application/search/CriterionConversionTest.php rename to test/php-unit-tests/unitary-tests/sources/application/search/CriterionConversionTest.php diff --git a/test/php-unit-tests/unitary-tests/application/search/CriterionParserTest.php b/test/php-unit-tests/unitary-tests/sources/application/search/CriterionParserTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/application/search/CriterionParserTest.php rename to test/php-unit-tests/unitary-tests/sources/application/search/CriterionParserTest.php diff --git a/test/php-unit-tests/unitary-tests/application/search/SearchFormTest.php b/test/php-unit-tests/unitary-tests/sources/application/search/SearchFormTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/application/search/SearchFormTest.php rename to test/php-unit-tests/unitary-tests/sources/application/search/SearchFormTest.php From 87cb73c038f97a19859ac92d67292d1dec487734 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 14 Oct 2022 15:38:56 +0200 Subject: [PATCH 11/19] =?UTF-8?q?N=C2=B05608=20-=20Rename=20"test"=20folde?= =?UTF-8?q?r=20to=20"tests"=20to=20better=20match=20conventions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++-- test/ci_description.ini | 8 -------- {test => tests}/backups/backup-itop.tar.gz | Bin tests/ci_description.ini | 8 ++++++++ .../attributeset_widget_poc.html | 0 .../manual-visual-tests/sanitize_test.php | 0 {test => tests}/php-unit-tests/ItopDataTestCase.php | 0 {test => tests}/php-unit-tests/ItopTestCase.php | 0 {test => tests}/php-unit-tests/README.md | 0 {test => tests}/php-unit-tests/composer.json | 0 .../DictionariesConsistencyTest.php | 0 .../iTopModulesPhpVersionChecklistTest.php | 0 .../iTopModulesXmlVersionChecklistTest.php | 0 .../legacy-tests/GroupByAndFunctions.php | 2 +- .../php-unit-tests/legacy-tests/README.md | 0 .../php-unit-tests/legacy-tests/VerifyOQL.php | 0 .../php-unit-tests/legacy-tests/benchmark.php | 0 .../php-unit-tests/legacy-tests/build_test_oql.php | 4 ++-- .../legacy-tests/config-test-farm.php | 0 .../legacy-tests/display_cache_content.php | 0 .../legacy-tests/replay_query_log.php | 0 .../php-unit-tests/legacy-tests/test.class.inc.php | 0 .../php-unit-tests/legacy-tests/test.php | 0 .../php-unit-tests/legacy-tests/testlist.inc.php | 0 {test => tests}/php-unit-tests/phpunit.xml.dist | 0 .../SetupCssIntegrityChecklistTest.php | 0 .../iTopDesignFormatChecklistTest.php | 0 .../iTopModuleXmlInstallationChecklistTest.php | 0 .../php-unit-tests/postbuild_integration.xml.dist | 0 .../application/DashboardLayoutTest.php | 0 .../application/privUITransactionFileTest.php | 0 .../unitary-tests/application/utilsTest.php | 0 .../unitary-tests/core/BulkChangeTest.inc.php | 0 .../unitary-tests/core/CMDBObjectTest.php | 0 .../core/CMDBSource/CMDBSourceTest.php | 0 .../core/CMDBSource/DeadLockInjection.php | 0 .../core/CMDBSource/TransactionsTest.php | 0 .../core/ConfigPlaceholdersResolverTest.php | 0 .../unitary-tests/core/ConfigTest.php | 0 .../core/ConfigTest/config-itop-joker.php | 0 .../core/ConfigTest/config-itop-var.php | 0 .../config-itop_KO_config_plus_code.php | 0 .../ConfigValidator/config-itop_KO_function.php | 0 .../core/ConfigValidator/config-itop_VALID.php | 0 .../config-itop_VALID_log-level-min_const.php | 0 .../ConfigValidator/iTopConfigAstValidatorTest.php | 0 .../unitary-tests/core/DBObjectTest.php | 0 .../unitary-tests/core/DBSearchCommitTest.php | 0 .../unitary-tests/core/DBSearchIntersectTest.php | 0 .../unitary-tests/core/DBSearchJoinTest.php | 0 .../unitary-tests/core/DBSearchTest.php | 0 .../core/DBSearchUpdateRealiasingMapTest.php | 0 .../unitary-tests/core/ExpressionTest.php | 0 .../unitary-tests/core/LogAPITest.php | 0 .../unitary-tests/core/LogFileNameBuilderTest.php | 0 .../unitary-tests/core/MetaModelTest.php | 0 .../unitary-tests/core/OQLParserTest.php | 0 .../php-unit-tests/unitary-tests/core/OQLTest.php | 0 .../unitary-tests/core/TagSetFieldDataTest.php | 0 .../unitary-tests/core/TriggerTest.php | 0 .../unitary-tests/core/UniquenessConstraintTest.php | 0 .../unitary-tests/core/UserRightsTest.php | 0 .../core/WeeklyScheduledProcessMockConfig.php | 0 .../core/WeeklyScheduledProcessTest.php | 2 +- .../unitary-tests/core/apcEmulationTest.php | 0 .../unitary-tests/core/dictApcuTest.php | 0 .../php-unit-tests/unitary-tests/core/dictTest.php | 0 .../unitary-tests/core/iTopConfigParserTest.php | 0 .../unitary-tests/core/mockApcEmulation.incphp | 0 .../unitary-tests/core/mockDict.incphp | 0 .../unitary-tests/core/ormLinkSetTest.php | 0 .../unitary-tests/core/ormTagSetTest.php | 0 .../core/sanitizer/AbstractDOMSanitizerTest.php | 0 .../core/sanitizer/HTMLDOMSanitizerTest.php | 2 +- .../core/sanitizer/InlineImageMock.php | 0 .../unitary-tests/core/sanitizer/README.txt | 0 .../core/sanitizer/SvgDOMSanitizerTest.php | 0 .../unitary-tests/core/sanitizer/input/scripts.html | 0 .../unitary-tests/core/sanitizer/input/scripts.svg | 0 .../input/utf-8_wrong_character_email_truncated.txt | 0 .../core/sanitizer/input/whitelist_test.html | 0 .../core/sanitizer/output/scripts.html | 0 .../unitary-tests/core/sanitizer/output/scripts.svg | 0 .../utf-8_wrong_character_email_truncated.txt | 0 .../datamodels/2.x/authent-local/UserLocalTest.php | 2 +- .../UserLocalTest/UserLocalPasswordPolicyMock.php | 0 .../Validator/iTopConfigAstValidatorTest.php | 0 .../Validator/iTopConfigSyntaxValidatorTest.php | 0 .../datamodels/2.x/itop-tickets/itopTicketTest.php | 0 .../unitary-tests/setup/DBBackupTest.php | 0 .../unitary-tests/setup/SetupUtilsTest.php | 0 .../setup/iTopDesignFormat/1.7_to_1.6.expected.xml | 0 .../setup/iTopDesignFormat/1.7_to_1.6.input.xml | 0 .../setup/iTopDesignFormat/iTopDesignFormatTest.php | 0 .../sources/Composer/iTopComposerTest.php | 0 .../sources/application/TwigBase/Twig/TwigTest.php | 0 .../sources/application/TwigBase/Twig/test.html | 0 .../application/TwigBase/Twig/test.html.twig | 0 .../application/search/CriterionConversionTest.php | 0 .../application/search/CriterionParserTest.php | 0 .../sources/application/search/SearchFormTest.php | 0 .../unitary-tests/status/StatusIncTest.php | 0 .../unitary-tests/status/StatusTest.php | 0 .../php-unit-tests/unitary-tests/status/status.php | 0 .../unitary-tests/webservices/RestTest.php | 0 {test => tests}/php-unit-tests/unittestautoload.php | 0 {test => tests}/setup_params/default-params.xml | 0 {test => tests}/setup_params/setup.xml | 0 108 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 test/ci_description.ini rename {test => tests}/backups/backup-itop.tar.gz (100%) create mode 100644 tests/ci_description.ini rename {test => tests}/manual-visual-tests/attributeset_widget_poc.html (100%) rename {test => tests}/manual-visual-tests/sanitize_test.php (100%) rename {test => tests}/php-unit-tests/ItopDataTestCase.php (100%) rename {test => tests}/php-unit-tests/ItopTestCase.php (100%) rename {test => tests}/php-unit-tests/README.md (100%) rename {test => tests}/php-unit-tests/composer.json (100%) rename {test => tests}/php-unit-tests/integration-tests/DictionariesConsistencyTest.php (100%) rename {test => tests}/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php (100%) rename {test => tests}/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/GroupByAndFunctions.php (99%) rename {test => tests}/php-unit-tests/legacy-tests/README.md (100%) rename {test => tests}/php-unit-tests/legacy-tests/VerifyOQL.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/benchmark.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/build_test_oql.php (97%) rename {test => tests}/php-unit-tests/legacy-tests/config-test-farm.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/display_cache_content.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/replay_query_log.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/test.class.inc.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/test.php (100%) rename {test => tests}/php-unit-tests/legacy-tests/testlist.inc.php (100%) rename {test => tests}/php-unit-tests/phpunit.xml.dist (100%) rename {test => tests}/php-unit-tests/post-build-integration-tests/SetupCssIntegrityChecklistTest.php (100%) rename {test => tests}/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php (100%) rename {test => tests}/php-unit-tests/post-build-integration-tests/iTopModuleXmlInstallationChecklistTest.php (100%) rename {test => tests}/php-unit-tests/postbuild_integration.xml.dist (100%) rename {test => tests}/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/application/utilsTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/CMDBObjectTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/CMDBSource/DeadLockInjection.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/DBObjectTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/DBSearchCommitTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/DBSearchTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ExpressionTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/LogAPITest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/MetaModelTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/OQLParserTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/OQLTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/TagSetFieldDataTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/TriggerTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/UserRightsTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php (97%) rename {test => tests}/php-unit-tests/unitary-tests/core/apcEmulationTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/dictApcuTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/dictTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/mockApcEmulation.incphp (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/mockDict.incphp (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ormLinkSetTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/ormTagSetTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php (99%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/README.txt (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/SvgDOMSanitizerTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.html (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.svg (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/input/whitelist_test.html (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.html (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.svg (100%) rename {test => tests}/php-unit-tests/unitary-tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt (100%) rename {test => tests}/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php (98%) rename {test => tests}/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/setup/DBBackupTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml (100%) rename {test => tests}/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml (100%) rename {test => tests}/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html.twig (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/application/search/CriterionConversionTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/application/search/CriterionParserTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/application/search/SearchFormTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/status/StatusIncTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/status/StatusTest.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/status/status.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/webservices/RestTest.php (100%) rename {test => tests}/php-unit-tests/unittestautoload.php (100%) rename {test => tests}/setup_params/default-params.xml (100%) rename {test => tests}/setup_params/setup.xml (100%) diff --git a/.gitignore b/.gitignore index 8a46f7b20..3084ea2c3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ # composer reserver directory, from sources, populate/update using "composer install" vendor/* -test/*/vendor/* +tests/*/vendor/* # all conf but listing prevention /conf/** @@ -33,7 +33,7 @@ test/*/vendor/* !/log/web.config # PHPUnit cache file -/test/php-unit-tests/.phpunit.result.cache +/tests/php-unit-tests/.phpunit.result.cache # Jetbrains diff --git a/test/ci_description.ini b/test/ci_description.ini deleted file mode 100644 index ed14d2c87..000000000 --- a/test/ci_description.ini +++ /dev/null @@ -1,8 +0,0 @@ -[itop] -itop_setup=test/setup_params/default-params.xml -itop_backup=test/backups/backup-itop.tar.gz - -[phpunit] -; when empty phpunit_xml => no phpunit test performed -; phpunit xml file description. required for phpunit testing -phpunit_xml=test/php-unit-tests/phpunit.xml.dist diff --git a/test/backups/backup-itop.tar.gz b/tests/backups/backup-itop.tar.gz similarity index 100% rename from test/backups/backup-itop.tar.gz rename to tests/backups/backup-itop.tar.gz diff --git a/tests/ci_description.ini b/tests/ci_description.ini new file mode 100644 index 000000000..65396a54f --- /dev/null +++ b/tests/ci_description.ini @@ -0,0 +1,8 @@ +[itop] +itop_setup=tests/setup_params/default-params.xml +itop_backup=tests/backups/backup-itop.tar.gz + +[phpunit] +; when empty phpunit_xml => no phpunit test performed +; phpunit xml file description. required for phpunit testing +phpunit_xml=tests/php-unit-tests/phpunit.xml.dist diff --git a/test/manual-visual-tests/attributeset_widget_poc.html b/tests/manual-visual-tests/attributeset_widget_poc.html similarity index 100% rename from test/manual-visual-tests/attributeset_widget_poc.html rename to tests/manual-visual-tests/attributeset_widget_poc.html diff --git a/test/manual-visual-tests/sanitize_test.php b/tests/manual-visual-tests/sanitize_test.php similarity index 100% rename from test/manual-visual-tests/sanitize_test.php rename to tests/manual-visual-tests/sanitize_test.php diff --git a/test/php-unit-tests/ItopDataTestCase.php b/tests/php-unit-tests/ItopDataTestCase.php similarity index 100% rename from test/php-unit-tests/ItopDataTestCase.php rename to tests/php-unit-tests/ItopDataTestCase.php diff --git a/test/php-unit-tests/ItopTestCase.php b/tests/php-unit-tests/ItopTestCase.php similarity index 100% rename from test/php-unit-tests/ItopTestCase.php rename to tests/php-unit-tests/ItopTestCase.php diff --git a/test/php-unit-tests/README.md b/tests/php-unit-tests/README.md similarity index 100% rename from test/php-unit-tests/README.md rename to tests/php-unit-tests/README.md diff --git a/test/php-unit-tests/composer.json b/tests/php-unit-tests/composer.json similarity index 100% rename from test/php-unit-tests/composer.json rename to tests/php-unit-tests/composer.json diff --git a/test/php-unit-tests/integration-tests/DictionariesConsistencyTest.php b/tests/php-unit-tests/integration-tests/DictionariesConsistencyTest.php similarity index 100% rename from test/php-unit-tests/integration-tests/DictionariesConsistencyTest.php rename to tests/php-unit-tests/integration-tests/DictionariesConsistencyTest.php diff --git a/test/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php b/tests/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php similarity index 100% rename from test/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php rename to tests/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php diff --git a/test/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php b/tests/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php similarity index 100% rename from test/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php rename to tests/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php diff --git a/test/php-unit-tests/legacy-tests/GroupByAndFunctions.php b/tests/php-unit-tests/legacy-tests/GroupByAndFunctions.php similarity index 99% rename from test/php-unit-tests/legacy-tests/GroupByAndFunctions.php rename to tests/php-unit-tests/legacy-tests/GroupByAndFunctions.php index 8806dd737..15e2c3e77 100644 --- a/test/php-unit-tests/legacy-tests/GroupByAndFunctions.php +++ b/tests/php-unit-tests/legacy-tests/GroupByAndFunctions.php @@ -41,7 +41,7 @@ else } $bError = false; $oP = new iTopWebPage('Database inconsistencies'); -$oP->set_base(utils::GetAbsoluteUrlAppRoot().'test/'); +$oP->set_base(utils::GetAbsoluteUrlAppRoot().'tests/'); $oP->set_title('Grouping with functions'); $oP->add('

Grouping with functions

'); $oP->add('
'); diff --git a/test/php-unit-tests/legacy-tests/README.md b/tests/php-unit-tests/legacy-tests/README.md similarity index 100% rename from test/php-unit-tests/legacy-tests/README.md rename to tests/php-unit-tests/legacy-tests/README.md diff --git a/test/php-unit-tests/legacy-tests/VerifyOQL.php b/tests/php-unit-tests/legacy-tests/VerifyOQL.php similarity index 100% rename from test/php-unit-tests/legacy-tests/VerifyOQL.php rename to tests/php-unit-tests/legacy-tests/VerifyOQL.php diff --git a/test/php-unit-tests/legacy-tests/benchmark.php b/tests/php-unit-tests/legacy-tests/benchmark.php similarity index 100% rename from test/php-unit-tests/legacy-tests/benchmark.php rename to tests/php-unit-tests/legacy-tests/benchmark.php diff --git a/test/php-unit-tests/legacy-tests/build_test_oql.php b/tests/php-unit-tests/legacy-tests/build_test_oql.php similarity index 97% rename from test/php-unit-tests/legacy-tests/build_test_oql.php rename to tests/php-unit-tests/legacy-tests/build_test_oql.php index 109598ab1..0a3fd8c02 100644 --- a/test/php-unit-tests/legacy-tests/build_test_oql.php +++ b/tests/php-unit-tests/legacy-tests/build_test_oql.php @@ -28,7 +28,7 @@ require_once(APPROOT.'application/startup.inc.php'); \LoginWebPage::DoLogin(true); $sOQLFile = APPROOT.'log/oql_records.txt'; -$sTestFile = APPROOT.'test/core/oql_records.php'; +$sTestFile = APPROOT.'tests/core/oql_records.php'; $oTestHandle = @fopen($sTestFile, "w"); @@ -77,7 +77,7 @@ echo "File '$sTestFile' generated with $iCount entries (from $iRead captured OQL $sOQLFile = APPROOT.'log/oql_group_by_records.txt'; -$sTestFile = APPROOT.'test/core/oql_group_by_records.php'; +$sTestFile = APPROOT.'tests/core/oql_group_by_records.php'; $oTestHandle = @fopen($sTestFile, "w"); diff --git a/test/php-unit-tests/legacy-tests/config-test-farm.php b/tests/php-unit-tests/legacy-tests/config-test-farm.php similarity index 100% rename from test/php-unit-tests/legacy-tests/config-test-farm.php rename to tests/php-unit-tests/legacy-tests/config-test-farm.php diff --git a/test/php-unit-tests/legacy-tests/display_cache_content.php b/tests/php-unit-tests/legacy-tests/display_cache_content.php similarity index 100% rename from test/php-unit-tests/legacy-tests/display_cache_content.php rename to tests/php-unit-tests/legacy-tests/display_cache_content.php diff --git a/test/php-unit-tests/legacy-tests/replay_query_log.php b/tests/php-unit-tests/legacy-tests/replay_query_log.php similarity index 100% rename from test/php-unit-tests/legacy-tests/replay_query_log.php rename to tests/php-unit-tests/legacy-tests/replay_query_log.php diff --git a/test/php-unit-tests/legacy-tests/test.class.inc.php b/tests/php-unit-tests/legacy-tests/test.class.inc.php similarity index 100% rename from test/php-unit-tests/legacy-tests/test.class.inc.php rename to tests/php-unit-tests/legacy-tests/test.class.inc.php diff --git a/test/php-unit-tests/legacy-tests/test.php b/tests/php-unit-tests/legacy-tests/test.php similarity index 100% rename from test/php-unit-tests/legacy-tests/test.php rename to tests/php-unit-tests/legacy-tests/test.php diff --git a/test/php-unit-tests/legacy-tests/testlist.inc.php b/tests/php-unit-tests/legacy-tests/testlist.inc.php similarity index 100% rename from test/php-unit-tests/legacy-tests/testlist.inc.php rename to tests/php-unit-tests/legacy-tests/testlist.inc.php diff --git a/test/php-unit-tests/phpunit.xml.dist b/tests/php-unit-tests/phpunit.xml.dist similarity index 100% rename from test/php-unit-tests/phpunit.xml.dist rename to tests/php-unit-tests/phpunit.xml.dist diff --git a/test/php-unit-tests/post-build-integration-tests/SetupCssIntegrityChecklistTest.php b/tests/php-unit-tests/post-build-integration-tests/SetupCssIntegrityChecklistTest.php similarity index 100% rename from test/php-unit-tests/post-build-integration-tests/SetupCssIntegrityChecklistTest.php rename to tests/php-unit-tests/post-build-integration-tests/SetupCssIntegrityChecklistTest.php diff --git a/test/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php b/tests/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php similarity index 100% rename from test/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php rename to tests/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php diff --git a/test/php-unit-tests/post-build-integration-tests/iTopModuleXmlInstallationChecklistTest.php b/tests/php-unit-tests/post-build-integration-tests/iTopModuleXmlInstallationChecklistTest.php similarity index 100% rename from test/php-unit-tests/post-build-integration-tests/iTopModuleXmlInstallationChecklistTest.php rename to tests/php-unit-tests/post-build-integration-tests/iTopModuleXmlInstallationChecklistTest.php diff --git a/test/php-unit-tests/postbuild_integration.xml.dist b/tests/php-unit-tests/postbuild_integration.xml.dist similarity index 100% rename from test/php-unit-tests/postbuild_integration.xml.dist rename to tests/php-unit-tests/postbuild_integration.xml.dist diff --git a/test/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php b/tests/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php rename to tests/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php diff --git a/test/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php b/tests/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php rename to tests/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php diff --git a/test/php-unit-tests/unitary-tests/application/utilsTest.php b/tests/php-unit-tests/unitary-tests/application/utilsTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/application/utilsTest.php rename to tests/php-unit-tests/unitary-tests/application/utilsTest.php diff --git a/test/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php b/tests/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php rename to tests/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php diff --git a/test/php-unit-tests/unitary-tests/core/CMDBObjectTest.php b/tests/php-unit-tests/unitary-tests/core/CMDBObjectTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/CMDBObjectTest.php rename to tests/php-unit-tests/unitary-tests/core/CMDBObjectTest.php diff --git a/test/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php b/tests/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php rename to tests/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php diff --git a/test/php-unit-tests/unitary-tests/core/CMDBSource/DeadLockInjection.php b/tests/php-unit-tests/unitary-tests/core/CMDBSource/DeadLockInjection.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/CMDBSource/DeadLockInjection.php rename to tests/php-unit-tests/unitary-tests/core/CMDBSource/DeadLockInjection.php diff --git a/test/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php b/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php rename to tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php b/tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php rename to tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigTest.php b/tests/php-unit-tests/unitary-tests/core/ConfigTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigTest.php rename to tests/php-unit-tests/unitary-tests/core/ConfigTest.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php b/tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php rename to tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php b/tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php rename to tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php rename to tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php rename to tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID.php rename to tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php rename to tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php diff --git a/test/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php rename to tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php diff --git a/test/php-unit-tests/unitary-tests/core/DBObjectTest.php b/tests/php-unit-tests/unitary-tests/core/DBObjectTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/DBObjectTest.php rename to tests/php-unit-tests/unitary-tests/core/DBObjectTest.php diff --git a/test/php-unit-tests/unitary-tests/core/DBSearchCommitTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchCommitTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/DBSearchCommitTest.php rename to tests/php-unit-tests/unitary-tests/core/DBSearchCommitTest.php diff --git a/test/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php rename to tests/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php diff --git a/test/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php rename to tests/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php diff --git a/test/php-unit-tests/unitary-tests/core/DBSearchTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/DBSearchTest.php rename to tests/php-unit-tests/unitary-tests/core/DBSearchTest.php diff --git a/test/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php rename to tests/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php diff --git a/test/php-unit-tests/unitary-tests/core/ExpressionTest.php b/tests/php-unit-tests/unitary-tests/core/ExpressionTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ExpressionTest.php rename to tests/php-unit-tests/unitary-tests/core/ExpressionTest.php diff --git a/test/php-unit-tests/unitary-tests/core/LogAPITest.php b/tests/php-unit-tests/unitary-tests/core/LogAPITest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/LogAPITest.php rename to tests/php-unit-tests/unitary-tests/core/LogAPITest.php diff --git a/test/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php b/tests/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php rename to tests/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php diff --git a/test/php-unit-tests/unitary-tests/core/MetaModelTest.php b/tests/php-unit-tests/unitary-tests/core/MetaModelTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/MetaModelTest.php rename to tests/php-unit-tests/unitary-tests/core/MetaModelTest.php diff --git a/test/php-unit-tests/unitary-tests/core/OQLParserTest.php b/tests/php-unit-tests/unitary-tests/core/OQLParserTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/OQLParserTest.php rename to tests/php-unit-tests/unitary-tests/core/OQLParserTest.php diff --git a/test/php-unit-tests/unitary-tests/core/OQLTest.php b/tests/php-unit-tests/unitary-tests/core/OQLTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/OQLTest.php rename to tests/php-unit-tests/unitary-tests/core/OQLTest.php diff --git a/test/php-unit-tests/unitary-tests/core/TagSetFieldDataTest.php b/tests/php-unit-tests/unitary-tests/core/TagSetFieldDataTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/TagSetFieldDataTest.php rename to tests/php-unit-tests/unitary-tests/core/TagSetFieldDataTest.php diff --git a/test/php-unit-tests/unitary-tests/core/TriggerTest.php b/tests/php-unit-tests/unitary-tests/core/TriggerTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/TriggerTest.php rename to tests/php-unit-tests/unitary-tests/core/TriggerTest.php diff --git a/test/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php b/tests/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php rename to tests/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php diff --git a/test/php-unit-tests/unitary-tests/core/UserRightsTest.php b/tests/php-unit-tests/unitary-tests/core/UserRightsTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/UserRightsTest.php rename to tests/php-unit-tests/unitary-tests/core/UserRightsTest.php diff --git a/test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php b/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php rename to tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php diff --git a/test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php b/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php similarity index 97% rename from test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php rename to tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php index e7a85f62b..a8cef1666 100644 --- a/test/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php +++ b/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php @@ -11,7 +11,7 @@ class WeeklyScheduledProcessTest extends ItopTestCase { parent::setUp(); require_once(APPROOT.'core/backgroundprocess.inc.php'); - require_once(APPROOT.'test/core/WeeklyScheduledProcessMockConfig.php'); + require_once(APPROOT.'tests/core/WeeklyScheduledProcessMockConfig.php'); } diff --git a/test/php-unit-tests/unitary-tests/core/apcEmulationTest.php b/tests/php-unit-tests/unitary-tests/core/apcEmulationTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/apcEmulationTest.php rename to tests/php-unit-tests/unitary-tests/core/apcEmulationTest.php diff --git a/test/php-unit-tests/unitary-tests/core/dictApcuTest.php b/tests/php-unit-tests/unitary-tests/core/dictApcuTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/dictApcuTest.php rename to tests/php-unit-tests/unitary-tests/core/dictApcuTest.php diff --git a/test/php-unit-tests/unitary-tests/core/dictTest.php b/tests/php-unit-tests/unitary-tests/core/dictTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/dictTest.php rename to tests/php-unit-tests/unitary-tests/core/dictTest.php diff --git a/test/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php b/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php rename to tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php diff --git a/test/php-unit-tests/unitary-tests/core/mockApcEmulation.incphp b/tests/php-unit-tests/unitary-tests/core/mockApcEmulation.incphp similarity index 100% rename from test/php-unit-tests/unitary-tests/core/mockApcEmulation.incphp rename to tests/php-unit-tests/unitary-tests/core/mockApcEmulation.incphp diff --git a/test/php-unit-tests/unitary-tests/core/mockDict.incphp b/tests/php-unit-tests/unitary-tests/core/mockDict.incphp similarity index 100% rename from test/php-unit-tests/unitary-tests/core/mockDict.incphp rename to tests/php-unit-tests/unitary-tests/core/mockDict.incphp diff --git a/test/php-unit-tests/unitary-tests/core/ormLinkSetTest.php b/tests/php-unit-tests/unitary-tests/core/ormLinkSetTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ormLinkSetTest.php rename to tests/php-unit-tests/unitary-tests/core/ormLinkSetTest.php diff --git a/test/php-unit-tests/unitary-tests/core/ormTagSetTest.php b/tests/php-unit-tests/unitary-tests/core/ormTagSetTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/ormTagSetTest.php rename to tests/php-unit-tests/unitary-tests/core/ormTagSetTest.php diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php b/tests/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php rename to tests/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php b/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php similarity index 99% rename from test/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php rename to tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php index 28df546ab..f5448e701 100644 --- a/test/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php +++ b/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php @@ -222,7 +222,7 @@ class HTMLDOMSanitizerTest extends AbstractDOMSanitizerTest */ public function testDoSanitizeCallInlineImageProcessImageTag($sHtml, $iExpectedCount) { - require_once APPROOT.'test/core/sanitizer/InlineImageMock.php'; + require_once APPROOT.'tests/core/sanitizer/InlineImageMock.php'; InlineImageMock::ResetCallCounter(); $oSanitizer = new HTMLDOMSanitizer(InlineImageMock::class); diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php b/tests/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php rename to tests/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/README.txt b/tests/php-unit-tests/unitary-tests/core/sanitizer/README.txt similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/README.txt rename to tests/php-unit-tests/unitary-tests/core/sanitizer/README.txt diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/SvgDOMSanitizerTest.php b/tests/php-unit-tests/unitary-tests/core/sanitizer/SvgDOMSanitizerTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/SvgDOMSanitizerTest.php rename to tests/php-unit-tests/unitary-tests/core/sanitizer/SvgDOMSanitizerTest.php diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.html b/tests/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.html similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.html rename to tests/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.html diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.svg b/tests/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.svg similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.svg rename to tests/php-unit-tests/unitary-tests/core/sanitizer/input/scripts.svg diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt b/tests/php-unit-tests/unitary-tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt rename to tests/php-unit-tests/unitary-tests/core/sanitizer/input/utf-8_wrong_character_email_truncated.txt diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/input/whitelist_test.html b/tests/php-unit-tests/unitary-tests/core/sanitizer/input/whitelist_test.html similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/input/whitelist_test.html rename to tests/php-unit-tests/unitary-tests/core/sanitizer/input/whitelist_test.html diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.html b/tests/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.html similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.html rename to tests/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.html diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.svg b/tests/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.svg similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.svg rename to tests/php-unit-tests/unitary-tests/core/sanitizer/output/scripts.svg diff --git a/test/php-unit-tests/unitary-tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt b/tests/php-unit-tests/unitary-tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt similarity index 100% rename from test/php-unit-tests/unitary-tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt rename to tests/php-unit-tests/unitary-tests/core/sanitizer/output/utf-8_wrong_character_email_truncated.txt diff --git a/test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php similarity index 98% rename from test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php index b82eeee6b..12a1c34f4 100644 --- a/test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php @@ -25,7 +25,7 @@ class UserLocalTest extends ItopDataTestCase { parent::setUp(); - require_once(APPROOT.'test/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php'); + require_once(APPROOT.'tests/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php'); require_once(APPROOT.'env-production/authent-local/model.authent-local.php'); } diff --git a/test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php similarity index 100% rename from test/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php diff --git a/test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php diff --git a/test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php diff --git a/test/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php diff --git a/test/php-unit-tests/unitary-tests/setup/DBBackupTest.php b/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/setup/DBBackupTest.php rename to tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php diff --git a/test/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php b/tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php rename to tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php diff --git a/test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml b/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml similarity index 100% rename from test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml rename to tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.expected.xml diff --git a/test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml b/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml similarity index 100% rename from test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml rename to tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/1.7_to_1.6.input.xml diff --git a/test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php b/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php rename to tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php diff --git a/test/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php b/tests/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php rename to tests/php-unit-tests/unitary-tests/sources/Composer/iTopComposerTest.php diff --git a/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php rename to tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php diff --git a/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html rename to tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html diff --git a/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html.twig b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html.twig similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html.twig rename to tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/test.html.twig diff --git a/test/php-unit-tests/unitary-tests/sources/application/search/CriterionConversionTest.php b/tests/php-unit-tests/unitary-tests/sources/application/search/CriterionConversionTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/application/search/CriterionConversionTest.php rename to tests/php-unit-tests/unitary-tests/sources/application/search/CriterionConversionTest.php diff --git a/test/php-unit-tests/unitary-tests/sources/application/search/CriterionParserTest.php b/tests/php-unit-tests/unitary-tests/sources/application/search/CriterionParserTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/application/search/CriterionParserTest.php rename to tests/php-unit-tests/unitary-tests/sources/application/search/CriterionParserTest.php diff --git a/test/php-unit-tests/unitary-tests/sources/application/search/SearchFormTest.php b/tests/php-unit-tests/unitary-tests/sources/application/search/SearchFormTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/application/search/SearchFormTest.php rename to tests/php-unit-tests/unitary-tests/sources/application/search/SearchFormTest.php diff --git a/test/php-unit-tests/unitary-tests/status/StatusIncTest.php b/tests/php-unit-tests/unitary-tests/status/StatusIncTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/status/StatusIncTest.php rename to tests/php-unit-tests/unitary-tests/status/StatusIncTest.php diff --git a/test/php-unit-tests/unitary-tests/status/StatusTest.php b/tests/php-unit-tests/unitary-tests/status/StatusTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/status/StatusTest.php rename to tests/php-unit-tests/unitary-tests/status/StatusTest.php diff --git a/test/php-unit-tests/unitary-tests/status/status.php b/tests/php-unit-tests/unitary-tests/status/status.php similarity index 100% rename from test/php-unit-tests/unitary-tests/status/status.php rename to tests/php-unit-tests/unitary-tests/status/status.php diff --git a/test/php-unit-tests/unitary-tests/webservices/RestTest.php b/tests/php-unit-tests/unitary-tests/webservices/RestTest.php similarity index 100% rename from test/php-unit-tests/unitary-tests/webservices/RestTest.php rename to tests/php-unit-tests/unitary-tests/webservices/RestTest.php diff --git a/test/php-unit-tests/unittestautoload.php b/tests/php-unit-tests/unittestautoload.php similarity index 100% rename from test/php-unit-tests/unittestautoload.php rename to tests/php-unit-tests/unittestautoload.php diff --git a/test/setup_params/default-params.xml b/tests/setup_params/default-params.xml similarity index 100% rename from test/setup_params/default-params.xml rename to tests/setup_params/default-params.xml diff --git a/test/setup_params/setup.xml b/tests/setup_params/setup.xml similarity index 100% rename from test/setup_params/setup.xml rename to tests/setup_params/setup.xml From 6136eadd31c538bf970392d2f56a01548d4dc652 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 14 Oct 2022 23:07:19 +0200 Subject: [PATCH 12/19] =?UTF-8?q?N=C2=B05608=20-=20Fix=20some=20broken=20r?= =?UTF-8?q?equire=20paths=20since=20move/rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/php-unit-tests/ItopTestCase.php | 18 ++++++++++-------- tests/php-unit-tests/phpunit.xml.dist | 8 ++++---- .../core/WeeklyScheduledProcessTest.php | 2 +- .../core/sanitizer/HTMLDOMSanitizerTest.php | 2 +- .../2.x/authent-local/UserLocalTest.php | 2 +- .../Validator/iTopConfigAstValidatorTest.php | 4 ++-- .../iTopConfigSyntaxValidatorTest.php | 4 ++-- .../unitary-tests/status/StatusIncTest.php | 2 +- .../unitary-tests/status/status.php | 8 +++++--- 9 files changed, 27 insertions(+), 23 deletions(-) diff --git a/tests/php-unit-tests/ItopTestCase.php b/tests/php-unit-tests/ItopTestCase.php index 18c6c6a68..afc7c8a28 100644 --- a/tests/php-unit-tests/ItopTestCase.php +++ b/tests/php-unit-tests/ItopTestCase.php @@ -39,14 +39,16 @@ class ItopTestCase extends TestCase /** @noinspection UsingInclusionOnceReturnValueInspection avoid errors for approot includes */ protected function setUp(): void { - @include_once '../approot.inc.php'; - @include_once '../../approot.inc.php'; - @include_once '../../../approot.inc.php'; - @include_once '../../../../approot.inc.php'; - @include_once '../../../../../approot.inc.php'; - @include_once '../../../../../../approot.inc.php'; - @include_once '../../../../../../../approot.inc.php'; - @include_once '../../../../../../../../approot.inc.php'; + $sAppRootRelPath = 'approot.inc.php'; + $sDepthSeparator = '../'; + for ($iDepth = 0; $iDepth < 8; $iDepth++) { + if (file_exists($sAppRootRelPath)) { + require_once $sAppRootRelPath; + break; + } + + $sAppRootRelPath = $sDepthSeparator.$sAppRootRelPath; + } } /** diff --git a/tests/php-unit-tests/phpunit.xml.dist b/tests/php-unit-tests/phpunit.xml.dist index 099fb9406..b1cc926bf 100644 --- a/tests/php-unit-tests/phpunit.xml.dist +++ b/tests/php-unit-tests/phpunit.xml.dist @@ -65,16 +65,16 @@ - ../../../env-production/*/test + ../../env-production/*/test - ../../../core/apc-emulation.php - ../../../core/ormlinkset.class.inc.php - ../../../datamodels/2.x/itop-tickets/main.itop-tickets.php + ../../core/apc-emulation.php + ../../core/ormlinkset.class.inc.php + ../../datamodels/2.x/itop-tickets/main.itop-tickets.php diff --git a/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php b/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php index a8cef1666..031a016c1 100644 --- a/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php +++ b/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php @@ -11,7 +11,7 @@ class WeeklyScheduledProcessTest extends ItopTestCase { parent::setUp(); require_once(APPROOT.'core/backgroundprocess.inc.php'); - require_once(APPROOT.'tests/core/WeeklyScheduledProcessMockConfig.php'); + require_once(APPROOT.'tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php'); } diff --git a/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php b/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php index f5448e701..76c30434a 100644 --- a/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php +++ b/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php @@ -222,7 +222,7 @@ class HTMLDOMSanitizerTest extends AbstractDOMSanitizerTest */ public function testDoSanitizeCallInlineImageProcessImageTag($sHtml, $iExpectedCount) { - require_once APPROOT.'tests/core/sanitizer/InlineImageMock.php'; + require_once APPROOT.'tests/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php'; InlineImageMock::ResetCallCounter(); $oSanitizer = new HTMLDOMSanitizer(InlineImageMock::class); diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php index 12a1c34f4..867a28ed5 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php @@ -25,7 +25,7 @@ class UserLocalTest extends ItopDataTestCase { parent::setUp(); - require_once(APPROOT.'tests/php-unit-tests/tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php'); + require_once(APPROOT.'tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php'); require_once(APPROOT.'env-production/authent-local/model.authent-local.php'); } diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php index c29d285d6..68eb076e1 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php @@ -19,8 +19,8 @@ class iTopConfigAstValidatorTest extends ItopTestCase { parent::setUp(); - require_once __DIR__.'/../../../env-production/itop-config/src/Validator/ConfigNodesVisitor.php'; - require_once __DIR__.'/../../../env-production/itop-config/src/Validator/iTopConfigAstValidator.php'; + require_once APPROOT.'env-production/itop-config/src/Validator/ConfigNodesVisitor.php'; + require_once APPROOT.'env-production/itop-config/src/Validator/iTopConfigAstValidator.php'; } diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php index 77427cd94..c4a5aaa1e 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php @@ -20,8 +20,8 @@ class iTopConfigSyntaxValidatorTest extends ItopTestCase { parent::setUp(); - require_once __DIR__.'/../../../env-production/itop-config/src/Validator/ConfigNodesVisitor.php'; - require_once __DIR__.'/../../../env-production/itop-config/src/Validator/iTopConfigSyntaxValidator.php'; + require_once APPROOT.'env-production/itop-config/src/Validator/ConfigNodesVisitor.php'; + require_once APPROOT.'env-production/itop-config/src/Validator/iTopConfigSyntaxValidator.php'; } diff --git a/tests/php-unit-tests/unitary-tests/status/StatusIncTest.php b/tests/php-unit-tests/unitary-tests/status/StatusIncTest.php index 645c9ded5..a135e13de 100644 --- a/tests/php-unit-tests/unitary-tests/status/StatusIncTest.php +++ b/tests/php-unit-tests/unitary-tests/status/StatusIncTest.php @@ -38,7 +38,7 @@ class StatusIncTest extends TestCase { { //AppRoot is the directory containing the directory //Assume getcwd() is runned inside APPROOT/test - $this->sAppRoot = __DIR__.'/../../sources/application/status'; + $this->sAppRoot = __DIR__.'/../../../../sources/application/status'; } /** diff --git a/tests/php-unit-tests/unitary-tests/status/status.php b/tests/php-unit-tests/unitary-tests/status/status.php index c81b17aff..3c89ef55e 100644 --- a/tests/php-unit-tests/unitary-tests/status/status.php +++ b/tests/php-unit-tests/unitary-tests/status/status.php @@ -1,8 +1,10 @@ Date: Sat, 15 Oct 2022 21:10:41 +0200 Subject: [PATCH 13/19] =?UTF-8?q?N=C2=B05608=20-=20Move/rename=20"status"?= =?UTF-8?q?=20unit=20tests=20to=20match=20their=20counterpart=20location/n?= =?UTF-8?q?ame?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => sources/application}/status/StatusIncTest.php | 2 +- .../{ => sources/application}/status/StatusTest.php | 0 .../unitary-tests/{ => sources/application}/status/status.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename tests/php-unit-tests/unitary-tests/{ => sources/application}/status/StatusIncTest.php (97%) rename tests/php-unit-tests/unitary-tests/{ => sources/application}/status/StatusTest.php (100%) rename tests/php-unit-tests/unitary-tests/{ => sources/application}/status/status.php (91%) diff --git a/tests/php-unit-tests/unitary-tests/status/StatusIncTest.php b/tests/php-unit-tests/unitary-tests/sources/application/status/StatusIncTest.php similarity index 97% rename from tests/php-unit-tests/unitary-tests/status/StatusIncTest.php rename to tests/php-unit-tests/unitary-tests/sources/application/status/StatusIncTest.php index a135e13de..4dc6a559a 100644 --- a/tests/php-unit-tests/unitary-tests/status/StatusIncTest.php +++ b/tests/php-unit-tests/unitary-tests/sources/application/status/StatusIncTest.php @@ -38,7 +38,7 @@ class StatusIncTest extends TestCase { { //AppRoot is the directory containing the directory //Assume getcwd() is runned inside APPROOT/test - $this->sAppRoot = __DIR__.'/../../../../sources/application/status'; + $this->sAppRoot = __DIR__.'/../../../../../../sources/application/status'; } /** diff --git a/tests/php-unit-tests/unitary-tests/status/StatusTest.php b/tests/php-unit-tests/unitary-tests/sources/application/status/StatusTest.php similarity index 100% rename from tests/php-unit-tests/unitary-tests/status/StatusTest.php rename to tests/php-unit-tests/unitary-tests/sources/application/status/StatusTest.php diff --git a/tests/php-unit-tests/unitary-tests/status/status.php b/tests/php-unit-tests/unitary-tests/sources/application/status/status.php similarity index 91% rename from tests/php-unit-tests/unitary-tests/status/status.php rename to tests/php-unit-tests/unitary-tests/sources/application/status/status.php index 3c89ef55e..332e900bf 100644 --- a/tests/php-unit-tests/unitary-tests/status/status.php +++ b/tests/php-unit-tests/unitary-tests/sources/application/status/status.php @@ -2,7 +2,7 @@ // Include status functions // Important: We can't use the APPROOT constant here as the current script will be executed via the PHP exec() function which won't have it loaded yet. -require_once __DIR__.'/../../../../sources/application/status/status.inc.php'; +require_once __DIR__.'/../../../../../../sources/application/status/status.inc.php'; // Do check Status try From c0cee02351d0586349453de85b82793494f0b98a Mon Sep 17 00:00:00 2001 From: Molkobain Date: Sat, 15 Oct 2022 21:12:47 +0200 Subject: [PATCH 14/19] =?UTF-8?q?N=C2=B05608=20-=20Factorize=20all=20core?= =?UTF-8?q?=20modules=20tests=20to=20a=20single=20test=20suite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/php-unit-tests/README.md | 3 ++- tests/php-unit-tests/phpunit.xml.dist | 20 ++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/php-unit-tests/README.md b/tests/php-unit-tests/README.md index 04d26c928..e4058802c 100644 --- a/tests/php-unit-tests/README.md +++ b/tests/php-unit-tests/README.md @@ -1,4 +1,5 @@ -# Where should I add my test? +# PHP unitary tests +## Where should I add my test? - Covers an iTop PHP class or method? - Most likely in "unitary-tests". diff --git a/tests/php-unit-tests/phpunit.xml.dist b/tests/php-unit-tests/phpunit.xml.dist index b1cc926bf..8273b60c3 100644 --- a/tests/php-unit-tests/phpunit.xml.dist +++ b/tests/php-unit-tests/phpunit.xml.dist @@ -28,24 +28,15 @@ + unitary-tests/application unitary-tests/core - - - unitary-tests/datamodels/2.x/authent-local - - - integration-tests - - - unitary-tests/datamodels/2.x/itop-config - - - unitary-tests/datamodels/2.x/itop-tickets + + unitary-tests/datamodels/2.x unitary-tests/setup @@ -67,6 +58,11 @@ ../../env-production/*/test + + + + integration-tests + From 7de6c7215482dbdfd038b958dcb25146035e34bb Mon Sep 17 00:00:00 2001 From: Molkobain Date: Sun, 16 Oct 2022 11:35:37 +0200 Subject: [PATCH 15/19] Tests: Rename provider method name to match convention --- .../sources/application/TwigBase/Twig/TwigTest.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php index f14420c81..5924d0960 100644 --- a/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php +++ b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php @@ -44,17 +44,12 @@ class TwigTest extends ItopDataTestCase $oTwig->addFunction($oFunction); } - $sHtml = $oTwig->render($sId, ['AttackerURL' => 'file://'.__DIR__.'/attacker']); - - $this->assertEquals($sExpected, $sHtml); - } - - public static function TemplateProvider() + public static function testTemplateProvider() { $aReturn = array(); $aReturn['filter_system'] = [ - 'sFileName' => file_get_contents(__DIR__.'/test.html.twig'), - 'expected' => file_get_contents(__DIR__.'/test.html'), + 'sFileName' => 'test.html', + 'expected' =>file_get_contents(dirname(__FILE__).'/test.html'), ]; return $aReturn; From 5721a324c1989e42448f62b65ca48c0c5f75260b Mon Sep 17 00:00:00 2001 From: Molkobain Date: Tue, 18 Oct 2022 16:52:01 +0200 Subject: [PATCH 16/19] Tests: Always display test status for better feedback --- tests/manual-visual-tests/sanitize_test.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/manual-visual-tests/sanitize_test.php b/tests/manual-visual-tests/sanitize_test.php index 411e86349..cfb7b561f 100644 --- a/tests/manual-visual-tests/sanitize_test.php +++ b/tests/manual-visual-tests/sanitize_test.php @@ -18,7 +18,7 @@ function testSanitize ($sValue, $sType, &$index ){ {$sValue} {$sSanitizedValue} - + HTML; @@ -73,7 +79,10 @@ table, tr, td { border-collapse: collapse; } -td.hasDiff { +.status-success { + color: green; +} +.status-error { color: red; } From 6a7dbb06b00e63093606f3bd641dc2e6e72ea16e Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 6 Jan 2023 17:47:58 +0100 Subject: [PATCH 17/19] =?UTF-8?q?N=C2=B05608=20-=20Add=20methods=20to=20re?= =?UTF-8?q?quire=5Fonce=20an=20iTop=20or=20a=20unit=20test=20file=20to=20a?= =?UTF-8?q?void=20crashes=20when=20tests=20dir=20is=20moved?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/php-unit-tests/ItopTestCase.php | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/php-unit-tests/ItopTestCase.php b/tests/php-unit-tests/ItopTestCase.php index afc7c8a28..94407524d 100644 --- a/tests/php-unit-tests/ItopTestCase.php +++ b/tests/php-unit-tests/ItopTestCase.php @@ -65,6 +65,37 @@ class ItopTestCase extends TestCase } } + /** + * Require once an iTop file (core or extension) from its relative path to the iTop root dir. + * This ensure to always use the right absolute path, especially in {@see \Combodo\iTop\Test\UnitTest\ItopTestCase::RequireOnceUnitTestFile()} + * + * @param string $sFileRelPath Rel. path (from iTop root dir) of the iTop file (core or extension) to require (eg. 'core/attributedef.class.inc.php' for /core/attributedef.class.inc.php) + * + * @return void + * @since 2.7.9 3.0.3 3.1.0 N°5608 Add method after PHPUnit directory moving + */ + protected function RequireOnceItopFile(string $sFileRelPath): void + { + require_once APPROOT . $sFileRelPath; + } + + /** + * Require once a unit test file (eg. a mock class) from its relative path from the *current* dir. + * This ensure that required files don't crash when unit tests dir is moved in the iTop structure (see N°5608) + * + * @param string $sFileRelPath Rel. path (from the *current* dir) of the unit test file to require (eg. './WeeklyScheduledProcessMockConfig.php' for /tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php in Combodo\iTop\Test\UnitTest\Core\WeeklyScheduledProcessTest) + * + * @return void + * @since 2.7.9 3.0.3 3.1.0 N°5608 Add method after PHPUnit directory moving + */ + protected function RequireOnceUnitTestFile(string $sFileRelPath): void + { + $aStack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); + $sCallerDirAbsPath = dirname($aStack[0]['file']); + + require_once $sCallerDirAbsPath . DIRECTORY_SEPARATOR . $sFileRelPath; + } + protected function debug($sMsg) { if (DEBUG_UNIT_TEST) { From 36f8e58e25493f031d3092d805d8152f07e5f08e Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 6 Jan 2023 18:22:52 +0100 Subject: [PATCH 18/19] =?UTF-8?q?N=C2=B05608=20-=20Use=20new=20ItopTestCas?= =?UTF-8?q?e::RequireOnceXXX=20in=20unit=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/php-unit-tests/ItopDataTestCase.php | 5 ++--- .../iTopModulesPhpVersionChecklistTest.php | 4 ++-- .../iTopModulesXmlVersionChecklistTest.php | 2 +- .../iTopDesignFormatChecklistTest.php | 4 ++-- .../unitary-tests/core/BulkChangeTest.inc.php | 4 ++-- .../unitary-tests/core/CMDBSource/CMDBSourceTest.php | 2 +- .../unitary-tests/core/CMDBSource/TransactionsTest.php | 2 +- .../unitary-tests/core/ConfigPlaceholdersResolverTest.php | 2 +- tests/php-unit-tests/unitary-tests/core/ConfigTest.php | 2 +- .../core/ConfigValidator/iTopConfigAstValidatorTest.php | 4 ++-- tests/php-unit-tests/unitary-tests/core/DBObjectTest.php | 4 ++-- .../unitary-tests/core/DBSearchIntersectTest.php | 2 +- .../php-unit-tests/unitary-tests/core/DBSearchJoinTest.php | 2 +- tests/php-unit-tests/unitary-tests/core/DBSearchTest.php | 4 ++-- .../unitary-tests/core/DBSearchUpdateRealiasingMapTest.php | 2 +- .../unitary-tests/core/LogFileNameBuilderTest.php | 2 +- tests/php-unit-tests/unitary-tests/core/MetaModelTest.php | 4 ++-- .../unitary-tests/core/UniquenessConstraintTest.php | 4 ++-- .../unitary-tests/core/WeeklyScheduledProcessTest.php | 4 ++-- .../php-unit-tests/unitary-tests/core/apcEmulationTest.php | 2 +- tests/php-unit-tests/unitary-tests/core/dictApcuTest.php | 6 +++--- tests/php-unit-tests/unitary-tests/core/dictTest.php | 6 +++--- .../unitary-tests/core/iTopConfigParserTest.php | 4 ++-- .../core/sanitizer/AbstractDOMSanitizerTest.php | 4 ++-- .../unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php | 2 +- .../datamodels/2.x/authent-local/UserLocalTest.php | 4 ++-- .../itop-config/Validator/iTopConfigAstValidatorTest.php | 4 ++-- .../itop-config/Validator/iTopConfigSyntaxValidatorTest.php | 4 ++-- tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php | 2 +- tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php | 4 ++-- .../setup/iTopDesignFormat/iTopDesignFormatTest.php | 4 ++-- .../sources/application/TwigBase/Twig/TwigTest.php | 3 ++- .../sources/application/status/StatusIncTest.php | 6 +++--- 33 files changed, 57 insertions(+), 57 deletions(-) diff --git a/tests/php-unit-tests/ItopDataTestCase.php b/tests/php-unit-tests/ItopDataTestCase.php index b563e649a..7bc24f57b 100644 --- a/tests/php-unit-tests/ItopDataTestCase.php +++ b/tests/php-unit-tests/ItopDataTestCase.php @@ -80,9 +80,8 @@ class ItopDataTestCase extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'/application/startup.inc.php'); - - require_once(APPROOT.'application/utils.inc.php'); + $this->RequireOnceItopFile('application/startup.inc.php'); + $this->RequireOnceItopFile('application/utils.inc.php'); $sEnv = 'production'; $sConfigFile = APPCONF.$sEnv.'/'.ITOP_CONFIG_FILE; diff --git a/tests/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php b/tests/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php index 9c66bda8e..e4b7b5e82 100644 --- a/tests/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php +++ b/tests/php-unit-tests/integration-tests/iTopModulesPhpVersionChecklistTest.php @@ -64,8 +64,8 @@ class iTopModulesPhpVersionIntegrationTest extends ItopTestCase { parent::setUp(); - require_once APPROOT.'core/config.class.inc.php'; - require_once APPROOT.'application/utils.inc.php'; + $this->RequireOnceItopFile('core/config.class.inc.php'); + $this->RequireOnceItopFile('application/utils.inc.php'); if (is_dir(APPROOT.'datamodels/2.x')) { $DatamodelsPath = APPROOT.'datamodels/2.x'; diff --git a/tests/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php b/tests/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php index 3cdb3cc25..de9bafa56 100644 --- a/tests/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php +++ b/tests/php-unit-tests/integration-tests/iTopModulesXmlVersionChecklistTest.php @@ -31,7 +31,7 @@ class iTopModulesXmlVersionIntegrationTest extends ItopTestCase { parent::setUp(); - require_once APPROOT.'setup/itopdesignformat.class.inc.php'; + $this->RequireOnceItopFile('setup/itopdesignformat.class.inc.php'); } diff --git a/tests/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php b/tests/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php index 20b1063c1..875fd01ec 100644 --- a/tests/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php +++ b/tests/php-unit-tests/post-build-integration-tests/iTopDesignFormatChecklistTest.php @@ -21,8 +21,8 @@ class TestForITopDesignFormatClass extends ItopTestCase { parent::setUp(); - require_once APPROOT.'setup/modelfactory.class.inc.php'; - require_once APPROOT.'setup/itopdesignformat.class.inc.php'; + $this->RequireOnceItopFile('setup/modelfactory.class.inc.php'); + $this->RequireOnceItopFile('setup/itopdesignformat.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php b/tests/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php index 8fc3c93d0..cdb560b1c 100644 --- a/tests/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php +++ b/tests/php-unit-tests/unitary-tests/core/BulkChangeTest.inc.php @@ -17,8 +17,8 @@ class BulkChangeTest extends ItopDataTestCase { protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core/coreexception.class.inc.php'); - require_once(APPROOT.'core/bulkchange.class.inc.php'); + $this->RequireOnceItopFile('core/coreexception.class.inc.php'); + $this->RequireOnceItopFile('core/bulkchange.class.inc.php'); } diff --git a/tests/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php b/tests/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php index 106bbd91d..986a79a49 100644 --- a/tests/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php +++ b/tests/php-unit-tests/unitary-tests/core/CMDBSource/CMDBSourceTest.php @@ -24,7 +24,7 @@ class CMDBSourceTest extends ItopTestCase { parent::setUp(); - require_once(APPROOT.'/core/cmdbsource.class.inc.php'); + $this->RequireOnceItopFile('/core/cmdbsource.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php b/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php index 55b738cc8..3a9480be5 100644 --- a/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php +++ b/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php @@ -31,7 +31,7 @@ class TransactionsTest extends ItopTestCase { parent::setUp(); require_once('DeadLockInjection.php'); - require_once(APPROOT.'/core/cmdbsource.class.inc.php'); + $this->RequireOnceItopFile('/core/cmdbsource.class.inc.php'); $sEnv = 'production'; $sConfigFile = APPCONF.$sEnv.'/config-itop.php'; diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php b/tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php index a4c6868ea..b4e51ea06 100644 --- a/tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php +++ b/tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php @@ -34,7 +34,7 @@ class ConfigPlaceholdersResolverTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core/config.class.inc.php'); + $this->RequireOnceItopFile('core/config.class.inc.php'); } /** * @dataProvider providerResolve diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigTest.php b/tests/php-unit-tests/unitary-tests/core/ConfigTest.php index 0088ab374..8ab3febc2 100644 --- a/tests/php-unit-tests/unitary-tests/core/ConfigTest.php +++ b/tests/php-unit-tests/unitary-tests/core/ConfigTest.php @@ -34,7 +34,7 @@ class ConfigTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core/config.class.inc.php'); + $this->RequireOnceItopFile('core/config.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php index b30b67f14..5c64b2ea2 100644 --- a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php +++ b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php @@ -15,8 +15,8 @@ class iTopConfigAstValidatorTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once APPROOT.'env-production/itop-config/src/Validator/iTopConfigAstValidator.php'; - require_once APPROOT.'env-production/itop-config/src/Validator/ConfigNodesVisitor.php'; + $this->RequireOnceItopFile('env-production/itop-config/src/Validator/iTopConfigAstValidator.php'); + $this->RequireOnceItopFile('env-production/itop-config/src/Validator/ConfigNodesVisitor.php'); } public function testValidateFileValid() diff --git a/tests/php-unit-tests/unitary-tests/core/DBObjectTest.php b/tests/php-unit-tests/unitary-tests/core/DBObjectTest.php index 50d47d67f..3f5630ec3 100644 --- a/tests/php-unit-tests/unitary-tests/core/DBObjectTest.php +++ b/tests/php-unit-tests/unitary-tests/core/DBObjectTest.php @@ -43,8 +43,8 @@ class DBObjectTest extends ItopDataTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core/coreexception.class.inc.php'); - require_once(APPROOT.'core/dbobject.class.php'); + $this->RequireOnceItopFile('core/coreexception.class.inc.php'); + $this->RequireOnceItopFile('core/dbobject.class.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php index a4d4c4b5b..3fd2d12d9 100644 --- a/tests/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php +++ b/tests/php-unit-tests/unitary-tests/core/DBSearchIntersectTest.php @@ -21,7 +21,7 @@ class DBSearchIntersectTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); + $this->RequireOnceItopFile('application/startup.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php index e590eaa53..6790a3010 100644 --- a/tests/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php +++ b/tests/php-unit-tests/unitary-tests/core/DBSearchJoinTest.php @@ -22,7 +22,7 @@ class DBSearchJoinTest extends ItopDataTestCase { protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); + $this->RequireOnceItopFile('application/startup.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/DBSearchTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchTest.php index 8d29bfc99..19c53b186 100644 --- a/tests/php-unit-tests/unitary-tests/core/DBSearchTest.php +++ b/tests/php-unit-tests/unitary-tests/core/DBSearchTest.php @@ -57,8 +57,8 @@ class DBSearchTest extends ItopDataTestCase { parent::setUp(); - require_once(APPROOT.'application/itopwebpage.class.inc.php'); - require_once(APPROOT.'application/displayblock.class.inc.php'); + $this->RequireOnceItopFile('application/itopwebpage.class.inc.php'); + $this->RequireOnceItopFile('application/displayblock.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php b/tests/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php index 7187e466d..4fd6a3ace 100644 --- a/tests/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php +++ b/tests/php-unit-tests/unitary-tests/core/DBSearchUpdateRealiasingMapTest.php @@ -22,7 +22,7 @@ class DBSearchUpdateRealiasingMapTest extends ItopDataTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); + $this->RequireOnceItopFile('application/startup.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php b/tests/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php index 09f91e61c..882b04296 100644 --- a/tests/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php +++ b/tests/php-unit-tests/unitary-tests/core/LogFileNameBuilderTest.php @@ -29,7 +29,7 @@ class LogFileNameBuilderTest extends ItopTestCase { parent::setUp(); - require_once APPROOT.'core/log.class.inc.php'; + $this->RequireOnceItopFile('core/log.class.inc.php'); } protected function tearDown(): void diff --git a/tests/php-unit-tests/unitary-tests/core/MetaModelTest.php b/tests/php-unit-tests/unitary-tests/core/MetaModelTest.php index 58b406043..9ce9c27c9 100644 --- a/tests/php-unit-tests/unitary-tests/core/MetaModelTest.php +++ b/tests/php-unit-tests/unitary-tests/core/MetaModelTest.php @@ -26,8 +26,8 @@ class MetaModelTest extends ItopDataTestCase protected function setUp(): void { parent::setUp(); - require_once APPROOT.'/core/metamodel.class.php'; - require_once APPROOT.'/core/coreexception.class.inc.php'; + $this->RequireOnceItopFile('/core/metamodel.class.php'); + $this->RequireOnceItopFile('/core/coreexception.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php b/tests/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php index 1b724c749..6c3373454 100644 --- a/tests/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php +++ b/tests/php-unit-tests/unitary-tests/core/UniquenessConstraintTest.php @@ -19,8 +19,8 @@ class UniquenessConstraintTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'/core/metamodel.class.php'); - require_once(APPROOT.'/core/coreexception.class.inc.php'); + $this->RequireOnceItopFile('core/metamodel.class.php'); + $this->RequireOnceItopFile('core/coreexception.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php b/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php index 031a016c1..100de4f77 100644 --- a/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php +++ b/tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessTest.php @@ -10,8 +10,8 @@ class WeeklyScheduledProcessTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core/backgroundprocess.inc.php'); - require_once(APPROOT.'tests/php-unit-tests/unitary-tests/core/WeeklyScheduledProcessMockConfig.php'); + $this->RequireOnceItopFile('core/backgroundprocess.inc.php'); + $this->RequireOnceUnitTestFile('./WeeklyScheduledProcessMockConfig.php'); } diff --git a/tests/php-unit-tests/unitary-tests/core/apcEmulationTest.php b/tests/php-unit-tests/unitary-tests/core/apcEmulationTest.php index ac088f5a6..a25df610c 100644 --- a/tests/php-unit-tests/unitary-tests/core/apcEmulationTest.php +++ b/tests/php-unit-tests/unitary-tests/core/apcEmulationTest.php @@ -42,7 +42,7 @@ class apcEmulationTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core/apc-emulation.php'); + $this->RequireOnceItopFile('core/apc-emulation.php'); require_once 'mockApcEmulation.incphp'; apc_clear_cache(); } diff --git a/tests/php-unit-tests/unitary-tests/core/dictApcuTest.php b/tests/php-unit-tests/unitary-tests/core/dictApcuTest.php index 3207c12ca..fa8e4d19d 100644 --- a/tests/php-unit-tests/unitary-tests/core/dictApcuTest.php +++ b/tests/php-unit-tests/unitary-tests/core/dictApcuTest.php @@ -44,9 +44,9 @@ class dictApcuTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'coreexception.class.inc.php'); - require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'dict.class.inc.php'); - require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'apc-service.class.inc.php'); + $this->RequireOnceItopFile('core'.DIRECTORY_SEPARATOR.'coreexception.class.inc.php'); + $this->RequireOnceItopFile('core'.DIRECTORY_SEPARATOR.'dict.class.inc.php'); + $this->RequireOnceItopFile('core'.DIRECTORY_SEPARATOR.'apc-service.class.inc.php'); $this->sEnvName = time(); $_SESSION['itop_env'] = $this->sEnvName; diff --git a/tests/php-unit-tests/unitary-tests/core/dictTest.php b/tests/php-unit-tests/unitary-tests/core/dictTest.php index f27473eff..81d49d91b 100644 --- a/tests/php-unit-tests/unitary-tests/core/dictTest.php +++ b/tests/php-unit-tests/unitary-tests/core/dictTest.php @@ -42,9 +42,9 @@ class dictTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'coreexception.class.inc.php'); - require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'dict.class.inc.php'); - require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'apc-service.class.inc.php'); + $this->RequireOnceItopFile('core'.DIRECTORY_SEPARATOR.'coreexception.class.inc.php'); + $this->RequireOnceItopFile('core'.DIRECTORY_SEPARATOR.'dict.class.inc.php'); + $this->RequireOnceItopFile('core'.DIRECTORY_SEPARATOR.'apc-service.class.inc.php'); $this->sEnvName = time(); $sDictionaryFolder = APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries"; @mkdir($sDictionaryFolder, 0777, true); diff --git a/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php b/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php index e7772ec6c..78addc558 100644 --- a/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php +++ b/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php @@ -16,8 +16,8 @@ class iTopConfigParserTest extends ItopTestCase public function setUp(): void { parent::setUp(); - require_once APPROOT.'/core/iTopConfigParser.php'; - require_once APPROOT.'/setup/runtimeenv.class.inc.php'; + $this->RequireOnceItopFile('/core/iTopConfigParser.php'); + $this->RequireOnceItopFile('/setup/runtimeenv.class.inc.php'); clearstatcache(); $this->sConfigPath = utils::GetConfigFilePath(); diff --git a/tests/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php b/tests/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php index a9fb5d945..f09378dc7 100644 --- a/tests/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php +++ b/tests/php-unit-tests/unitary-tests/core/sanitizer/AbstractDOMSanitizerTest.php @@ -12,8 +12,8 @@ abstract class AbstractDOMSanitizerTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/utils.inc.php'); - require_once(APPROOT.'core/htmlsanitizer.class.inc.php'); + $this->RequireOnceItopFile('application/utils.inc.php'); + $this->RequireOnceItopFile('core/htmlsanitizer.class.inc.php'); } protected function ReadTestFile($sFileToTest, $sFolderName) diff --git a/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php b/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php index 76c30434a..72581c827 100644 --- a/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php +++ b/tests/php-unit-tests/unitary-tests/core/sanitizer/HTMLDOMSanitizerTest.php @@ -222,7 +222,7 @@ class HTMLDOMSanitizerTest extends AbstractDOMSanitizerTest */ public function testDoSanitizeCallInlineImageProcessImageTag($sHtml, $iExpectedCount) { - require_once APPROOT.'tests/php-unit-tests/unitary-tests/core/sanitizer/InlineImageMock.php'; + $this->RequireOnceUnitTestFile('./InlineImageMock.php'); InlineImageMock::ResetCallCounter(); $oSanitizer = new HTMLDOMSanitizer(InlineImageMock::class); diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php index 867a28ed5..e49ae24e6 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php @@ -25,8 +25,8 @@ class UserLocalTest extends ItopDataTestCase { parent::setUp(); - require_once(APPROOT.'tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest/UserLocalPasswordPolicyMock.php'); - require_once(APPROOT.'env-production/authent-local/model.authent-local.php'); + $this->RequireOnceUnitTestFile('./UserLocalTest/UserLocalPasswordPolicyMock.php'); + $this->RequireOnceItopFile('env-production/authent-local/model.authent-local.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php index 68eb076e1..c94292bee 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php @@ -19,8 +19,8 @@ class iTopConfigAstValidatorTest extends ItopTestCase { parent::setUp(); - require_once APPROOT.'env-production/itop-config/src/Validator/ConfigNodesVisitor.php'; - require_once APPROOT.'env-production/itop-config/src/Validator/iTopConfigAstValidator.php'; + $this->RequireOnceItopFile('env-production/itop-config/src/Validator/ConfigNodesVisitor.php'); + $this->RequireOnceItopFile('env-production/itop-config/src/Validator/iTopConfigAstValidator.php'); } diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php index c4a5aaa1e..fc361a503 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php @@ -20,8 +20,8 @@ class iTopConfigSyntaxValidatorTest extends ItopTestCase { parent::setUp(); - require_once APPROOT.'env-production/itop-config/src/Validator/ConfigNodesVisitor.php'; - require_once APPROOT.'env-production/itop-config/src/Validator/iTopConfigSyntaxValidator.php'; + $this->RequireOnceItopFile('env-production/itop-config/src/Validator/ConfigNodesVisitor.php'); + $this->RequireOnceItopFile('env-production/itop-config/src/Validator/iTopConfigSyntaxValidator.php'); } diff --git a/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php b/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php index 3ad7a2115..390082d16 100644 --- a/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php @@ -22,7 +22,7 @@ class DBBackupTest extends ItopTestCase protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'setup/backup.class.inc.php'); + $this->RequireOnceItopFile('setup/backup.class.inc.php'); // We need a connection to the DB, so let's open it ! // We are using the default config file... as the server might not be configured for all the combination we are testing diff --git a/tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php b/tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php index b93a9a5f0..d38488bf6 100644 --- a/tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php @@ -21,8 +21,8 @@ class SetupUtilsTest extends ItopTestCase { parent::setUp(); - require_once APPROOT.'setup/setuputils.class.inc.php'; - require_once APPROOT.'setup/setuppage.class.inc.php'; + $this->RequireOnceItopFile('setup/setuputils.class.inc.php'); + $this->RequireOnceItopFile('setup/setuppage.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php b/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php index 2d9b83605..cf13231af 100644 --- a/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/iTopDesignFormat/iTopDesignFormatTest.php @@ -19,8 +19,8 @@ class iTopDesignFormatTest extends ItopTestCase { parent::setUp(); - require_once APPROOT.'setup/modelfactory.class.inc.php'; - require_once APPROOT.'setup/itopdesignformat.class.inc.php'; + $this->RequireOnceItopFile('setup/modelfactory.class.inc.php'); + $this->RequireOnceItopFile('setup/itopdesignformat.class.inc.php'); } /** diff --git a/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php index 5924d0960..c01ad8606 100644 --- a/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php +++ b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/TwigTest.php @@ -15,7 +15,7 @@ class TwigTest extends ItopDataTestCase protected function setUp(): void { parent::setUp(); - require_once __DIR__.'/../../core/config.class.inc.php'; + $this->RequireOnceItopFile('core/config.class.inc.php'); } /** @@ -43,6 +43,7 @@ class TwigTest extends ItopDataTestCase { $oTwig->addFunction($oFunction); } + } public static function testTemplateProvider() { 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 4dc6a559a..70c002ce7 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 @@ -92,9 +92,9 @@ class StatusIncTest extends TestCase { include_once($this->sAppRoot . '/status.inc.php'); StatusCheckConfigFile(); - require_once(APPROOT . '/core/cmdbobject.class.inc.php'); - require_once(APPROOT . '/application/utils.inc.php'); - require_once(APPROOT . '/core/contexttag.class.inc.php'); + require_once(APPROOT . '/core/cmdbobject.class.inc.php'); + require_once(APPROOT . '/application/utils.inc.php'); + require_once(APPROOT . '/core/contexttag.class.inc.php'); $oConfigWrong = new Config(ITOP_DEFAULT_CONFIG_FILE); $oConfigWrong->Set('db_pwd', $oConfigWrong->Get('db_pwd') . '_unittest'); From fbc0a898ae86cbb4b68957766813ac1d5c63fa54 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 6 Jan 2023 18:35:48 +0100 Subject: [PATCH 19/19] =?UTF-8?q?N=C2=B05608=20-=20Move=20test=20files=20t?= =?UTF-8?q?o=20corresponding=20directories=20after=20branch=20rebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../php-unit-tests/unitary-tests}/setup/ModelFactoryTest.php | 2 +- .../unitary-tests/sources}/application/RuntimeDashboardTest.php | 0 .../unitary-tests/sources}/application/TestAutoload.php | 0 .../sources/application/TwigBase/Twig/attacker/backdoor | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename {test => tests/php-unit-tests/unitary-tests}/setup/ModelFactoryTest.php (99%) rename {test => tests/php-unit-tests/unitary-tests/sources}/application/RuntimeDashboardTest.php (100%) rename {test => tests/php-unit-tests/unitary-tests/sources}/application/TestAutoload.php (100%) rename {test => tests}/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/attacker/backdoor (100%) diff --git a/test/setup/ModelFactoryTest.php b/tests/php-unit-tests/unitary-tests/setup/ModelFactoryTest.php similarity index 99% rename from test/setup/ModelFactoryTest.php rename to tests/php-unit-tests/unitary-tests/setup/ModelFactoryTest.php index 46c7aef2c..94e56cf67 100644 --- a/test/setup/ModelFactoryTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/ModelFactoryTest.php @@ -36,7 +36,7 @@ class ModelFactoryTest extends ItopTestCase { parent::setUp(); - require_once(APPROOT.'setup/modelfactory.class.inc.php'); + $this->RequireOnceItopFile('setup/modelfactory.class.inc.php'); } /** diff --git a/test/application/RuntimeDashboardTest.php b/tests/php-unit-tests/unitary-tests/sources/application/RuntimeDashboardTest.php similarity index 100% rename from test/application/RuntimeDashboardTest.php rename to tests/php-unit-tests/unitary-tests/sources/application/RuntimeDashboardTest.php diff --git a/test/application/TestAutoload.php b/tests/php-unit-tests/unitary-tests/sources/application/TestAutoload.php similarity index 100% rename from test/application/TestAutoload.php rename to tests/php-unit-tests/unitary-tests/sources/application/TestAutoload.php diff --git a/test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/attacker/backdoor b/tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/attacker/backdoor similarity index 100% rename from test/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/attacker/backdoor rename to tests/php-unit-tests/unitary-tests/sources/application/TwigBase/Twig/attacker/backdoor