[BUGFIX] Use absolute path to check for extensions 86/27786/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Feb 2014 15:33:52 +0000 (16:33 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Feb 2014 21:54:53 +0000 (22:54 +0100)
The functional test utility assumes that the current
working directory is the document root, which must
not necessarily be true.

Use the absolute path to check for existence of
extension directories instead.

Resolves: #56204
Releases: 6.2
Change-Id: I9e5fa06f0e069c04586de7c23edc80e070ef4aa9
Reviewed-on: https://review.typo3.org/27786
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Tests/FunctionalTestCaseBootstrapUtility.php

index d041466..0af5224 100644 (file)
@@ -209,13 +209,13 @@ class FunctionalTestCaseBootstrapUtility {
         */
        protected function linkTestExtensionsToInstance(array $extensionPaths) {
                foreach ($extensionPaths as $extensionPath) {
-                       if (!is_dir($extensionPath)) {
+                       $absoluteExtensionPath = ORIGINAL_ROOT . $extensionPath;
+                       if (!is_dir($absoluteExtensionPath)) {
                                throw new Exception(
-                                       'Test extension path ' . $extensionPath . ' not found',
+                                       'Test extension path ' . $absoluteExtensionPath . ' not found',
                                        1376745645
                                );
                        }
-                       $absoluteExtensionPath = ORIGINAL_ROOT . $extensionPath;
                        $destinationPath = $this->instancePath . '/typo3conf/ext/'. basename($absoluteExtensionPath);
                        $success = symlink($absoluteExtensionPath, $destinationPath);
                        if (!$success) {