spec\Crummy\Phlack\Bot\Mainframe\Plugin\EncoderPluginSpec::it_encodes_the_output PHP Метод

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

public it_encodes_the_output ( Crummy\Phlack\Common\Formatter\FormatterInterface $formatter, Packet $packet, Reply $reply )
$formatter Crummy\Phlack\Common\Formatter\FormatterInterface
$packet Crummy\Phlack\Bot\Mainframe\Packet
$reply Crummy\Phlack\WebHook\Reply\Reply
    public function it_encodes_the_output(FormatterInterface $formatter, Packet $packet, Reply $reply)
    {
        $unencoded = '<foo!> <#C01010|botgarage>';
        $encoded = '&lt;foo!&gt; <#C01010|botgarage>';
        $packet->offsetExists('output')->willReturn(true);
        $packet->offsetGet('output')->willReturn($reply);
        $reply->offsetExists('text')->willReturn(true);
        $reply->offsetGet('text')->willReturn($unencoded);
        $formatter->format($unencoded)->willReturn($encoded);
        $reply->offsetSet('text', $encoded)->shouldBeCalled();
        $this->onAfterExecute($packet);
    }