File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tests/Type/Doctrine/Query Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 66use DateTime ;
77use DateTimeImmutable ;
88use Doctrine \Common \Collections \ArrayCollection ;
9+ use Doctrine \DBAL \Platforms \SqlitePlatform ;
910use Doctrine \ORM \EntityManagerInterface ;
1011use Doctrine \ORM \Mapping \Column ;
1112use Doctrine \ORM \Query \AST \TypedExpression ;
4849use function count ;
4950use function property_exists ;
5051use function sprintf ;
52+ use function strpos ;
5153use function version_compare ;
5254use 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 ' => [
You can’t perform that action at this time.
0 commit comments