Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/system/Database/Live/ForgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to convert the string, edit as 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
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Live/GetVersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion tests/system/Database/Live/MySQLi/GetFieldDataTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to convert the string, edit as mariadb

);
}

Expand Down