diff --git a/.codacy.yml b/.codacy.yml index 312dcc197eb..375921f22db 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -14,8 +14,8 @@ exclude_paths: - 'accounts/rollup.config.js' - 'deployments/**' - 'tests/acceptance/expected-failures-*.md' - - 'tests/acceptance/features/bootstrap/**' - - 'tests/TestHelpers/**' + - 'tests/acceptance/bootstrap/**' + - 'tests/acceptance/TestHelpers/**' - 'tests/acceptance/run.sh' - 'vendor/**/*' - 'tests/ociswrapper/vendor/**' diff --git a/Makefile b/Makefile index d594613951b..5c2a3060571 100644 --- a/Makefile +++ b/Makefile @@ -336,7 +336,7 @@ ci-format: $(BUILDIFIER) .PHONY: test-php-style test-php-style: vendor-bin/owncloud-codestyle/vendor vendor-bin/php_codesniffer/vendor $(PHP_CS_FIXER) fix -v --diff --allow-risky yes --dry-run - $(PHP_CODESNIFFER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance tests/TestHelpers + $(PHP_CODESNIFFER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance tests/acceptance/TestHelpers .PHONY: test-php-style-fix test-php-style-fix: vendor-bin/owncloud-codestyle/vendor diff --git a/tests/TestHelpers/Asserts/WebDav.php b/tests/acceptance/TestHelpers/Asserts/WebDav.php similarity index 100% rename from tests/TestHelpers/Asserts/WebDav.php rename to tests/acceptance/TestHelpers/Asserts/WebDav.php diff --git a/tests/TestHelpers/CliHelper.php b/tests/acceptance/TestHelpers/CliHelper.php similarity index 100% rename from tests/TestHelpers/CliHelper.php rename to tests/acceptance/TestHelpers/CliHelper.php diff --git a/tests/TestHelpers/EmailHelper.php b/tests/acceptance/TestHelpers/EmailHelper.php similarity index 100% rename from tests/TestHelpers/EmailHelper.php rename to tests/acceptance/TestHelpers/EmailHelper.php diff --git a/tests/TestHelpers/GraphHelper.php b/tests/acceptance/TestHelpers/GraphHelper.php similarity index 100% rename from tests/TestHelpers/GraphHelper.php rename to tests/acceptance/TestHelpers/GraphHelper.php diff --git a/tests/TestHelpers/HttpLogger.php b/tests/acceptance/TestHelpers/HttpLogger.php similarity index 98% rename from tests/TestHelpers/HttpLogger.php rename to tests/acceptance/TestHelpers/HttpLogger.php index 6d755030f43..bf871bb194c 100644 --- a/tests/TestHelpers/HttpLogger.php +++ b/tests/acceptance/TestHelpers/HttpLogger.php @@ -33,7 +33,7 @@ class HttpLogger { * @return string */ public static function getLogDir(): string { - return __DIR__ . '/../acceptance/logs'; + return __DIR__ . '/../logs'; } /** diff --git a/tests/TestHelpers/HttpRequestHelper.php b/tests/acceptance/TestHelpers/HttpRequestHelper.php similarity index 100% rename from tests/TestHelpers/HttpRequestHelper.php rename to tests/acceptance/TestHelpers/HttpRequestHelper.php diff --git a/tests/TestHelpers/OcisConfigHelper.php b/tests/acceptance/TestHelpers/OcisConfigHelper.php similarity index 100% rename from tests/TestHelpers/OcisConfigHelper.php rename to tests/acceptance/TestHelpers/OcisConfigHelper.php diff --git a/tests/TestHelpers/OcisHelper.php b/tests/acceptance/TestHelpers/OcisHelper.php similarity index 100% rename from tests/TestHelpers/OcisHelper.php rename to tests/acceptance/TestHelpers/OcisHelper.php diff --git a/tests/TestHelpers/OcmHelper.php b/tests/acceptance/TestHelpers/OcmHelper.php similarity index 100% rename from tests/TestHelpers/OcmHelper.php rename to tests/acceptance/TestHelpers/OcmHelper.php diff --git a/tests/TestHelpers/OcsApiHelper.php b/tests/acceptance/TestHelpers/OcsApiHelper.php similarity index 100% rename from tests/TestHelpers/OcsApiHelper.php rename to tests/acceptance/TestHelpers/OcsApiHelper.php diff --git a/tests/TestHelpers/SettingsHelper.php b/tests/acceptance/TestHelpers/SettingsHelper.php similarity index 100% rename from tests/TestHelpers/SettingsHelper.php rename to tests/acceptance/TestHelpers/SettingsHelper.php diff --git a/tests/TestHelpers/SetupHelper.php b/tests/acceptance/TestHelpers/SetupHelper.php similarity index 100% rename from tests/TestHelpers/SetupHelper.php rename to tests/acceptance/TestHelpers/SetupHelper.php diff --git a/tests/TestHelpers/SharingHelper.php b/tests/acceptance/TestHelpers/SharingHelper.php similarity index 100% rename from tests/TestHelpers/SharingHelper.php rename to tests/acceptance/TestHelpers/SharingHelper.php diff --git a/tests/TestHelpers/SpaceNotFoundException.php b/tests/acceptance/TestHelpers/SpaceNotFoundException.php similarity index 100% rename from tests/TestHelpers/SpaceNotFoundException.php rename to tests/acceptance/TestHelpers/SpaceNotFoundException.php diff --git a/tests/TestHelpers/TranslationHelper.php b/tests/acceptance/TestHelpers/TranslationHelper.php similarity index 100% rename from tests/TestHelpers/TranslationHelper.php rename to tests/acceptance/TestHelpers/TranslationHelper.php diff --git a/tests/TestHelpers/UploadHelper.php b/tests/acceptance/TestHelpers/UploadHelper.php similarity index 100% rename from tests/TestHelpers/UploadHelper.php rename to tests/acceptance/TestHelpers/UploadHelper.php diff --git a/tests/TestHelpers/UserHelper.php b/tests/acceptance/TestHelpers/UserHelper.php similarity index 100% rename from tests/TestHelpers/UserHelper.php rename to tests/acceptance/TestHelpers/UserHelper.php diff --git a/tests/TestHelpers/WebDavHelper.php b/tests/acceptance/TestHelpers/WebDavHelper.php similarity index 100% rename from tests/TestHelpers/WebDavHelper.php rename to tests/acceptance/TestHelpers/WebDavHelper.php diff --git a/tests/acceptance/features/bootstrap/ArchiverContext.php b/tests/acceptance/bootstrap/ArchiverContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/ArchiverContext.php rename to tests/acceptance/bootstrap/ArchiverContext.php diff --git a/tests/acceptance/features/bootstrap/AuthContext.php b/tests/acceptance/bootstrap/AuthContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/AuthContext.php rename to tests/acceptance/bootstrap/AuthContext.php diff --git a/tests/acceptance/features/bootstrap/CapabilitiesContext.php b/tests/acceptance/bootstrap/CapabilitiesContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/CapabilitiesContext.php rename to tests/acceptance/bootstrap/CapabilitiesContext.php diff --git a/tests/acceptance/features/bootstrap/ChecksumContext.php b/tests/acceptance/bootstrap/ChecksumContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/ChecksumContext.php rename to tests/acceptance/bootstrap/ChecksumContext.php diff --git a/tests/acceptance/features/bootstrap/CliContext.php b/tests/acceptance/bootstrap/CliContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/CliContext.php rename to tests/acceptance/bootstrap/CliContext.php diff --git a/tests/acceptance/features/bootstrap/FavoritesContext.php b/tests/acceptance/bootstrap/FavoritesContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/FavoritesContext.php rename to tests/acceptance/bootstrap/FavoritesContext.php diff --git a/tests/acceptance/features/bootstrap/FeatureContext.php b/tests/acceptance/bootstrap/FeatureContext.php similarity index 99% rename from tests/acceptance/features/bootstrap/FeatureContext.php rename to tests/acceptance/bootstrap/FeatureContext.php index 8c89667cb33..5ee1a2f1484 100644 --- a/tests/acceptance/features/bootstrap/FeatureContext.php +++ b/tests/acceptance/bootstrap/FeatureContext.php @@ -2453,7 +2453,7 @@ public function temporaryStorageSubfolderName(): string { * @return string */ public function acceptanceTestsDirLocation(): string { - return \dirname(__FILE__) . "/../../"; + return \dirname(__FILE__) . "/../"; } /** @@ -2857,9 +2857,9 @@ public static function getScenarioLine($scope): string { public static function isExpectedToFail(string $scenarioLine): bool { $expectedFailFile = \getenv('EXPECTED_FAILURES_FILE'); if (!$expectedFailFile) { - $expectedFailFile = __DIR__ . '/../../expected-failures-localAPI-on-OCIS-storage.md'; + $expectedFailFile = __DIR__ . '/../expected-failures-localAPI-on-OCIS-storage.md'; if (\strpos($scenarioLine, "coreApi") === 0) { - $expectedFailFile = __DIR__ . '/../../expected-failures-API-on-OCIS-storage.md'; + $expectedFailFile = __DIR__ . '/../expected-failures-API-on-OCIS-storage.md'; } } diff --git a/tests/acceptance/features/bootstrap/FilesVersionsContext.php b/tests/acceptance/bootstrap/FilesVersionsContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/FilesVersionsContext.php rename to tests/acceptance/bootstrap/FilesVersionsContext.php diff --git a/tests/acceptance/features/bootstrap/GraphContext.php b/tests/acceptance/bootstrap/GraphContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/GraphContext.php rename to tests/acceptance/bootstrap/GraphContext.php diff --git a/tests/acceptance/features/bootstrap/NotificationContext.php b/tests/acceptance/bootstrap/NotificationContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/NotificationContext.php rename to tests/acceptance/bootstrap/NotificationContext.php diff --git a/tests/acceptance/features/bootstrap/OCSContext.php b/tests/acceptance/bootstrap/OCSContext.php similarity index 99% rename from tests/acceptance/features/bootstrap/OCSContext.php rename to tests/acceptance/bootstrap/OCSContext.php index 6e3b04b973f..af219026e1a 100644 --- a/tests/acceptance/features/bootstrap/OCSContext.php +++ b/tests/acceptance/bootstrap/OCSContext.php @@ -613,7 +613,7 @@ public function getOCSResponseStatusMessage(ResponseInterface $response):string public function getActualStatusMessage(string $statusMessage, ?string $language = null):string { if ($language !== null) { $multiLingualMessage = \json_decode( - \file_get_contents(__DIR__ . "/../../fixtures/multiLanguageErrors.json"), + \file_get_contents(__DIR__ . "/../fixtures/multiLanguageErrors.json"), true ); diff --git a/tests/acceptance/features/bootstrap/OcisConfigContext.php b/tests/acceptance/bootstrap/OcisConfigContext.php similarity index 98% rename from tests/acceptance/features/bootstrap/OcisConfigContext.php rename to tests/acceptance/bootstrap/OcisConfigContext.php index cbfb0289ea6..c5b97e41c88 100644 --- a/tests/acceptance/features/bootstrap/OcisConfigContext.php +++ b/tests/acceptance/bootstrap/OcisConfigContext.php @@ -85,7 +85,7 @@ public function theConfigHasBeenSetTo(string $configVariable, string $configValu * @throws GuzzleException */ public function theConfigHasBeenSetPathTo(string $configVariable, string $path): void { - $path = \dirname(__FILE__) . "/../../../" . $path; + $path = \dirname(__FILE__) . "/../../" . $path; $response = OcisConfigHelper::reConfigureOcis( [ $configVariable => $path diff --git a/tests/acceptance/features/bootstrap/OcmContext.php b/tests/acceptance/bootstrap/OcmContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/OcmContext.php rename to tests/acceptance/bootstrap/OcmContext.php diff --git a/tests/acceptance/features/bootstrap/Provisioning.php b/tests/acceptance/bootstrap/Provisioning.php similarity index 100% rename from tests/acceptance/features/bootstrap/Provisioning.php rename to tests/acceptance/bootstrap/Provisioning.php diff --git a/tests/acceptance/features/bootstrap/PublicWebDavContext.php b/tests/acceptance/bootstrap/PublicWebDavContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/PublicWebDavContext.php rename to tests/acceptance/bootstrap/PublicWebDavContext.php diff --git a/tests/acceptance/features/bootstrap/SearchContext.php b/tests/acceptance/bootstrap/SearchContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/SearchContext.php rename to tests/acceptance/bootstrap/SearchContext.php diff --git a/tests/acceptance/features/bootstrap/SettingsContext.php b/tests/acceptance/bootstrap/SettingsContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/SettingsContext.php rename to tests/acceptance/bootstrap/SettingsContext.php diff --git a/tests/acceptance/features/bootstrap/ShareesContext.php b/tests/acceptance/bootstrap/ShareesContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/ShareesContext.php rename to tests/acceptance/bootstrap/ShareesContext.php diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/bootstrap/Sharing.php similarity index 100% rename from tests/acceptance/features/bootstrap/Sharing.php rename to tests/acceptance/bootstrap/Sharing.php diff --git a/tests/acceptance/features/bootstrap/SharingNgContext.php b/tests/acceptance/bootstrap/SharingNgContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/SharingNgContext.php rename to tests/acceptance/bootstrap/SharingNgContext.php diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/bootstrap/SpacesContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/SpacesContext.php rename to tests/acceptance/bootstrap/SpacesContext.php diff --git a/tests/acceptance/features/bootstrap/SpacesTUSContext.php b/tests/acceptance/bootstrap/SpacesTUSContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/SpacesTUSContext.php rename to tests/acceptance/bootstrap/SpacesTUSContext.php diff --git a/tests/acceptance/features/bootstrap/TUSContext.php b/tests/acceptance/bootstrap/TUSContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/TUSContext.php rename to tests/acceptance/bootstrap/TUSContext.php diff --git a/tests/acceptance/features/bootstrap/TagContext.php b/tests/acceptance/bootstrap/TagContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/TagContext.php rename to tests/acceptance/bootstrap/TagContext.php diff --git a/tests/acceptance/features/bootstrap/TrashbinContext.php b/tests/acceptance/bootstrap/TrashbinContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/TrashbinContext.php rename to tests/acceptance/bootstrap/TrashbinContext.php diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/bootstrap/WebDav.php similarity index 99% rename from tests/acceptance/features/bootstrap/WebDav.php rename to tests/acceptance/bootstrap/WebDav.php index cbdadefa9f6..d2c9e2555d0 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/bootstrap/WebDav.php @@ -3939,7 +3939,7 @@ public function checkImageDimensions(string $width, string $height, ?ResponseInt * @throws Exception */ public function theDownloadedPreviewContentShouldMatchWithFixturesPreviewContentFor(string $filename):void { - $expectedPreview = \file_get_contents(__DIR__ . "/../../fixtures/" . $filename); + $expectedPreview = \file_get_contents(__DIR__ . "/../fixtures/" . $filename); Assert::assertEquals($expectedPreview, $this->responseBodyContent); } diff --git a/tests/acceptance/features/bootstrap/WebDavLockingContext.php b/tests/acceptance/bootstrap/WebDavLockingContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/WebDavLockingContext.php rename to tests/acceptance/bootstrap/WebDavLockingContext.php diff --git a/tests/acceptance/features/bootstrap/WebDavPropertiesContext.php b/tests/acceptance/bootstrap/WebDavPropertiesContext.php similarity index 100% rename from tests/acceptance/features/bootstrap/WebDavPropertiesContext.php rename to tests/acceptance/bootstrap/WebDavPropertiesContext.php diff --git a/tests/acceptance/features/bootstrap/bootstrap.php b/tests/acceptance/bootstrap/bootstrap.php similarity index 97% rename from tests/acceptance/features/bootstrap/bootstrap.php rename to tests/acceptance/bootstrap/bootstrap.php index 7eac6e5e670..992d01ae8dc 100644 --- a/tests/acceptance/features/bootstrap/bootstrap.php +++ b/tests/acceptance/bootstrap/bootstrap.php @@ -25,7 +25,7 @@ $classLoader = new ClassLoader(); -$classLoader->addPsr4("TestHelpers\\", __DIR__ . "/../../../TestHelpers", true); +$classLoader->addPsr4("TestHelpers\\", __DIR__ . "/../TestHelpers", true); $classLoader->register(); diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index 5e53095fcb0..0be28e490d2 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -1,6 +1,6 @@ default: autoload: - "": "%paths.base%/../features/bootstrap" + "": "%paths.base%/../bootstrap" suites: coreApiMain: paths: diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 930e5861a5c..a4ccfcaafa6 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -1,6 +1,6 @@ default: autoload: - "": "%paths.base%/../features/bootstrap" + "": "%paths.base%/../bootstrap" suites: apiAccountsHashDifficulty: