Skip to content

Commit 0740f77

Browse files
committed
Skip tests for MySQL < 8
1 parent 21e6a95 commit 0740f77

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/QueryBuilderTest.php

+9-3
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,9 @@ public function testJsonOverlapsConditionBuilder(): void
666666
$db = $this->getConnection();
667667

668668
if (str_contains($db->getServerVersion(), 'MariaDB') && version_compare($db->getServerVersion(), '10.9', '<')) {
669-
self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS function.');
669+
self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS() function.');
670+
} elseif (version_compare($db->getServerVersion(), '8', '<')) {
671+
self::markTestSkipped('MySQL < 8 does not support JSON_OVERLAPS() function.');
670672
}
671673

672674
$qb = $db->getQueryBuilder();
@@ -686,7 +688,9 @@ public function testOverlapsCondition(iterable|ExpressionInterface $values, int
686688
$db = $this->getConnection();
687689

688690
if (str_contains($db->getServerVersion(), 'MariaDB') && version_compare($db->getServerVersion(), '10.9', '<')) {
689-
self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS function.');
691+
self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS() function.');
692+
} elseif (version_compare($db->getServerVersion(), '8', '<')) {
693+
self::markTestSkipped('MySQL < 8 does not support JSON_OVERLAPS() function.');
690694
}
691695

692696
$count = (new Query($db))
@@ -705,7 +709,9 @@ public function testOverlapsConditionOperator(iterable|ExpressionInterface $valu
705709
$db = $this->getConnection();
706710

707711
if (str_contains($db->getServerVersion(), 'MariaDB') && version_compare($db->getServerVersion(), '10.9', '<')) {
708-
self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS function.');
712+
self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS() function.');
713+
} elseif (version_compare($db->getServerVersion(), '8', '<')) {
714+
self::markTestSkipped('MySQL < 8 does not support JSON_OVERLAPS() function.');
709715
}
710716

711717
$count = (new Query($db))

0 commit comments

Comments
 (0)