spec\Crummy\Phlack\Bridge\Guzzle\ApiClientSpec::it_adds_the_token_to_the_command_before_prepare PHP Метод

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

public it_adds_the_token_to_the_command_before_prepare ( Guzzle\Common\Event $event, Guzzle\Service\Command\CommandInterface $command )
$event Guzzle\Common\Event
$command Guzzle\Service\Command\CommandInterface
    public function it_adds_the_token_to_the_command_before_prepare(Event $event, CommandInterface $command)
    {
        /** @var EventDispatcher $dispatcher */
        $dispatcher = $this->getEventDispatcher();
        $event->offsetGet('command')->willReturn($command);
        $event->setDispatcher($dispatcher)->shouldBeCalled();
        $event->setName('command.before_prepare')->shouldBeCalled();
        $event->isPropagationStopped()->willReturn(false);
        $command->offsetSet('token', $this->config['token'])->shouldBeCalled();
        $dispatcher->dispatch('command.before_prepare', $event);
    }