Skip to content

Commit

Permalink
Fix CTE query expressions (#305)
Browse files Browse the repository at this point in the history
* Fix tests according to main PR

* Fix tests
  • Loading branch information
Tigrov authored Oct 14, 2023
1 parent d9a6b3e commit 9e26690
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,32 @@ public function testLimitOffsetWithExpression(): void
$this->assertContains('3', $result);
$this->assertNotContains('1', $result);
}

public function testWithQuery()
{
$db = $this->getConnection();

if (
!str_contains($db->getServerVersion(), 'MariaDB')
&& version_compare($db->getServerVersion(), '8.0.0', '<')
) {
self::markTestSkipped('CTE not supported in MySQL versions below 8.0.0');
}

parent::testWithQuery();
}

public function testWithQueryRecursive()
{
$db = $this->getConnection();

if (
!str_contains($db->getServerVersion(), 'MariaDB')
&& version_compare($db->getServerVersion(), '8.0.0', '<')
) {
self::markTestSkipped('CTE not supported in MySQL versions below 8.0.0');
}

parent::testWithQueryRecursive();
}
}

0 comments on commit 9e26690

Please sign in to comment.