Skip to content

Commit b32f631

Browse files
committed
ping テストの fail メッセージを catch 型に揃える
testPingFailureCarriesConnectionNameAndSql の fail メッセージは DatabaseException 期待のままだが、catch 型は QueryException に絞っている。 テスト失敗時に「期待型 vs 実投出型」がメッセージから即読み取れるよう、 QueryException に揃える。
1 parent eb2e67a commit b32f631

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/Unit/Database/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ public function testPingFailureCarriesConnectionNameAndSql(): void
522522
{
523523
try {
524524
$this->connection->ping();
525-
$this->fail('Expected DatabaseException was not thrown');
525+
$this->fail('Expected QueryException was not thrown');
526526
} catch (QueryException $e) {
527527
$this->assertSame('test_conn', $e->connectionName);
528528
$this->assertSame('DO 1', $e->sql);

0 commit comments

Comments
 (0)