/**
* @dataProvider defaultFlashMessageImportanceDataProvider
*/
public function testImportanceLevelIsReflectedInFlashMessageType( FlashMessageImportanceMapperInterface
$mapper,
string
$importance,
string
$expectedFlashMessageType ) { $session =
$this->
createMock(Session::
class);
$session->
method('getFlashBag'
)->
willReturn(new FlashBag());
$browserChannel =
$this->
buildBrowserChannel($session,
$mapper);
$notification =
new Notification();
$notification->
importance($importance);
$recipient =
new Recipient('hello@example.com'
);
$browserChannel->
notify($notification,
$recipient);
$this->
assertEquals($expectedFlashMessageType,
array_key_first($session->
getFlashBag()->
all()));
} public function testUnknownImportanceMappingIsReported() {