spec\Fenos\Notifynder\Handler\DispatcherSpec::it_fire_a_notifynder_event PHP Метод

it_fire_a_notifynder_event() публичный Метод

public it_fire_a_notifynder_event ( Illuminate\Contracts\Events\Dispatcher $dispatcher, NotifynderManager $notifynder )
$dispatcher Illuminate\Contracts\Events\Dispatcher
$notifynder Fenos\Notifynder\NotifynderManager
    public function it_fire_a_notifynder_event(Dispatcher $dispatcher, NotifynderManager $notifynder)
    {
        $key = 'event';
        $category = 'hello';
        $extraValues = [];
        $notifyEvent = 'Notifynder.' . $key;
        $notificationBuilt = [0 => ['notification']];
        $notifynderEvent = new NotifynderEvent($notifyEvent, $category, $extraValues);
        $dispatcher->fire($notifyEvent, [$notifynderEvent, $notifynder])->shouldBeCalled()->willReturn($notificationBuilt);
        $notifynder->send($notificationBuilt[0])->shouldBeCalled()->willReturn(1);
        $this->fire($notifynder, $key, $category, $extraValues)->shouldReturn(1);
    }