public function it_get_last_notification_of_the_current_entity(NotificationDB $notificationRepo) { $id = 1; $notificationRepo->getLastNotification($id, null, null)->shouldBeCalled()->willReturn(new Notification()); $this->getLastNotification($id)->shouldReturnAnInstanceOf(Notification::class); }