Skip to content

Commit 4edd87e

Browse files
committed
minor #893 [tests] bump symfony phpunit version for CI (jrushlow)
This PR was squashed before being merged into the 1.0-dev branch. Discussion ---------- [tests] bump symfony phpunit version for CI Flex recipe now uses PHPUnit `9.5` for the `SYMFONY_PHPUNIT_VERSION` https://github.com/symfony/recipes/pull/952/files#diff-7e77caa90dde27086b747cb093fb643bbed3d7dbb37baa4fd81a992504d18d99R15 Updates the test environment to look for and remove `<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />` from the phpunit config. --- - disable the `_test` dbname suffix functionality in the test environment Commits ------- a6e70b9 disable test dbname suffix in tests 1c2276b [tests] bump symfony phpunit version
2 parents baec3cb + a6e70b9 commit 4edd87e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Test/MakerTestDetails.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ public function configureDatabase(bool $createSchema = true): self
144144
)
145145
;
146146

147+
// Flex includes a recipe to suffix the dbname w/ "_test" - lets keep
148+
// things simple for these tests and not do that.
149+
$this->addReplacement(
150+
'config/packages/test/doctrine.yaml',
151+
"dbname_suffix: '_test%env(default::TEST_TOKEN)%'",
152+
'')
153+
;
154+
147155
// this looks silly, but it's the only way to drop the database *for sure*,
148156
// as doctrine:database:drop will error if there is no database
149157
// also, skip for SQLITE, as it does not support --if-not-exists

src/Test/MakerTestEnvironment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ private function buildFlexSkeleton(): void
383383
// do not explicitly set the PHPUnit version
384384
[
385385
'filename' => 'phpunit.xml.dist',
386-
'find' => '<server name="SYMFONY_PHPUNIT_VERSION" value="8.5" />',
386+
'find' => '<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />',
387387
'replace' => '',
388388
],
389389
];

0 commit comments

Comments
 (0)