Fenos\Notifynder\Contracts\NotificationDB::deleteLimit PHP Method

deleteLimit() public method

Delete numbers of notifications equals to the number passing as 2 parameter of the current user.
public deleteLimit ( $userId, $entity, $number, $order ) : integer
$userId int
$entity
$number int
$order string
return integer
    public function deleteLimit($userId, $entity, $number, $order);

Usage Example

 /** @test */
 public function it_delete_notification_limiting_the_number_of_the_given_entity(NotificationDB $notificationRepo)
 {
     $entity_id = 1;
     $numberLimit = 5;
     $order = 'asc';
     $notificationRepo->deleteLimit($entity_id, null, $numberLimit, $order)->shouldBeCalled()->willReturn($numberLimit);
     $this->deleteLimit($entity_id, $numberLimit, $order)->shouldReturn($numberLimit);
 }
All Usage Examples Of Fenos\Notifynder\Contracts\NotificationDB::deleteLimit