Example #1
0
    /**
     * @covers Igorw\EventSource\Event::dump
     */
    public function testDumpIncludesEverything()
    {
        $event = new Event();
        $event->addComment('a juicy comment');
        $event->setId('11');
        $event->setEvent('foo');
        $event->setRetry(2000);
        $event->setData("we wish you a merry christmas\nand a happy new year");
        $expected = <<<EOT
: a juicy comment
id: 11
event: foo
retry: 2000
data: we wish you a merry christmas
data: and a happy new year


EOT;
        $this->assertSame($expected, $event->dump());
    }