Skip to content

Commit

Permalink
Fix tests for DBAL 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Feb 9, 2024
1 parent 84f7770 commit 35cfb92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ public function dataFileAsserts(): iterable

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

if ($hasDbal3) {
if ($hasDbal4) {
// nothing to test
yield from [];
} elseif ($hasDbal3) {
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturnDbal3.php');
} else {
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturn.php');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ public function dataFileAsserts(): iterable

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

if ($hasDbal3) {
if ($hasDbal4) {
// nothing to test
yield from [];
} elseif ($hasDbal3) {
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturnDbal3.php');
} else {
yield from $this->gatherAssertTypes(__DIR__ . '/data/dbalQueryBuilderExecuteDynamicReturn.php');
Expand Down

0 comments on commit 35cfb92

Please sign in to comment.