Get last notification of the current
entity.
public getLastNotification ( $toId, $entity, Closur\Closure $filterScope = null ) : mixed | ||
$toId | ||
$entity | ||
$filterScope | Closur\Closure | |
Résultat | mixed |
/** * Get last notification of the * given entity * * @param $to_id * @param Closure $filterScope * @return mixed */ public function getLastNotification($to_id, Closure $filterScope = null) { return $this->notifynderRepo->getLastNotification($to_id, $this->entity, $filterScope); }
/** @test */ 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); }
/** * Get last notification of the * given entity * * @param $to_id * @return mixed */ public function getLastNotification($to_id) { return $this->notifynderRepo->getLastNotification($to_id, $this->entity); }