Skip to content

Commit 2186c3b

Browse files
committed
minor #497 [sfhackday2019] Fixing tests (sadikoff)
This PR was squashed before being merged into the 1.0-dev branch (closes #497). Discussion ---------- [sfhackday2019] Fixing tests Improve symlinking phpunit-bridge inside testing flex project. Commits ------- 4712a5d move clearing cache before premake 4b2a876 configure dev and stable-dev works with php7.2 39d5f4b remove wrong use statement 93e0e7e fixing tests
2 parents c864e7f + 4712a5d commit 2186c3b

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ matrix:
1818
fast_finish: true
1919
include:
2020
- php: 7.3
21-
- php: 7.1
21+
- php: 7.2
2222
env: MAKER_TEST_VERSION=stable-dev
23-
- php: 7.1
23+
- php: 7.2
2424
env: MAKER_TEST_VERSION=dev
2525

2626
before_install:

src/Test/MakerTestDetails.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ final class MakerTestDetails
4747
private $guardAuthenticators = [];
4848

4949
/**
50-
* @param MakerInterface $maker
51-
* @param array $inputs
52-
*
5350
* @return static
5451
*/
5552
public static function createTest(MakerInterface $maker, array $inputs)

src/Test/MakerTestEnvironment.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ private function preMake()
199199

200200
public function runMaker()
201201
{
202-
$this->preMake();
203-
204202
// Lets remove cache
205203
$this->fs->remove($this->path.'/var/cache');
206204

205+
$this->preMake();
206+
207207
// We don't need ansi coloring in tests!
208208
$testProcess = MakerTestProcess::create(
209209
sprintf('php bin/console %s %s --no-ansi', $this->testDetails->getMaker()::getCommandName(), $this->testDetails->getArgumentsString()),
@@ -350,12 +350,11 @@ private function buildFlexSkeleton()
350350
// fetch a few packages needed for testing
351351
MakerTestProcess::create('composer require phpunit browser-kit symfony/css-selector --prefer-dist --no-progress --no-suggest', $this->flexPath)
352352
->run();
353-
$this->fs->remove($this->flexPath.'/vendor/symfony/phpunit-bridge');
354353

355354
if ('\\' !== \DIRECTORY_SEPARATOR) {
356-
$this->fs->symlink('../../../../../../vendor/symfony/phpunit-bridge', './vendor/symfony/phpunit-bridge');
357-
} else {
358-
$this->fs->mirror(\dirname(__DIR__, 2).'/vendor/symfony/phpunit-bridge', $this->flexPath.'/vendor/symfony/phpunit-bridge');
355+
$this->fs->remove($this->flexPath.'/vendor/symfony/phpunit-bridge');
356+
357+
$this->fs->symlink($rootPath.'/vendor/symfony/phpunit-bridge', $this->flexPath.'/vendor/symfony/phpunit-bridge');
359358
}
360359

361360
// temporarily ignoring indirect deprecations - see #237

0 commit comments

Comments
 (0)