diff --git a/tests/system/Database/Live/ForgeTest.php b/tests/system/Database/Live/ForgeTest.php index 39433abde857..026f1a3297b7 100644 --- a/tests/system/Database/Live/ForgeTest.php +++ b/tests/system/Database/Live/ForgeTest.php @@ -992,7 +992,7 @@ public function testAddFields(): void ], ]; - if (version_compare($this->db->getVersion(), '8.0.17', '>=') && ! str_contains($this->db->getVersion(), 'MariaDB')) { + if (version_compare($this->db->getVersion(), '8.0.17', '>=') && ! str_contains(strtolower($this->db->getVersion()), strtolower('MariaDB'))) { // As of MySQL 8.0.17, the display width attribute for integer data types // is deprecated and is not reported back anymore. // @see https://dev.mysql.com/doc/refman/8.0/en/numeric-type-attributes.html diff --git a/tests/system/Database/Live/GetVersionTest.php b/tests/system/Database/Live/GetVersionTest.php index 93678e3b8356..7b61adbd489f 100644 --- a/tests/system/Database/Live/GetVersionTest.php +++ b/tests/system/Database/Live/GetVersionTest.php @@ -37,6 +37,6 @@ public function testGetVersion(): void $version = $this->db->getVersion(); - $this->assertMatchesRegularExpression('/\A\d+(\.\d+)*\z/', $version); + $this->assertMatchesRegularExpression('/\A\d+(\.\d+)+\-?/', $version); } } diff --git a/tests/system/Database/Live/MySQLi/GetFieldDataTestCase.php b/tests/system/Database/Live/MySQLi/GetFieldDataTestCase.php index 98403c46e8a8..d21af17cca46 100644 --- a/tests/system/Database/Live/MySQLi/GetFieldDataTestCase.php +++ b/tests/system/Database/Live/MySQLi/GetFieldDataTestCase.php @@ -42,7 +42,7 @@ private function isOldMySQL(): bool { return ! ( version_compare($this->db->getVersion(), '8.0.17', '>=') - && ! str_contains($this->db->getVersion(), 'MariaDB') + && ! str_contains(strtolower($this->db->getVersion()), strtolower('MariaDB')) ); }