Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Jan 30, 2024
1 parent 2e2e0ce commit 322c8af
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,10 +525,22 @@ public function testRenameColumn(): void
SQL,
$qb->renameColumn('alpha', 'string_identifier', 'string_identifier_test'),
);
}

public function testRenameNonExistColumn(): void
{
$db = $this->getConnection();
$qb = $db->getQueryBuilder();

$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Column "non_exist_column" does not exist in table "alpha".');
$qb->renameColumn('alpha', 'non_exist_column', 'new_column');
}

public function testRenameColumnOnNonExistTable(): void
{
$db = $this->getConnection();
$qb = $db->getQueryBuilder();

$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Table "non_exist_table" does not exist.');
Expand Down

0 comments on commit 322c8af

Please sign in to comment.