public function entity($name)
{
$this->entity = $name;
return $this;
}
/** @test */ function it_retrieve_notification_by_limiting_the_number() { $this->createMultipleNotifications(); // set polymorphic to true app('config')->set('notifynder.polymorphic', true); $notification = $this->createNotification(['extra' => 'Amazing']); $notifications = $this->notification->entity($this->to['type'])->getAll($notification->to->id); $this->assertCount(1, $notifications); }