Skip to content

Commit

Permalink
Merge branch '5.0' into 5
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jul 16, 2023
2 parents ba1082c + 9b2aee1 commit 7718443
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/php/ORM/DataListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
use SilverStripe\ORM\Tests\DataListTest\MixedHasManyEagerLoadObject;
use SilverStripe\ORM\Tests\DataListTest\MixedHasOneEagerLoadObject;
use SilverStripe\ORM\Tests\DataListTest\MixedManyManyEagerLoadObject;
use SilverStripe\ORM\Connect\DatabaseException;

class DataListTest extends SapphireTest
{
Expand Down Expand Up @@ -1943,7 +1944,7 @@ public function testRawSqlSort(string $sort, string $type): void
if (!(DB::get_conn()->getConnector() instanceof MySQLiConnector)) {
$this->markTestSkipped('Database connector is not MySQLiConnector');
}
$this->expectException(\mysqli_sql_exception::class);
$this->expectException(DatabaseException::class);
$this->expectExceptionMessageMatches('/Unknown column/');
} elseif ($type === 'invalid-column') {
$this->expectException(InvalidArgumentException::class);
Expand Down Expand Up @@ -1974,7 +1975,7 @@ public function testRawSqlOrderBy(string $sort, string $type): void
if (!(DB::get_conn()->getConnector() instanceof MySQLiConnector)) {
$this->markTestSkipped('Database connector is not MySQLiConnector');
}
$this->expectException(\mysqli_sql_exception::class);
$this->expectException(DatabaseException::class);
if ($type === 'error-in-sql-syntax') {
$this->expectExceptionMessageMatches('/You have an error in your SQL syntax/');
} else {
Expand Down

0 comments on commit 7718443

Please sign in to comment.