Skip to content

Commit

Permalink
[Tests] Streamline
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark authored and nicolas-grekas committed Oct 31, 2023
1 parent f4f7184 commit 11ac5f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Tests/ApplicationTest.php
Expand Up @@ -1536,7 +1536,7 @@ public function testRunWithErrorAndDispatcher()

$tester = new ApplicationTester($application);
$tester->run(['command' => 'dym']);
$this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events');
$this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP error did not dispatch events');
}

public function testRunDispatchesAllEventsWithError()
Expand All @@ -1553,7 +1553,7 @@ public function testRunDispatchesAllEventsWithError()

$tester = new ApplicationTester($application);
$tester->run(['command' => 'dym']);
$this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events');
$this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP error did not dispatch events');
}

public function testRunWithErrorFailingStatusCode()
Expand Down
7 changes: 4 additions & 3 deletions Tests/Helper/TableTest.php
Expand Up @@ -1017,15 +1017,16 @@ public function testColumnStyle()

public function testThrowsWhenTheCellInAnArray()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('A cell must be a TableCell, a scalar or an object implementing "__toString()", "array" given.');
$table = new Table($output = $this->getOutputStream());
$table = new Table($this->getOutputStream());
$table
->setHeaders(['ISBN', 'Title', 'Author', 'Price'])
->setRows([
['99921-58-10-7', [], 'Dante Alighieri', '9.95'],
]);

$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('A cell must be a TableCell, a scalar or an object implementing "__toString()", "array" given.');

$table->render();
}

Expand Down

0 comments on commit 11ac5f1

Please sign in to comment.