diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-05 11:30:27 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-05 11:30:38 +0100 |
commit | 95530f62513a82c385d9378b4a59da57d74092d9 (patch) | |
tree | a4d17994548999b42e99371f381da8c256ee39bf /3rdparty/fguillot/picofeed/tests/Parser/Rss91ParserTest.php | |
parent | 57163ad25a7dc63abd8aff8663c185ddad398466 (diff) |
update picofeed, add max size setting, fix #642
Diffstat (limited to '3rdparty/fguillot/picofeed/tests/Parser/Rss91ParserTest.php')
-rw-r--r-- | 3rdparty/fguillot/picofeed/tests/Parser/Rss91ParserTest.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/3rdparty/fguillot/picofeed/tests/Parser/Rss91ParserTest.php b/3rdparty/fguillot/picofeed/tests/Parser/Rss91ParserTest.php new file mode 100644 index 000000000..8f10f2ea5 --- /dev/null +++ b/3rdparty/fguillot/picofeed/tests/Parser/Rss91ParserTest.php @@ -0,0 +1,30 @@ +<?php +namespace PicoFeed\Parser; + +use PHPUnit_Framework_TestCase; + + +class Rss91ParserTest extends PHPUnit_Framework_TestCase +{ + public function testFormatOk() + { + $parser = new Rss91(file_get_contents('tests/fixtures/rss_0.91.xml')); + $feed = $parser->execute(); + + $this->assertNotFalse($feed); + $this->assertNotEmpty($feed->items); + + $this->assertEquals('WriteTheWeb', $feed->getTitle()); + $this->assertEquals('http://writetheweb.com', $feed->getUrl()); + $this->assertEquals('http://writetheweb.com', $feed->getId()); + $this->assertEquals(time(), $feed->getDate()); + $this->assertEquals(6, count($feed->items)); + + $this->assertEquals('Giving the world a pluggable Gnutella', $feed->items[0]->getTitle()); + $this->assertEquals('http://writetheweb.com/read.php?item=24', $feed->items[0]->getUrl()); + $this->assertEquals('085a9133a75542f878fa73ee2afbb6a2350b6c4fb125e6d8ca09478c47702111', $feed->items[0]->getId()); + $this->assertEquals(time(), $feed->items[0]->getDate()); + $this->assertEquals('webmaster@writetheweb.com', $feed->items[0]->getAuthor()); + $this->assertTrue(strpos($feed->items[1]->getContent(), '<p>After a period of dormancy') === 0); + } +}
\ No newline at end of file |