From 7f59518c53597d18dff6dc9b315f298550fb8b21 Mon Sep 17 00:00:00 2001 From: kreemer Date: Wed, 6 Dec 2023 15:06:48 +0100 Subject: [PATCH] Fix dynamic mock object class name --- .github/workflows/build.yaml | 4 ++-- tests/Service/Info/Collector/DoctrineTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1174520..4c739b2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: php: [ '8.1', '8.2' ] - symfony: [ '6.3' ] + symfony: [ '6.3', '6.4', '7.0' ] steps: - name: Checkout uses: actions/checkout@v3 @@ -43,4 +43,4 @@ jobs: composer update --prefer-dist --no-progress - name: Run tests - run: vendor/bin/phpunit --coverage-text \ No newline at end of file + run: vendor/bin/phpunit --coverage-text diff --git a/tests/Service/Info/Collector/DoctrineTest.php b/tests/Service/Info/Collector/DoctrineTest.php index 2e56817..c207154 100644 --- a/tests/Service/Info/Collector/DoctrineTest.php +++ b/tests/Service/Info/Collector/DoctrineTest.php @@ -83,12 +83,12 @@ public function databaseInformationIsDisplayed(): void self::assertIsArray($array['default']); self::assertArrayHasKey('type', $array['default']); - self::assertStringStartsWith('Mock_AbstractPlatform_', $array['default']['type']); + self::assertEquals(get_class($databasePlatform), $array['default']['type']); self::assertArrayHasKey('database', $array['default']); self::assertNull($array['default']['database']); self::assertArrayHasKey('driver', $array['default']); - self::assertStringStartsWith('Mock_Driver_', $array['default']['driver']); + self::assertEquals(get_class($driver), $array['default']['driver']); } }