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/Rss92ParserTest.php | |
parent | 57163ad25a7dc63abd8aff8663c185ddad398466 (diff) |
update picofeed, add max size setting, fix #642
Diffstat (limited to '3rdparty/fguillot/picofeed/tests/Parser/Rss92ParserTest.php')
-rw-r--r-- | 3rdparty/fguillot/picofeed/tests/Parser/Rss92ParserTest.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/3rdparty/fguillot/picofeed/tests/Parser/Rss92ParserTest.php b/3rdparty/fguillot/picofeed/tests/Parser/Rss92ParserTest.php new file mode 100644 index 000000000..1d67c2252 --- /dev/null +++ b/3rdparty/fguillot/picofeed/tests/Parser/Rss92ParserTest.php @@ -0,0 +1,28 @@ +<?php +namespace PicoFeed\Parser; + +use PHPUnit_Framework_TestCase; + + +class Rss92ParserTest extends PHPUnit_Framework_TestCase +{ + public function testFormatOk() + { + $parser = new Rss92(file_get_contents('tests/fixtures/univers_freebox.xml')); + $feed = $parser->execute(); + + $this->assertNotFalse($feed); + $this->assertNotEmpty($feed->items); + + $this->assertEquals('Univers Freebox', $feed->getTitle()); + $this->assertEquals('http://www.universfreebox.com', $feed->getUrl()); + $this->assertEquals('http://www.universfreebox.com', $feed->getId()); + $this->assertEquals(time(), $feed->date); + $this->assertEquals(30, count($feed->items)); + + $this->assertEquals('Retour de Xavier Niel sur Twitter, « sans initiative privée, pas de révolution #Born2code »', $feed->items[0]->title); + $this->assertEquals('http://www.universfreebox.com/article20302.html', $feed->items[0]->getUrl()); + $this->assertEquals('ad23a45af194cc46d5151a9a062c5841b03405e456595c30b742d827e08af2e0', $feed->items[0]->getId()); + $this->assertEquals('', $feed->items[0]->getAuthor()); + } +}
\ No newline at end of file |