Skip to content

Commit

Permalink
Add coverage for events aborting SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel committed Nov 6, 2023
1 parent 04e274f commit dcf8eb7
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions tests/Platforms/AbstractPlatformTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,24 @@ public function testGetAlterTableSqlDispatchEvent(): void
$listenerMock = $this->createMock(GetAlterTableSqlDispatchEventListener::class);
$listenerMock
->expects(self::once())
->method('onSchemaAlterTable');
->method('onSchemaAlterTable')
->willReturn(false);
$listenerMock
->expects(self::once())
->method('onSchemaAlterTableAddColumn');
->method('onSchemaAlterTableAddColumn')
->willReturn(false);
$listenerMock
->expects(self::once())
->method('onSchemaAlterTableRemoveColumn');
->method('onSchemaAlterTableRemoveColumn')
->willReturn(false);
$listenerMock
->expects(self::once())
->method('onSchemaAlterTableChangeColumn');
->method('onSchemaAlterTableChangeColumn')
->willReturn(false);
$listenerMock
->expects(self::once())
->method('onSchemaAlterTableRenameColumn');
->method('onSchemaAlterTableRenameColumn')
->willReturn(false);

$eventManager = new EventManager();
$events = [
Expand Down Expand Up @@ -1435,15 +1440,15 @@ public function onSchemaCreateTableColumn(): void;

interface GetAlterTableSqlDispatchEventListener
{
public function onSchemaAlterTable(): void;
public function onSchemaAlterTable(): bool;

public function onSchemaAlterTableAddColumn(): void;
public function onSchemaAlterTableAddColumn(): bool;

public function onSchemaAlterTableRemoveColumn(): void;
public function onSchemaAlterTableRemoveColumn(): bool;

public function onSchemaAlterTableChangeColumn(): void;
public function onSchemaAlterTableChangeColumn(): bool;

public function onSchemaAlterTableRenameColumn(): void;
public function onSchemaAlterTableRenameColumn(): bool;
}

interface GetDropTableSqlDispatchEventListener
Expand Down

0 comments on commit dcf8eb7

Please sign in to comment.