diff --git a/tests/QueryBuilderTest.php b/tests/QueryBuilderTest.php index dce59965..148509d8 100644 --- a/tests/QueryBuilderTest.php +++ b/tests/QueryBuilderTest.php @@ -664,6 +664,11 @@ public function testSelectScalar(array|bool|float|int|string $columns, string $e public function testJsonOverlapsConditionBuilder(): void { $db = $this->getConnection(); + + if (str_contains($db->getServerVersion(), 'MariaDB') && version_compare($db->getServerVersion(), '10.9', '<')) { + self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS function.'); + } + $qb = $db->getQueryBuilder(); $params = []; @@ -680,6 +685,10 @@ public function testOverlapsCondition(iterable|ExpressionInterface $values, int { $db = $this->getConnection(); + if (str_contains($db->getServerVersion(), 'MariaDB') && version_compare($db->getServerVersion(), '10.9', '<')) { + self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS function.'); + } + $count = (new Query($db)) ->from('json_type') ->where(new JsonOverlapsCondition('json_col', $values)) @@ -695,6 +704,10 @@ public function testOverlapsConditionOperator(iterable|ExpressionInterface $valu { $db = $this->getConnection(); + if (str_contains($db->getServerVersion(), 'MariaDB') && version_compare($db->getServerVersion(), '10.9', '<')) { + self::markTestSkipped('MariaDB < 10.9 does not support JSON_OVERLAPS function.'); + } + $count = (new Query($db)) ->from('json_type') ->where(['json overlaps', 'json_col', $values])