/** * @covers Igorw\EventSource\Event::appendData * @covers Igorw\EventSource\Event::getFormattedData */ public function testDataFormattingWithAppend() { $event = new Event(); $event->appendData('we wish you a merry christmas'); $event->appendData('and a happy new year'); $this->assertSame("data: we wish you a merry christmas\ndata: and a happy new year\n", $event->getFormattedData()); }