app->instance('session', $session); $notify = new HasUserNotificationsImplementation(); $notify->add('Foo', NotificationType::ERROR); $notify->add('Bar', NotificationType::WARNING); $notify->add(['Baz', 'Lorem'], NotificationType::INFORMATION); $notify->add(['Hm', ['test'], 'some' => ['Uff', 'sum']], NotificationType::MESSAGE); $notify->add(['some' => ['it']], NotificationType::MESSAGE); $this->assertEquals([ NotificationType::ERROR->value => new Collection(['Foo']), NotificationType::WARNING->value => new Collection(['Bar']), NotificationType::INFORMATION->value => new Collection(['Baz', 'Lorem']), NotificationType::MESSAGE->value => new Collection(['Hm', 'test', 'Uff', 'sum', 'it']), ], $notify->get()); } }