Skip to content

Commit

Permalink
Merge pull request #8 from wavevision/development
Browse files Browse the repository at this point in the history
Add option to configure flash array conversion
  • Loading branch information
rozsival committed Apr 16, 2021
2 parents b071f10 + 75aa8d0 commit 16d5176
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NetteTests/TestCases/Parts/PresenterAsserts.php
Expand Up @@ -96,11 +96,11 @@ protected function extractForwardResponseRequest(PresenterResponse $presenterRes
/**
* @return array<mixed>
*/
protected function extractFlashMessages(PresenterResponse $presenterResponse): array
protected function extractFlashMessages(PresenterResponse $presenterResponse, bool $toArray = true): array
{
$flashes = [];
foreach ($presenterResponse->getPresenterRequest()->getPresenter()->getTemplate()->flashes as $flash) {
$flashes[] = (array)$flash;
$flashes[] = $toArray ? (array)$flash : $flash;
}
return $flashes;
}
Expand Down

0 comments on commit 16d5176

Please sign in to comment.