app->instance('session', $session); $notify = new HasUserNotificationsImplementation(); $notify->add('Foo', 'errors'); $notify->add('Bar', 'warnings'); $notify->add(['Baz', 'Lorem'], 'information'); $notify->add(['Hm', ['Uff', 'sum']], 'messages'); $this->assertEquals([ 'errors' => new Collection(['Foo']), 'warnings' => new Collection(['Bar']), 'information' => new Collection(['Baz', 'Lorem']), 'messages' => new Collection(['Hm', 'Uff', 'sum']), ], $notify->get()); } }