get number Notifications
not read.
public countNotRead ( $toId, $entity, Closur\Closure $filterScope = null ) : mixed | ||
$toId | ||
$entity | ||
$filterScope | Closur\Closure | |
return | mixed |
/** * Get number of notification * not read * * @param $to_id * @param Closure $filterScope * @return mixed */ public function countNotRead($to_id, Closure $filterScope = null) { return $this->notifynderRepo->countNotRead($to_id, $this->entity); }
/** @test */ public function it_count_notification_not_read(NotificationDB $notificationRepo) { $entity_id = 1; $notificationCount = 10; $notificationRepo->countNotRead($entity_id, null, null)->shouldBeCalled()->willReturn($notificationCount); $this->countNotRead($entity_id)->shouldReturn($notificationCount); }
/** * Get number of notification * not read * * @param $to_id * @return mixed */ public function countNotRead($to_id) { return $this->notifynderRepo->countNotRead($to_id, $this->entity); }