public function testIterator() { $stream = new Stream(); for ($i = 0; $i < 10; $i++) { $status = new Status(); $status->setText($i); $stream->addStatus($status); } foreach ($stream as $k => $status) { $this->assertInstanceOf('Lyrixx\\Lifestream\\Status', $status); $this->assertSame($k, $status->getText()); } }
/** * @dataProvider getFormatTests */ public function testFormat($expected, $text) { $status = new Status(); $status->setText($text); $this->assertSame($expected, $this->formatter->format($status)->getText()); }
/** * @dataProvider getFilterTests */ public function testFilter($expected, $text) { $status = new Status(); $status->setText($text); $this->assertSame($expected, $this->filter->isValid($status)); }