Skip to content

Commit

Permalink
Skip tests for MariaDB < 10.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Jun 29, 2024
1 parent aa32f74 commit 21e6a95
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -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))
Expand All @@ -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])
Expand Down

0 comments on commit 21e6a95

Please sign in to comment.