diff --git a/src/Test/MakerTestEnvironment.php b/src/Test/MakerTestEnvironment.php index f7af580ff..ad3d72e25 100644 --- a/src/Test/MakerTestEnvironment.php +++ b/src/Test/MakerTestEnvironment.php @@ -145,7 +145,7 @@ public function prepareDirectory(): void try { // let's do some magic here git is faster than copy MakerTestProcess::create( - '\\' === \DIRECTORY_SEPARATOR ? 'git clone %FLEX_PATH% %APP_PATH%' : 'git clone "$FLEX_PATH" "$APP_PATH"', + '\\' === \DIRECTORY_SEPARATOR ? 'cp -R %FLEX_PATH% %APP_PATH%' : 'cp -R "$FLEX_PATH" "$APP_PATH"', \dirname($this->flexPath), [ 'FLEX_PATH' => $this->flexPath, @@ -260,7 +260,7 @@ private function buildFlexSkeleton(): void } // fetch a few packages needed for testing - MakerTestProcess::create('composer require phpunit browser-kit symfony/css-selector --prefer-dist --no-progress --no-suggest', $this->flexPath) + MakerTestProcess::create('composer require phpunit/phpunit:"^9.6" phpunit-bridge browser-kit symfony/css-selector --prefer-dist --no-progress --no-suggest', $this->flexPath) ->run(); if ('\\' !== \DIRECTORY_SEPARATOR) { @@ -283,7 +283,7 @@ private function buildFlexSkeleton(): void 'replace' => '', ], ]; - $this->processReplacements($replacements, $this->flexPath); + $this->processReplacements($replacements, $this->flexPath, allowNotFound: true); // end of temp code file_put_contents($this->flexPath.'/.gitignore', "var/cache/\n"); @@ -294,10 +294,10 @@ private function buildFlexSkeleton(): void )->run(); } - private function processReplacements(array $replacements, string $rootDir): void + private function processReplacements(array $replacements, string $rootDir, bool $allowNotFound = false): void { foreach ($replacements as $replacement) { - $this->processReplacement($rootDir, $replacement['filename'], $replacement['find'], $replacement['replace']); + $this->processReplacement($rootDir, $replacement['filename'], $replacement['find'], $replacement['replace'], $allowNotFound); } } diff --git a/src/Test/MakerTestRunner.php b/src/Test/MakerTestRunner.php index 4e6287437..eaaa3327c 100644 --- a/src/Test/MakerTestRunner.php +++ b/src/Test/MakerTestRunner.php @@ -207,7 +207,7 @@ public function updateSchema(): void public function runTests(): void { $internalTestProcess = MakerTestProcess::create( - \sprintf('php %s', $this->getPath('bin/phpunit')), + \sprintf('php %s', $this->getPath('vendor/bin/phpunit')), $this->environment->getPath()) ->run(true) ;