From 2337c87851f3c8a3286db52e7b73aef7cd6f8fd3 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 21 Jan 2025 18:21:17 +1100 Subject: [PATCH] Fixed UPDATE_TEST_FIXTURES. --- .../Fixtures/no_install/2_post_install/vendor/.gitkeep | 0 tests/phpunit/Functional/CustomizerTestCase.php | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tests/phpunit/Fixtures/no_install/2_post_install/vendor/.gitkeep diff --git a/tests/phpunit/Fixtures/no_install/2_post_install/vendor/.gitkeep b/tests/phpunit/Fixtures/no_install/2_post_install/vendor/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/phpunit/Functional/CustomizerTestCase.php b/tests/phpunit/Functional/CustomizerTestCase.php index a2484c1..d485533 100644 --- a/tests/phpunit/Functional/CustomizerTestCase.php +++ b/tests/phpunit/Functional/CustomizerTestCase.php @@ -684,9 +684,9 @@ protected function assertDirectoriesEqual(string $dir1, string $dir2, ?callable $allowed_files = array_keys($dir2_files); $finder = new Finder(); $finder->files()->in($dir2)->filter(static function (\SplFileInfo $file) use ($allowed_files, $dir2): bool { - $relativePath = str_replace($dir2 . DIRECTORY_SEPARATOR, '', $file->getRealPath()); + $relative_path = str_replace(realpath($dir2) . DIRECTORY_SEPARATOR, '', $file->getRealPath()); - return in_array($relativePath, $allowed_files); + return in_array($relative_path, $allowed_files); }); $this->fs->mirror($dir2, $dir1, $finder->getIterator(), [