summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-09-12 23:18:16 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-09-12 23:18:16 +0200
commit522f9ef81b39c7b2dbc5e8e817b1ab45ef6b0aa1 (patch)
treeb273dfa22e6b28cc390be0d34af7ee4e9446020d /vendor/fguillot/picofeed/tests
parent978453d0fb5deea645352a2c695a8bb7776bf723 (diff)
update picofeed
Diffstat (limited to 'vendor/fguillot/picofeed/tests')
-rw-r--r--vendor/fguillot/picofeed/tests/Client/ClientTest.php145
-rw-r--r--vendor/fguillot/picofeed/tests/Client/CurlTest.php74
-rw-r--r--vendor/fguillot/picofeed/tests/Client/HttpHeadersTest.php19
-rw-r--r--vendor/fguillot/picofeed/tests/Client/StreamTest.php91
-rw-r--r--vendor/fguillot/picofeed/tests/Client/UrlTest.php298
-rw-r--r--vendor/fguillot/picofeed/tests/Filter/AttributeFilterTest.php324
-rw-r--r--vendor/fguillot/picofeed/tests/Filter/FilterTest.php122
-rw-r--r--vendor/fguillot/picofeed/tests/Filter/HtmlFilterTest.php173
-rw-r--r--vendor/fguillot/picofeed/tests/Filter/TagFilterTest.php33
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/AtomParserTest.php463
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/DateParserTest.php49
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/FeedTest.php24
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/ItemTest.php36
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/ParserTest.php71
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php352
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss20ParserTest.php311
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss91ParserTest.php31
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss92ParserTest.php29
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/XmlParserTest.php197
-rw-r--r--vendor/fguillot/picofeed/tests/Reader/FaviconTest.php188
-rw-r--r--vendor/fguillot/picofeed/tests/Reader/ReaderTest.php269
-rw-r--r--vendor/fguillot/picofeed/tests/Scraper/RuleLoaderTest.php86
-rw-r--r--vendor/fguillot/picofeed/tests/Scraper/ScraperTest.php89
-rw-r--r--vendor/fguillot/picofeed/tests/Serialization/ExportTest.php70
-rw-r--r--vendor/fguillot/picofeed/tests/Serialization/ImportTest.php61
-rw-r--r--vendor/fguillot/picofeed/tests/Syndication/AtomWriterTest.php90
-rw-r--r--vendor/fguillot/picofeed/tests/Syndication/Rss20WriterTest.php85
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom.xml93
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_element_preference.xml38
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_empty_feed.xml9
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_empty_item.xml4
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_extra.xml19
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_fallback_on_invalid_feed_values.xml15
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_fallback_on_invalid_item_values.xml28
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_no_default_namespace.xml92
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atom_prefixed.xml93
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/atomsample.xml20
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/cercle.psy.xml58
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/ezrss.it496
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/fulltextrss.xml88
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/google-reader.opml78
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/googleblog.xml477
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/groovehq.xml1767
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/html4_head_stripped_page.html435
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/html4_page.html486
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/html_head_stripped_page.html804
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/html_page.html967
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/ibash.ru.xml359
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/jeux-linux.fr.xml924
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/lagrange.xml1986
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/lincoln_loop.xml1150
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/miniflux_favicon.icobin16958 -> 0 bytes
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/newsbeuter.opml43
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/next_inpact_full.xml2435
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/pcinpact.xml1
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/planete-jquery.xml443
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/podbean.xml1596
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/resorts.xml169
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss2sample.xml41
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_0.91.xml50
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_0.92.xml103
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10.xml69
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_element_preference.xml51
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_empty_channel.xml13
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_empty_feed.xml10
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_empty_item.xml5
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_extra.xml25
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_fallback_on_invalid_feed_values.xml18
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_fallback_on_invalid_item_values.xml39
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_no_default_namespace.xml69
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_10_prefixed.xml42
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20.xml81
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_dc.xml18
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_element_preference.xml69
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_empty_channel.xml12
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_empty_feed.xml9
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_empty_item.xml6
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_extra.xml30
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_fallback_on_invalid_feed_values.xml17
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rss_20_fallback_on_invalid_item_values.xml34
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/rue89.xml2
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/sametmax.xml1067
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/subscriptionList.opml1
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/tinytinyrss.opml13
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/univers_freebox.xml30
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/xakep.ru.xml245
86 files changed, 0 insertions, 21122 deletions
diff --git a/vendor/fguillot/picofeed/tests/Client/ClientTest.php b/vendor/fguillot/picofeed/tests/Client/ClientTest.php
deleted file mode 100644
index 4099a7158..000000000
--- a/vendor/fguillot/picofeed/tests/Client/ClientTest.php
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-
-namespace PicoFeed\Client;
-
-use PHPUnit_Framework_TestCase;
-
-class ClientTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @group online
- */
- public function testDownload()
- {
- $client = Client::getInstance();
- $client->setUrl('http://php.net/robots.txt');
- $client->execute();
-
- $this->assertTrue($client->isModified());
- $this->assertNotEmpty($client->getContent());
- $this->assertNotEmpty($client->getEtag());
- $this->assertNotEmpty($client->getLastModified());
- }
-
- /**
- * @runInSeparateProcess
- * @group online
- */
- public function testPassthrough()
- {
- $client = Client::getInstance();
- $client->setUrl('https://miniflux.net/favicon.ico');
- $client->enablePassthroughMode();
- $client->execute();
-
- $this->expectOutputString(file_get_contents('tests/fixtures/miniflux_favicon.ico'));
- }
-
- /**
- * @group online
- */
- public function testCacheBothHaveToMatch()
- {
- $client = Client::getInstance();
- $client->setUrl('http://php.net/robots.txt');
- $client->execute();
- $etag = $client->getEtag();
-
- $client = Client::getInstance();
- $client->setUrl('http://php.net/robots.txt');
- $client->setEtag($etag);
- $client->execute();
-
- $this->assertTrue($client->isModified());
- }
-
- /**
- * @group online
- */
- public function testCacheEtag()
- {
- $client = Client::getInstance();
- $client->setUrl('http://php.net/robots.txt');
- $client->execute();
- $etag = $client->getEtag();
- $lastModified = $client->getLastModified();
-
- $client = Client::getInstance();
- $client->setUrl('http://php.net/robots.txt');
- $client->setEtag($etag);
- $client->setLastModified($lastModified);
- $client->execute();
-
- $this->assertFalse($client->isModified());
- }
-
- /**
- * @group online
- */
- public function testCacheLastModified()
- {
- $client = Client::getInstance();
- $client->setUrl('http://miniflux.net/humans.txt');
- $client->execute();
- $lastmod = $client->getLastModified();
-
- $client = Client::getInstance();
- $client->setUrl('http://miniflux.net/humans.txt');
- $client->setLastModified($lastmod);
- $client->execute();
-
- $this->assertFalse($client->isModified());
- }
-
- /**
- * @group online
- */
- public function testCacheBoth()
- {
- $client = Client::getInstance();
- $client->setUrl('http://miniflux.net/humans.txt');
- $client->execute();
- $lastmod = $client->getLastModified();
- $etag = $client->getEtag();
-
- $client = Client::getInstance();
- $client->setUrl('http://miniflux.net/humans.txt');
- $client->setLastModified($lastmod);
- $client->setEtag($etag);
- $client->execute();
-
- $this->assertFalse($client->isModified());
- }
-
- /**
- * @group online
- */
- public function testCharset()
- {
- $client = Client::getInstance();
- $client->setUrl('http://php.net/');
- $client->execute();
- $this->assertEquals('utf-8', $client->getEncoding());
-
- $client = Client::getInstance();
- $client->setUrl('http://php.net/robots.txt');
- $client->execute();
- $this->assertEquals('', $client->getEncoding());
- }
-
- /**
- * @group online
- */
- public function testContentType()
- {
- $client = Client::getInstance();
- $client->setUrl('http://miniflux.net/assets/img/favicon.png');
- $client->execute();
- $this->assertEquals('image/png', $client->getContentType());
-
- $client = Client::getInstance();
- $client->setUrl('http://miniflux.net/');
- $client->execute();
- $this->assertEquals('text/html; charset=utf-8', $client->getContentType());
- }
-}
diff --git a/vendor/fguillot/picofeed/tests/Client/CurlTest.php b/vendor/fguillot/picofeed/tests/Client/CurlTest.php
deleted file mode 100644
index ec7b39894..000000000
--- a/vendor/fguillot/picofeed/tests/Client/CurlTest.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-namespace PicoFeed\Client;
-
-use PHPUnit_Framework_TestCase;
-
-
-class CurlTest extends PHPUnit_Framework_TestCase
-{
- /**
- * @group online
- */
- public function testDownload()
- {
- $client = new Curl;
- $client->setUrl('http://miniflux.net/index.html');
- $result = $client->doRequest();
-
- $this->assertTrue(is_array($result));
- $this->assertEquals(200, $result['status']);
- $this->assertEquals('<!DOC', substr($result['body'], 0, 5));
- $this->assertEquals('text/html; charset=utf-8', $result['headers']['Content-Type']);
- }
-
- /**
- * @runInSeparateProcess
- * @group online
- */
- public function testPassthrough()
- {
- $client = new Curl;
- $client->setUrl('https://miniflux.net/favicon.ico');
- $client->enablePassthroughMode();
- $client->doRequest();
-
- $this->expectOutputString(file_get_contents('tests/fixtures/miniflux_favicon.ico'));
- }
-
- /**
- * @group online
- */
- public function testRedirect()
- {
- $client = new Curl;
- $client->setUrl('http://rss.feedsportal.com/c/629/f/502199/s/42e50391/sc/44/l/0L0S0A1net0N0Ceditorial0C6437220Candroid0Egoogle0Enow0Es0Eouvre0Eaux0Eapplications0Etierces0C0T0Dxtor0FRSS0E16/story01.htm');
- $result = $client->doRequest();
-
- $this->assertTrue(is_array($result));
- $this->assertEquals(200, $result['status']);
- $this->assertEquals('<!DOCTYPE', substr($result['body'], 0, 9));