public function it_get_last_notification_of_the_current_entity_filtering_by_category(NotificationDB $notificationRepo) { $id = 1; $category = 'notifynder.category'; $notificationRepo->getLastNotificationByCategory($category, $id, null, null)->shouldBeCalled()->willReturn(new Notification()); $this->getLastNotificationByCategory($category, $id)->shouldReturnAnInstanceOf(Notification::class); }