Error in phpunit. #112
Open
Error in phpunit. #112
Comments
Try with this one protected function assertFlash($level, $message, $important = false, $title = null, $overlay = false)
{
$expectedNotification = [
'title' => $title,
'message' => $message,
'level' => $level,
'important' => $important,
'overlay' => $overlay
];
$flashNotifications = json_decode(json_encode(session('flash_notification')), true);
$this->assertContains(
$expectedNotification,
$flashNotifications,
"Failed asserting that the flash message '$message' is present."
);
} |
@paulhenri-l Amazing solution, thanks! Minor improvement:
I created a gist for this here. |
I have been using this assertFlash method so much lately I decided to write a short blog post on it here. Thanks again @paulhenri-l ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi i'm testing my application out but now i got a strange error.
My steps:
https://gist.github.com/Tjoosten/da3e709f915493899ca4c23135d7b6a3
Can someone help me?
The text was updated successfully, but these errors were encountered: