Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Commit 16d5176

Browse files
authored
Merge pull request #8 from wavevision/development
Add option to configure flash array conversion
2 parents b071f10 + 75aa8d0 commit 16d5176

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NetteTests/TestCases/Parts/PresenterAsserts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ protected function extractForwardResponseRequest(PresenterResponse $presenterRes
9696
/**
9797
* @return array<mixed>
9898
*/
99-
protected function extractFlashMessages(PresenterResponse $presenterResponse): array
99+
protected function extractFlashMessages(PresenterResponse $presenterResponse, bool $toArray = true): array
100100
{
101101
$flashes = [];
102102
foreach ($presenterResponse->getPresenterRequest()->getPresenter()->getTemplate()->flashes as $flash) {
103-
$flashes[] = (array)$flash;
103+
$flashes[] = $toArray ? (array)$flash : $flash;
104104
}
105105
return $flashes;
106106
}

0 commit comments

Comments
 (0)