Skip to content

Commit 35cfb92

Browse files
committed
Fix tests for DBAL 4
1 parent 84f7770 commit 35cfb92

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/DoctrineIntegration/ORM/EntityManagerTypeInferenceTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ public function dataFileAsserts(): iterable
2121

2222
$version = InstalledVersions::getVersion('doctrine/dbal');
2323
$hasDbal3 = $version !== null && strpos($version, '3.') === 0;
24+
$hasDbal4 = $version !== null && strpos($version, '4.') === 0;
2425

25-
if ($hasDbal3) {
26+
if ($hasDbal4) {
27+
// nothing to test
28+
yield from [];
29+
} elseif ($hasDbal3) {
2630
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturnDbal3.php');
2731
} else {
2832
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturn.php');

tests/DoctrineIntegration/ORM/EntityManagerWithoutObjectManagerLoaderTypeInferenceTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ public function dataFileAsserts(): iterable
2020

2121
$version = InstalledVersions::getVersion('doctrine/dbal');
2222
$hasDbal3 = $version !== null && strpos($version, '3.') === 0;
23+
$hasDbal4 = $version !== null && strpos($version, '4.') === 0;
2324

24-
if ($hasDbal3) {
25+
if ($hasDbal4) {
26+
// nothing to test
27+
yield from [];
28+
} elseif ($hasDbal3) {
2529
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturnDbal3.php');
2630
} else {
2731
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturn.php');

0 commit comments

Comments
 (0)