Skip to content

Commit

Permalink
Add an invalid MySQLi charset test
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jun 17, 2020
1 parent 2a7dfc2 commit 8c40173
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Functional/Driver/Mysqli/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ public function testUnsupportedDriverOption(): void
$this->getConnection([12345 => 'world']);
}

public function testInvalidCharset(): void
{
$params = TestUtil::getConnectionParams();

$this->expectException(MysqliException::class);
(new Driver())->connect(
array_merge(
$params,
['charset' => 'invalid']
)
);
}

public function testPing(): void
{
$conn = $this->getConnection([]);
Expand Down

0 comments on commit 8c40173

Please sign in to comment.