From 93e0e7e294dc0a08b4b8fd29a0b232affeb7f9c4 Mon Sep 17 00:00:00 2001 From: Vladimir Sadicov Date: Sat, 23 Nov 2019 11:51:41 +0100 Subject: [PATCH 1/4] fixing tests --- src/Test/MakerTestEnvironment.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Test/MakerTestEnvironment.php b/src/Test/MakerTestEnvironment.php index ff2f428e9..6d45d7e46 100644 --- a/src/Test/MakerTestEnvironment.php +++ b/src/Test/MakerTestEnvironment.php @@ -17,6 +17,7 @@ use Symfony\Component\HttpClient\HttpClient; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\InputStream; +use vendor\project\StatusTest; /** * @author Sadicov Vladimir @@ -350,12 +351,11 @@ private function buildFlexSkeleton() // 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) ->run(); - $this->fs->remove($this->flexPath.'/vendor/symfony/phpunit-bridge'); if ('\\' !== \DIRECTORY_SEPARATOR) { - $this->fs->symlink('../../../../../../vendor/symfony/phpunit-bridge', './vendor/symfony/phpunit-bridge'); - } else { - $this->fs->mirror(\dirname(__DIR__, 2).'/vendor/symfony/phpunit-bridge', $this->flexPath.'/vendor/symfony/phpunit-bridge'); + $this->fs->remove($this->flexPath.'/vendor/symfony/phpunit-bridge'); + + $this->fs->symlink($rootPath.'/vendor/symfony/phpunit-bridge', $this->flexPath.'/vendor/symfony/phpunit-bridge'); } // temporarily ignoring indirect deprecations - see #237 From 39d5f4bef65c98c312d598d844735f508c589821 Mon Sep 17 00:00:00 2001 From: Vladimir Sadicov Date: Sat, 23 Nov 2019 11:54:03 +0100 Subject: [PATCH 2/4] remove wrong use statement --- src/Test/MakerTestEnvironment.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Test/MakerTestEnvironment.php b/src/Test/MakerTestEnvironment.php index 6d45d7e46..1d7c5c367 100644 --- a/src/Test/MakerTestEnvironment.php +++ b/src/Test/MakerTestEnvironment.php @@ -17,7 +17,6 @@ use Symfony\Component\HttpClient\HttpClient; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\InputStream; -use vendor\project\StatusTest; /** * @author Sadicov Vladimir From 4b2a87606f7bb17a055431618d604723a1e47be9 Mon Sep 17 00:00:00 2001 From: Vladimir Sadicov Date: Sat, 23 Nov 2019 12:33:56 +0100 Subject: [PATCH 3/4] configure dev and stable-dev works with php7.2 --- .travis.yml | 4 ++-- src/Test/MakerTestDetails.php | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8bff24f9..94249c448 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,9 +18,9 @@ matrix: fast_finish: true include: - php: 7.3 - - php: 7.1 + - php: 7.2 env: MAKER_TEST_VERSION=stable-dev - - php: 7.1 + - php: 7.2 env: MAKER_TEST_VERSION=dev before_install: diff --git a/src/Test/MakerTestDetails.php b/src/Test/MakerTestDetails.php index f1bbb298c..2d39f5431 100644 --- a/src/Test/MakerTestDetails.php +++ b/src/Test/MakerTestDetails.php @@ -47,9 +47,6 @@ final class MakerTestDetails private $guardAuthenticators = []; /** - * @param MakerInterface $maker - * @param array $inputs - * * @return static */ public static function createTest(MakerInterface $maker, array $inputs) From 4712a5d7827ed247bf68ee36f34fe393a969ce58 Mon Sep 17 00:00:00 2001 From: Vladimir Sadicov Date: Sat, 23 Nov 2019 13:09:51 +0100 Subject: [PATCH 4/4] move clearing cache before premake --- src/Test/MakerTestEnvironment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Test/MakerTestEnvironment.php b/src/Test/MakerTestEnvironment.php index 1d7c5c367..47370b0dc 100644 --- a/src/Test/MakerTestEnvironment.php +++ b/src/Test/MakerTestEnvironment.php @@ -199,11 +199,11 @@ private function preMake() public function runMaker() { - $this->preMake(); - // Lets remove cache $this->fs->remove($this->path.'/var/cache'); + $this->preMake(); + // We don't need ansi coloring in tests! $testProcess = MakerTestProcess::create( sprintf('php bin/console %s %s --no-ansi', $this->testDetails->getMaker()::getCommandName(), $this->testDetails->getArgumentsString()),