Skip to content

Commit a664b2a

Browse files
VincentLangletondrejmirtes
authored andcommitted
Fix lowest build
1 parent f769796 commit a664b2a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Type/Doctrine/Query/QueryResultTypeWalkerTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DateTime;
77
use DateTimeImmutable;
88
use Doctrine\Common\Collections\ArrayCollection;
9+
use Doctrine\DBAL\Platforms\SqlitePlatform;
910
use Doctrine\ORM\EntityManagerInterface;
1011
use Doctrine\ORM\Mapping\Column;
1112
use Doctrine\ORM\Query\AST\TypedExpression;
@@ -48,6 +49,7 @@
4849
use function count;
4950
use function property_exists;
5051
use function sprintf;
52+
use function strpos;
5153
use function version_compare;
5254
use const PHP_VERSION_ID;
5355

@@ -1310,6 +1312,8 @@ public function getTestData(): iterable
13101312
',
13111313
];
13121314

1315+
// There is no error after the merge of https://github.com/doctrine/dbal/pull/5755
1316+
$moduloError = strpos((new SqlitePlatform())->getModExpression('', ''), '%') === false;
13131317
yield 'mod function error' => [
13141318
$this->constantArray([
13151319
[new ConstantIntegerType(1), TypeCombinator::addNull($this->uintStringified())],
@@ -1318,7 +1322,7 @@ public function getTestData(): iterable
13181322
SELECT MOD(10, NULLIF(m.intColumn, m.intColumn))
13191323
FROM QueryResult\Entities\Many m
13201324
',
1321-
PHP_VERSION_ID < 70400 ? 'Modulo by zero' : null,
1325+
$moduloError ? 'Modulo by zero' : null,
13221326
];
13231327

13241328
yield 'substring function' => [

0 commit comments

Comments
 (0)