diff --git a/dev/phpunit/functional/FunctionalTests.php b/dev/phpunit/functional/FunctionalTests.php index 67a42849..a4ddb7fc 100644 --- a/dev/phpunit/functional/FunctionalTests.php +++ b/dev/phpunit/functional/FunctionalTests.php @@ -174,7 +174,7 @@ public function testMagentoTwoFour() { $this->assertFileExists(BASE_DIR . '/dev/instances/magento24/app/etc/env.php', "Magento 2.4 is not installed"); - exec($this->generateAnalyseCommand('/dev/instances/magento24', '--sort-by-type --vendor-namespaces Ampersand'), $output, $return); + exec($this->generateAnalyseCommand('/dev/instances/../instances/magento24', '--sort-by-type --vendor-namespaces Ampersand'), $output, $return); $this->assertEquals(0, $return, "The return code of the command was not zero"); $lastLine = array_pop($output); @@ -204,7 +204,7 @@ public function testMagentoTwoFourNoDb() $this->assertFileExists(BASE_DIR . '/dev/instances/magento24nodb/app/etc/di.xml', "Magento 2.4 directory is wrong"); $this->assertFileNotExists(BASE_DIR . '/dev/instances/magento24nodb/app/etc/env.php', "Magento 2.4 is installed when it shouldnt be"); - exec($this->generateAnalyseCommand('/dev/instances/magento24nodb', '--sort-by-type --vendor-namespaces Ampersand'), $output, $return); + exec($this->generateAnalyseCommand('/dev/instances/../instances/magento24nodb', '--sort-by-type --vendor-namespaces Ampersand'), $output, $return); $this->assertEquals(0, $return, "The return code of the command was not zero"); $lastLine = array_pop($output); diff --git a/src/Ampersand/PatchHelper/Command/AnalyseCommand.php b/src/Ampersand/PatchHelper/Command/AnalyseCommand.php index 49093022..feee8662 100644 --- a/src/Ampersand/PatchHelper/Command/AnalyseCommand.php +++ b/src/Ampersand/PatchHelper/Command/AnalyseCommand.php @@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $patchFilesToOutput[$file] = $patchFile; } foreach ($errors as $error) { - $summaryOutputData[] = [$errorType, $file, ltrim(str_replace($projectDir, '', $error), '/')]; + $summaryOutputData[] = [$errorType, $file, ltrim(str_replace(realpath($projectDir), '', $error), '/')]; if ($errorType === Helper\PatchOverrideValidator::TYPE_FILE_OVERRIDE && $input->getOption('auto-theme-update') && is_numeric($input->getOption('auto-theme-update'))) { $patchFile->applyToTheme($projectDir, $error, $input->getOption('auto-theme-update'));