diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-27 09:29:09 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-27 09:29:09 +0100 |
commit | 73f65c8fbadbdd2098448e77b6d3f0464ad8613e (patch) | |
tree | f22ba63a222fb4f7d05427b661f3c008170047fd /vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php | |
parent | be37aed9f5d923fe16e264c6ffc97db08503b791 (diff) |
update picofeed
Diffstat (limited to 'vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php')
m--------- | vendor/fguillot/picofeed | 0 | ||||
-rw-r--r-- | vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php | 119 |
2 files changed, 0 insertions, 119 deletions
diff --git a/vendor/fguillot/picofeed b/vendor/fguillot/picofeed new file mode 160000 +Subproject 0a1d0d3950f7f047dc8fb1d80aa6296e15f306d diff --git a/vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php b/vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php deleted file mode 100644 index f06ff3544..000000000 --- a/vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php -namespace PicoFeed\Parser; - -use PHPUnit_Framework_TestCase; - - -class Rss10ParserTest extends PHPUnit_Framework_TestCase -{ - /** - * @expectedException PicoFeed\Parser\MalformedXmlException - */ - public function testBadInput() - { - $parser = new Rss10('boo'); - $parser->execute(); - } - - public function testFeedTitle() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertEquals("Planète jQuery : l'actualité jQuery, plugins jQuery et tutoriels jQuery en français", $feed->getTitle()); - } - - public function testFeedUrl() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertEquals('', $feed->getFeedUrl()); - } - - public function testSiteUrl() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertEquals('http://planete-jquery.fr/', $feed->getSiteUrl()); - } - - public function testFeedId() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertEquals('http://planete-jquery.fr/', $feed->getId()); - } - - public function testFeedDate() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertEquals(1363752990, $feed->getDate()); - } - - public function testFeedLanguage() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertEquals('fr', $feed->getLanguage()); - $this->assertEquals('fr', $feed->items[0]->getLanguage()); - } - - public function testItemId() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $parser->disableContentFiltering(); - $feed = $parser->execute(); - $this->assertNotEmpty($feed->items); - - $item = $feed->items[0]; - $this->assertEquals($parser->generateId($item->getTitle(), $item->getUrl(), $item->getContent()), $item->getId()); - } - - public function testItemUrl() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertNotEmpty($feed->items); - $this->assertEquals('http://www.mathieurobin.com/2013/03/chroniques-jquery-episode-108/', $feed->items[0]->getUrl()); - } - - public function testItemTitle() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertNotEmpty($feed->items); - $this->assertEquals('LaFermeDuWeb : PowerTip - Des tooltips aux fonctionnalités avancées', $feed->items[1]->getTitle()); - } - - public function testItemDate() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertNotEmpty($feed->items); - $this->assertEquals(1362647700, $feed->items[1]->getDate()); - } - - public function testItemLanguage() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertNotEmpty($feed->items); - $this->assertEquals('fr', $feed->items[1]->getLanguage()); - } - - public function testItemAuthor() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertNotEmpty($feed->items); - $this->assertEquals('LaFermeDuWeb', $feed->items[1]->getAuthor()); - } - - public function testItemContent() - { - $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml')); - $feed = $parser->execute(); - $this->assertNotEmpty($feed->items); - $this->assertTrue(strpos($feed->items[1]->getContent(), '<a href="http://www.lafermeduweb.net') === 0); - } -}
\ No newline at end of file |