summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/tests
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/fguillot/picofeed/tests')
-rw-r--r--vendor/fguillot/picofeed/tests/Client/ClientTest.php20
-rw-r--r--vendor/fguillot/picofeed/tests/Filter/AttributeFilterTest.php49
-rw-r--r--vendor/fguillot/picofeed/tests/Filter/FilterTest.php35
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/AtomParserTest.php29
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/ItemTest.php24
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/ParserTest.php11
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php11
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss20ParserTest.php21
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss91ParserTest.php5
-rw-r--r--vendor/fguillot/picofeed/tests/Parser/Rss92ParserTest.php5
-rw-r--r--vendor/fguillot/picofeed/tests/Reader/FaviconTest.php (renamed from vendor/fguillot/picofeed/tests/Client/FaviconTest.php)19
-rw-r--r--vendor/fguillot/picofeed/tests/Reader/ReaderTest.php11
-rw-r--r--vendor/fguillot/picofeed/tests/fixtures/podbean.xml1596
13 files changed, 1794 insertions, 42 deletions
diff --git a/vendor/fguillot/picofeed/tests/Client/ClientTest.php b/vendor/fguillot/picofeed/tests/Client/ClientTest.php
index 98a963644..0a480c5c0 100644
--- a/vendor/fguillot/picofeed/tests/Client/ClientTest.php
+++ b/vendor/fguillot/picofeed/tests/Client/ClientTest.php
@@ -1,9 +1,9 @@
<?php
+
namespace PicoFeed\Client;
use PHPUnit_Framework_TestCase;
-
class ClientTest extends PHPUnit_Framework_TestCase
{
public function testDownload()
@@ -18,7 +18,6 @@ class ClientTest extends PHPUnit_Framework_TestCase
$this->assertNotEmpty($client->getLastModified());
}
-
public function testCacheEtag()
{
$client = Client::getInstance();
@@ -34,7 +33,6 @@ class ClientTest extends PHPUnit_Framework_TestCase
$this->assertFalse($client->isModified());
}
-
public function testCacheLastModified()
{
$client = Client::getInstance();
@@ -50,7 +48,6 @@ class ClientTest extends PHPUnit_Framework_TestCase
$this->assertFalse($client->isModified());
}
-
public function testCacheBoth()
{
$client = Client::getInstance();
@@ -80,4 +77,17 @@ class ClientTest extends PHPUnit_Framework_TestCase
$client->execute();
$this->assertEquals('', $client->getEncoding());
}
-} \ No newline at end of file
+
+ 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/Filter/AttributeFilterTest.php b/vendor/fguillot/picofeed/tests/Filter/AttributeFilterTest.php
index e4de74aaf..b0de530e7 100644
--- a/vendor/fguillot/picofeed/tests/Filter/AttributeFilterTest.php
+++ b/vendor/fguillot/picofeed/tests/Filter/AttributeFilterTest.php
@@ -43,35 +43,70 @@ class AttributeFilterTest extends PHPUnit_Framework_TestCase
$this->assertEquals(array('src' => 'http://www.youtube.com/test'), $filter->filter('iframe', array('width' => 'test', 'src' => 'http://www.youtube.com/test')));
}
- public function testFilterAbsoluteUrlAttribute()
+ public function testRewriteProxyImageUrl()
{
$filter = new Attribute(new Url('http://www.la-grange.net'));
$url = '/2014/08/03/4668-noisettes';
- $this->assertTrue($filter->filterAbsoluteUrlAttribute('a', 'href', $url));
+ $this->assertTrue($filter->rewriteImageProxyUrl('a', 'href', $url));
+ $this->assertEquals('/2014/08/03/4668-noisettes', $url);
+
+ $filter = new Attribute(new Url('http://www.la-grange.net'));
+ $url = '/2014/08/03/4668-noisettes';
+ $this->assertTrue($filter->rewriteImageProxyUrl('img', 'alt', $url));
+ $this->assertEquals('/2014/08/03/4668-noisettes', $url);
+
+ $filter = new Attribute(new Url('http://www.la-grange.net'));
+ $url = '/2014/08/03/4668-noisettes';
+ $this->assertTrue($filter->rewriteImageProxyUrl('img', 'src', $url));
+ $this->assertEquals('/2014/08/03/4668-noisettes', $url);
+
+ $filter = new Attribute(new Url('http://www.la-grange.net'));
+ $filter->setImageProxyUrl('https://myproxy/?u=%s');
+ $url = 'http://example.net/image.png';
+ $this->assertTrue($filter->rewriteImageProxyUrl('img', 'src', $url));
+ $this->assertEquals('https://myproxy/?u='.urlencode('http://example.net/image.png'), $url);
+
+ $filter = new Attribute(new Url('http://www.la-grange.net'));
+
+ $filter->setImageProxyCallback(function ($image_url) {
+ $key = hash_hmac('sha1', $image_url, 'secret');
+ return 'https://mypublicproxy/'.$key.'/'.urlencode($image_url);
+ });
+
+ $url = 'http://example.net/image.png';
+ $this->assertTrue($filter->rewriteImageProxyUrl('img', 'src', $url));
+ $this->assertEquals('https://mypublicproxy/d9701029b054f6e178ef88fcd3c789365e52a26d/'.urlencode('http://example.net/image.png'), $url);
+ }
+
+ public function testRewriteAbsoluteUrl()
+ {
+ $filter = new Attribute(new Url('http://www.la-grange.net'));
+ $url = '/2014/08/03/4668-noisettes';
+ $this->assertTrue($filter->rewriteAbsoluteUrl('a', 'href', $url));
$this->assertEquals('http://www.la-grange.net/2014/08/03/4668-noisettes', $url);
$filter = new Attribute(new Url('http://google.com'));
$url = 'test';
- $this->assertTrue($filter->filterAbsoluteUrlAttribute('a', 'href', $url));
+ $this->assertTrue($filter->rewriteAbsoluteUrl('a', 'href', $url));
$this->assertEquals('http://google.com/test', $url);
$url = 'http://127.0.0.1:8000/test';
- $this->assertTrue($filter->filterAbsoluteUrlAttribute('img', 'src', $url));
+ $this->assertTrue($filter->rewriteAbsoluteUrl('img', 'src', $url));
$this->assertEquals('http://127.0.0.1:8000/test', $url);
$url = '//example.com';
- $this->assertTrue($filter->filterAbsoluteUrlAttribute('a', 'href', $url));
+ $this->assertTrue($filter->rewriteAbsoluteUrl('a', 'href', $url));
$this->assertEquals('http://example.com/', $url);
$filter = new Attribute(new Url('https://google.com'));
$url = '//example.com/?youpi';
- $this->assertTrue($filter->filterAbsoluteUrlAttribute('a', 'href', $url));
+ $this->assertTrue($filter->rewriteAbsoluteUrl('a', 'href', $url));
$this->assertEquals('https://example.com/?youpi', $url);
$filter = new Attribute(new Url('https://127.0.0.1:8000/here/'));
$url = 'image.png?v=2';
- $this->assertTrue($filter->filterAbsoluteUrlAttribute('a', 'href', $url));
+ $this->assertTrue($filter->rewriteAbsoluteUrl('a', 'href', $url));
$this->assertEquals('https://127.0.0.1:8000/here/image.png?v=2', $url);
$filter = new Attribute(new Url('https://truc/'));
diff --git a/vendor/fguillot/picofeed/tests/Filter/FilterTest.php b/vendor/fguillot/picofeed/tests/Filter/FilterTest.php
index f3b736dfb..8bbb2b97c 100644
--- a/vendor/fguillot/picofeed/tests/Filter/FilterTest.php
+++ b/vendor/fguillot/picofeed/tests/Filter/FilterTest.php
@@ -85,4 +85,39 @@ class FilterTest extends PHPUnit_Framework_TestCase
$f->setConfig($config);
$this->assertEquals('<p>Testboo</p>', $f->execute());
}
+
+ public function testImageProxy()
+ {
+ $f = Filter::html('<p>Image <img src="/image.png" alt="My Image"/></p>', 'http://foo');
+
+ $this->assertEquals(
+ '<p>Image <img src="http://foo/image.png" alt="My Image"/></p>',
+ $f->execute()
+ );
+
+ $config = new Config;
+ $config->setFilterImageProxyUrl('http://myproxy/?url=%s');
+
+ $f = Filter::html('<p>Image <img src="/image.png" alt="My Image"/></p>', 'http://foo');
+ $f->setConfig($config);
+
+ $this->assertEquals(
+ '<p>Image <img src="http://myproxy/?url='.urlencode('http://foo/image.png').'" alt="My Image"/></p>',
+ $f->execute()
+ );
+
+ $config = new Config;
+ $config->setFilterImageProxyCallback(function ($image_url) {
+ $key = hash_hmac('sha1', $image_url, 'secret');
+ return 'https://mypublicproxy/'.$key.'/'.urlencode($image_url);
+ });
+
+ $f = Filter::html('<p>Image <img src="/image.png" alt="My Image"/></p>', 'http://foo');
+ $f->setConfig($config);
+
+ $this->assertEquals(
+ '<p>Image <img src="https://mypublicproxy/4924964043f3119b3cf2b07b1922d491bcc20092/'.urlencode('http://foo/image.png').'" alt="My Image"/></p>',
+ $f->execute()
+ );
+ }
} \ No newline at end of file
diff --git a/vendor/fguillot/picofeed/tests/Parser/AtomParserTest.php b/vendor/fguillot/picofeed/tests/Parser/AtomParserTest.php
index b94f64b1d..394734ca1 100644
--- a/vendor/fguillot/picofeed/tests/Parser/AtomParserTest.php
+++ b/vendor/fguillot/picofeed/tests/Parser/AtomParserTest.php
@@ -52,15 +52,38 @@ class AtomParserTest extends PHPUnit_Framework_TestCase
{
$parser = new Atom(file_get_contents('tests/fixtures/atom.xml'));
$feed = $parser->execute();
- $this->assertEquals('http://googleblog.blogspot.com/', $feed->getUrl());
+ $this->assertEquals('', $feed->getFeedUrl());
+
+ $parser = new Atom(file_get_contents('tests/fixtures/atomsample.xml'), '', 'http://example.org/');
+ $feed = $parser->execute();
+ $this->assertEquals('http://example.org/', $feed->getFeedUrl());
+
+ $parser = new Atom(file_get_contents('tests/fixtures/lagrange.xml'));
+ $feed = $parser->execute();
+ $this->assertEquals('http://www.la-grange.net/feed.atom', $feed->getFeedUrl());
+
+ $parser = new Atom(file_get_contents('tests/fixtures/groovehq.xml'), '', 'http://groovehq.com/');
+ $feed = $parser->execute();
+ $this->assertEquals('http://groovehq.com/articles.xml', $feed->getFeedUrl());
+ }
+
+ public function testSiteUrl()
+ {
+ $parser = new Atom(file_get_contents('tests/fixtures/atom.xml'));
+ $feed = $parser->execute();
+ $this->assertEquals('http://googleblog.blogspot.com/', $feed->getSiteUrl());
$parser = new Atom(file_get_contents('tests/fixtures/atomsample.xml'));
$feed = $parser->execute();
- $this->assertEquals('http://example.org/', $feed->getUrl());
+ $this->assertEquals('http://example.org/', $feed->getSiteUrl());
$parser = new Atom(file_get_contents('tests/fixtures/lagrange.xml'));
$feed = $parser->execute();
- $this->assertEquals('http://www.la-grange.net/', $feed->getUrl());
+ $this->assertEquals('http://www.la-grange.net/', $feed->getSiteUrl());
+
+ $parser = new Atom(file_get_contents('tests/fixtures/groovehq.xml'));
+ $feed = $parser->execute();
+ $this->assertEquals('', $feed->getSiteUrl());
}
public function testFeedId()
diff --git a/vendor/fguillot/picofeed/tests/Parser/ItemTest.php b/vendor/fguillot/picofeed/tests/Parser/ItemTest.php
new file mode 100644
index 000000000..5254acc9a
--- /dev/null
+++ b/vendor/fguillot/picofeed/tests/Parser/ItemTest.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace PicoFeed\Parser;
+
+use PHPUnit_Framework_TestCase;
+
+class ItemTest extends PHPUnit_Framework_TestCase
+{
+ public function testLangRTL()
+ {
+ $item = new Item;
+ $item->language = 'fr_FR';
+ $this->assertFalse($item->isRTL());
+
+ $item->language = 'ur';
+ $this->assertTrue($item->isRTL());
+
+ $item->language = 'syr-**';
+ $this->assertTrue($item->isRTL());
+
+ $item->language = 'ru';
+ $this->assertFalse($item->isRTL());
+ }
+}
diff --git a/vendor/fguillot/picofeed/tests/Parser/ParserTest.php b/vendor/fguillot/picofeed/tests/Parser/ParserTest.php
index 3be864507..449e0c9ce 100644
--- a/vendor/fguillot/picofeed/tests/Parser/ParserTest.php
+++ b/vendor/fguillot/picofeed/tests/Parser/ParserTest.php
@@ -1,9 +1,9 @@
<?php
+
namespace PicoFeed\Parser;
use PHPUnit_Framework_TestCase;
-
class ParserTest extends PHPUnit_Framework_TestCase
{
public function testParseDate()
@@ -22,6 +22,7 @@ class ParserTest extends PHPUnit_Framework_TestCase
$this->assertEquals(1364234797, $parser->parseDate('Mon, 25 Mar 2013 19:06:37 +0100'));
$this->assertEquals(1360054941, $parser->parseDate('2013-02-05T09:02:21.880-08:00'));
$this->assertEquals(1286834400, $parser->parseDate('Tue, 12 Oct 2010 00:00:00 IST'));
+ $this->assertEquals('2014-12-15 19:49', date('Y-m-d H:i', $parser->parseDate('15 Dec 2014 19:49:07 +0100')));
$this->assertEquals('2012-05-15', date('Y-m-d', $parser->parseDate('Tue, 15 May 2012 24:05:00 UTC')));
$this->assertEquals('2013-09-12', date('Y-m-d', $parser->parseDate('Thu, 12 Sep 2013 7:00:00 UTC')));
$this->assertEquals('2012-01-31', date('Y-m-d', $parser->parseDate('01.31.2012')));
@@ -54,14 +55,6 @@ class ParserTest extends PHPUnit_Framework_TestCase
$this->assertEquals('da23614e02469a0d7c7bd1bdab5c9c474b1904dc', $parser->generateId('a', 'b'));
}
- public function testLangRTL()
- {
- $this->assertFalse(Parser::isLanguageRTL('fr-FR'));
- $this->assertTrue(Parser::isLanguageRTL('ur'));
- $this->assertTrue(Parser::isLanguageRTL('syr-**'));
- $this->assertFalse(Parser::isLanguageRTL('ru'));
- }
-
public function testNamespaceValue()
{
$xml = XmlParser::getSimpleXml(file_get_contents('tests/fixtures/rue89.xml'));
diff --git a/vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php b/vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php
index bc0824502..f06ff3544 100644
--- a/vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php
+++ b/vendor/fguillot/picofeed/tests/Parser/Rss10ParserTest.php
@@ -26,14 +26,21 @@ class Rss10ParserTest extends PHPUnit_Framework_TestCase
{
$parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml'));
$feed = $parser->execute();
- $this->assertEquals('http://planete-jquery.fr', $feed->getUrl());
+ $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());
+ $this->assertEquals('http://planete-jquery.fr/', $feed->getId());
}
public function testFeedDate()
diff --git a/vendor/fguillot/picofeed/tests/Parser/Rss20ParserTest.php b/vendor/fguillot/picofeed/tests/Parser/Rss20ParserTest.php
index b06821c27..c282ad372 100644
--- a/vendor/fguillot/picofeed/tests/Parser/Rss20ParserTest.php
+++ b/vendor/fguillot/picofeed/tests/Parser/Rss20ParserTest.php
@@ -56,11 +56,26 @@ class Rss20ParserTest extends PHPUnit_Framework_TestCase
{
$parser = new Rss20(file_get_contents('tests/fixtures/rss20.xml'));
$feed = $parser->execute();
- $this->assertEquals('http://wordpress.org/news', $feed->getUrl());
+ $this->assertEquals('', $feed->getFeedUrl());
+
+ $parser = new Rss20(file_get_contents('tests/fixtures/rss20.xml'), '', 'http://example.com/feed');
+ $feed = $parser->execute();
+ $this->assertEquals('http://example.com/feed', $feed->getFeedUrl());
+
+ $parser = new Rss20(file_get_contents('tests/fixtures/pcinpact.xml'));
+ $feed = $parser->execute();
+ $this->assertEquals('', $feed->getFeedUrl());
+ }
+
+ public function testSiteUrl()
+ {
+ $parser = new Rss20(file_get_contents('tests/fixtures/rss20.xml'));
+ $feed = $parser->execute();
+ $this->assertEquals('http://wordpress.org/news', $feed->getSiteUrl());
$parser = new Rss20(file_get_contents('tests/fixtures/pcinpact.xml'));
$feed = $parser->execute();
- $this->assertEquals('http://www.pcinpact.com/', $feed->getUrl());
+ $this->assertEquals('http://www.pcinpact.com/', $feed->getSiteUrl());
}
public function testFeedId()
@@ -231,7 +246,7 @@ class Rss20ParserTest extends PHPUnit_Framework_TestCase
$parser = new Rss20(file_get_contents('tests/fixtures/geekstammtisch.de_episodes.mp3.rss'));
$feed = $parser->execute();
$this->assertNotEmpty($feed->items);
- $this->assertEquals('http://geekstammtisch.de#GST001', $feed->items[1]->getUrl());
+ $this->assertEquals('http://geekstammtisch.de/#GST001', $feed->items[1]->getUrl());
$parser = new Rss20(file_get_contents('tests/fixtures/lincoln_loop.xml'));
$feed = $parser->execute();
diff --git a/vendor/fguillot/picofeed/tests/Parser/Rss91ParserTest.php b/vendor/fguillot/picofeed/tests/Parser/Rss91ParserTest.php
index 8f10f2ea5..f84a0d0d0 100644
--- a/vendor/fguillot/picofeed/tests/Parser/Rss91ParserTest.php
+++ b/vendor/fguillot/picofeed/tests/Parser/Rss91ParserTest.php
@@ -15,8 +15,9 @@ class Rss91ParserTest extends PHPUnit_Framework_TestCase
$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('', $feed->getFeedUrl());
+ $this->assertEquals('http://writetheweb.com/', $feed->getSiteUrl());
+ $this->assertEquals('http://writetheweb.com/', $feed->getId());
$this->assertEquals(time(), $feed->getDate());
$this->assertEquals(6, count($feed->items));
diff --git a/vendor/fguillot/picofeed/tests/Parser/Rss92ParserTest.php b/vendor/fguillot/picofeed/tests/Parser/Rss92ParserTest.php
index 1d67c2252..521cd7b05 100644
--- a/vendor/fguillot/picofeed/tests/Parser/Rss92ParserTest.php
+++ b/vendor/fguillot/picofeed/tests/Parser/Rss92ParserTest.php
@@ -15,8 +15,9 @@ class Rss92ParserTest extends PHPUnit_Framework_TestCase
$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('', $feed->getFeedUrl());
+ $this->assertEquals('http://www.universfreebox.com/', $feed->getSiteUrl());
+ $this->assertEquals('http://www.universfreebox.com/', $feed->getId());
$this->assertEquals(time(), $feed->date);
$this->assertEquals(30, count($feed->items));
diff --git a/vendor/fguillot/picofeed/tests/Client/FaviconTest.php b/vendor/fguillot/picofeed/tests/Reader/FaviconTest.php
index c0ac11ac6..eaf701298 100644
--- a/vendor/fguillot/picofeed/tests/Client/FaviconTest.php
+++ b/vendor/fguillot/picofeed/tests/Reader/FaviconTest.php
@@ -1,8 +1,9 @@
<?php
-namespace PicoFeed\Client;
-use PHPUnit_Framework_TestCase;
+namespace PicoFeed\Reader;
+use PHPUnit_Framework_TestCase;
+use PicoFeed\Client\Url;
class FaviconTest extends PHPUnit_Framework_TestCase
{
@@ -140,4 +141,18 @@ class FaviconTest extends PHPUnit_Framework_TestCase
$this->assertEmpty($favicon->getContent());
}
+
+ public function testDataUri()
+ {
+ $favicon = new Favicon;
+
+ $this->assertEquals(
+ 'http://miniflux.net/assets/img/favicon.png',
+ $favicon->find('http://miniflux.net')
+ );
+
+ $expected = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGJwAABicBTVTYxwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAALMSURBVHic7Zo7a1RRFIW/I8YXaBBEJRJEU8RqQBBBQRBEWxHBwlZUsLRWUFBsA4L4G4IY0TaF2PhEEQwmhuADJIkRUUOMr2RZ3Em8mcxkzrkPtjhnwS7msveadT/Ofc44SbSyllkHsFYEYB3AWhGAdQBrRQDWAawVAVgHsFYEYB3AWhGAdQBrLS/L2Dm3CdgFbK3WDPC6Wi8kjWX03QBUgG3AdmAN8LFaT4CnCnjEdbW9zrk+YL3n/AVJd2vmDwKngMNAW4O538BNoEfSfa+gzu0DzgBHl/AFGAN6gcuSPjQ1lrSggHFAnnUsNdcO3AiYnas7wNraHCnfLcC9DL6TwNlGvvP+RQAAdgIjGULO1XOgs06WQ8BEDl8BPVRXeikAgK4CQgp4B7SnchwnOW/k9RVwviwAp4HBgkIKuJ5aUd8K9P0JVMoA8LnAkAJmgSPA24J9BfTXA1DvKjAObOT/k4BuScPpjWXcCM0Co8CnErynSFbHTIZZB5xYtDXnIZCuCeAkqUsa0AlcyeiXrtvAnpTvamA/8CbQ50HR54C5egV0LHEtv5hj588t4dsBvA/wmgbaigbwneTYanyzkayELDvf2/RGBi4FelaKBnC1Wciq70Cg7y+gy8O3O9D3QHq+iJPgNc++R4G+/ZJGPPqGSU68vlqX/pAXwKCkl569XwK9b/k0SZoleRL0VaEAngX0TgZ6Pw7obf7U91cr0x/yAhgK6A0BIMB3ZUFyq5tJeQGELL2vAb1TkqYD+lcF9C5QXgAhO/WjJF/I8WYrL4CQnfoXfBep5V+KRgDWAawVAVgHsFYEYB3AWhGAdQBrRQDWAawVAVgHsFYEYB3AWi0PoN6Po3uBFZ7zA5ImvL7Iuc3ADk/faUkPPXtxzu0m+a+Qj4Ykjc7P1gJoNbX8IRABWAewVgRgHcBaEYB1AGtFANYBrBUBWAewVssD+AMBy6wzsaDiAwAAAABJRU5ErkJggg==';
+
+ $this->assertEquals($expected, $favicon->getDataUri());
+ }
}
diff --git a/vendor/fguillot/picofeed/tests/Reader/ReaderTest.php b/vendor/fguillot/picofeed/tests/Reader/ReaderTest.php
index c060de0aa..e9d1bb925 100644
--- a/vendor/fguillot/picofeed/tests/Reader/ReaderTest.php
+++ b/vendor/fguillot/picofeed/tests/Reader/ReaderTest.php
@@ -15,7 +15,6 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$this->assertEquals('https://google.com', $reader->prependScheme('https://google.com'));
}
-
public function testDownload()
{
$reader = new Reader;
@@ -23,7 +22,6 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$this->assertNotEmpty($feed);
}
-
public function testDownloadWithCache()
{
$reader = new Reader;
@@ -38,10 +36,12 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$this->assertFalse($resource->isModified());
}
-
public function testDetectFormat()
{
$reader = new Reader;
+ $this->assertEquals('Rss20', $reader->detectFormat(file_get_contents('tests/fixtures/podbean.xml')));
+
+ $reader = new Reader;
$this->assertEquals('Rss20', $reader->detectFormat(file_get_contents('tests/fixtures/jeux-linux.fr.xml')));
$reader = new Reader;
@@ -78,7 +78,6 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$this->assertEquals('Rss20', $reader->detectFormat($content));
}
-
public function testFind()
{
$reader = new Reader;
@@ -105,7 +104,6 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$this->assertEquals('http://rss.cnn.com/rss/cnn_world.rss', $feeds[1]);
}
-
public function testDiscover()
{
$reader = new Reader;
@@ -128,7 +126,6 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$this->assertInstanceOf('PicoFeed\Parser\Atom', $reader->getParser($client->getUrl(), $client->getContent(), $client->getEncoding()));
}
-
public function testFeedsReportedAsNotWorking()
{
$reader = new Reader;
@@ -149,7 +146,7 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$feed = $parser->execute();
$this->assertEquals('http://www.groovehq.com/blog/feed', $client->getUrl());
- $this->assertEquals('http://www.groovehq.com/blog/feed', $feed->getUrl());
+ $this->assertEquals('http://www.groovehq.com/blog/feed', $feed->getFeedUrl());
$this->assertNotEquals('http://www.groovehq.com/blog/feed', $feed->items[0]->getUrl());
$this->assertTrue(strpos($feed->items[0]->getUrl(), 'http://') === 0);
$this->assertTrue(strpos($feed->items[0]->getUrl(), 'feed') === false);
diff --git a/vendor/fguillot/picofeed/tests/fixtures/podbean.xml b/vendor/fguillot/picofeed/tests/fixtures/podbean.xml
new file mode 100644
index 000000000..057137d51
--- /dev/null
+++ b/vendor/fguillot/picofeed/tests/fixtures/podbean.xml
@@ -0,0 +1,1596 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- generator="podbean/3.2" -->
+<rss version="2.0"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:wfw="http://wellformedweb.org/CommentAPI/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
+ xmlns:media="http://search.yahoo.com/mrss/"
+>
+
+<channel>
+ <title>Around the Bloc</title>
+ <atom:link href="http://aroundthebloc.podbean.com/feed/" rel="self" type="application/rss+xml" />
+ <link>http://aroundthebloc.podbean.com</link>
+ <description>The Official Supporters Podcast of the Western Sydney Wanderers. www.aroundthebloc.com.au Now on iTunes - https://itunes.apple.com/au/podcast/around-the-bloc/id581817326</description>
+ <pubDate>Tue, 16 Dec 2014 12:56:02 +0000</pubDate>
+ <generator>http://podbean.com/?v=3.2</generator>
+ <language>en</language>
+ <!-- podcast_generator="Podbean Engine/5.0" -->
+ <copyright>Copyright 2012-2014 Around the Bloc. All rights reserved.</copyright>
+ <category>Sports &#x26; Recreation:Professional</category>
+ <ttl>1440</ttl>
+ <itunes:keywords>aleague,westernsydneywanderers</itunes:keywords>
+ <itunes:subtitle> </itunes:subtitle>
+ <itunes:summary>The Official Supporters Podcast of the Western Sydney Wanderers</itunes:summary>
+ <itunes:author>Around the Bloc</itunes:author>
+ <itunes:category text="Sports &amp; Recreation">
+ <itunes:category text="Professional"/>
+</itunes:category>
+ <itunes:owner>
+ <itunes:name>Around the Bloc</itunes:name>
+ <itunes:email>aroundthebloc1@gmail.com</itunes:email>
+ </itunes:owner>
+ <itunes:block>No</itunes:block>
+ <itunes:explicit>No</itunes:explicit>
+ <itunes:image href="http://imglogo.podbean.com/image-logo/586645/ATBLogo-BlackBackground.png" />
+ <image>
+ <url>http://imglogo.podbean.com/image-logo/586645/ATBLogo-BlackBackground.png</url>
+ <title>Around the Bloc</title>
+ <link>http://aroundthebloc.podbean.com</link>
+ <width>144</width>
+ <height>144</height>
+ </image>
+ <item>
+ <title>S03E11: Finding Nemo-rocco</title>
+ <link>http://aroundthebloc.podbean.com/e/s03e11-finding-nemo-rocco/</link>
+ <comments>http://aroundthebloc.podbean.com/e/s03e11-finding-nemo-rocco/#comments</comments>
+ <pubDate>Tue, 16 Dec 2014 12:56:02 +0000</pubDate>
+ <dc:creator>aroundthebloc</dc:creator>
+
+ <category>Uncategorized</category>
+ <guid isPermaLink="false">http://aroundthebloc.podbean.com/e/s03e11-finding-nemo-rocco/</guid>
+ <description><![CDATA[<div>The Wanderers this week played in the club world cup, where they came off the pitch squeaky clean due to the weather, but couldn’t keep their sheet in the same condition and missed out on their dream match with Real Madrid. The team now goes on to contest the fifth place playoff against Algerian team ES Setif, who we hope gets ES se-mashed.</div>
+<div></div>
+<div>With mostly away games coming up, we’ve got details of how the RBB will be getting behind Nato - flag making and waving extraordinaire - who’s having a rough time, as well as all the usual stuff as well.</div>
+<div></div>
+<div>This is Around the Bloc.</div>
+]]></description>
+ <content:encoded><![CDATA[<div>The Wanderers this week played in the club world cup, where they came off the pitch squeaky clean due to the weather, but couldn’t keep their sheet in the same condition and missed out on their dream match with Real Madrid. The team now goes on to contest the fifth place playoff against Algerian team ES Setif, who we hope gets ES se-mashed.</div>
+<div></div>
+<div>With mostly away games coming up, we’ve got details of how the RBB will be getting behind Nato - flag making and waving extraordinaire - who’s having a rough time, as well as all the usual stuff as well.</div>
+<div></div>
+<div>This is Around the Bloc.</div>
+]]></content:encoded>
+ <wfw:commentRss>http://aroundthebloc.podbean.com/e/s03e11-finding-nemo-rocco/feed/</wfw:commentRss>
+ <enclosure url="http://aroundthebloc.podbean.com/mf/feed/xb5pjd/S03E11_Around_the_Bloc_podcast.mp3" length="46318627" type="audio/mpeg"/>
+ <itunes:subtitle>The Wanderers this week played in the club world cup, where they came off the pitch squeaky clean due to the weather, but couldn't keep ...</itunes:subtitle>
+ <itunes:summary>The Wanderers this week played in the club world cup, where they came off the pitch squeaky clean due to the weather, but couldn't keep their sheet in the same condition and missed out on their dream match with Real Madrid. The team now goes on to contest the fifth place playoff against Algerian team ES Setif, who we hope gets ES se-mashed.With mostly away games coming up, we’ve got details of how the RBB will be getting behind Nato - flag making and waving extraordinaire - who’s having a rough time, as well as all the usual stuff as well.This is Around the Bloc.</itunes:summary>
+ <itunes:keywords /> <itunes:author>Around the Bloc</itunes:author>
+ <itunes:explicit>No</itunes:explicit>
+ <itunes:block>No</itunes:block>
+ <itunes:duration>01:50:05</itunes:duration>
+ <media:content url="http://aroundthebloc.podbean.com/mf/web/28bcnk/ATBLogo-BlackBackground.png" medium="image">
+ <media:title type="html">S03E11: Finding Nemo-rocco</media:title></media:content> </item>
+ <item>
+ <title>S03E10: No Money, Mo&#8217; Problems</title>
+ <link>http://aroundthebloc.podbean.com/e/s03e10-no-money-mo-problems/</link>
+ <comments>http://aroundthebloc.podbean.com/e/s03e10-no-money-mo-problems/#comments</comments>
+ <pubDate>Tue, 09 Dec 2014 13:20:39 +0000</pubDate>
+ <dc:creator>aroundthebloc</dc:creator>
+
+ <category>Uncategorized</category>
+ <guid isPermaLink="false">http://aroundthebloc.podbean.com/e/s03e10-no-money-mo-problems/</guid>
+ <description><![CDATA[<div>Well, the Wanderers lost two games in the last week, and to top it off, the players are having issues with the clubs owners about their bonuses for playing in the Club World Cup… That’s right, the Wanderers are playing in the Club World Cup! We start off against a Mexican team, once we Cruz through them, things will get Real… really Real. After we Bale them over, we’ve got one game to win before we’re champions of the world.</div>
+<div></div>
+<div>Easier said than won eh?</div>
+<div></div>
+<div>This is Around the Bloc.</div>
+]]></description>
+ <content:encoded><![CDATA[<div>Well, the Wanderers lost two games in the last week, and to top it off, the players are having issues with the clubs owners about their bonuses for playing in the Club World Cup… That’s right, the Wanderers are playing in the Club World Cup! We start off against a Mexican team, once we Cruz through them, things will get Real… really Real. After we Bale them over, we’ve got one game to win before we’re champions of the world.</div>
+<div></div>
+<div>Easier said than won eh?</div>
+<div></div>
+<div>This is Around the Bloc.</div>
+]]></content:encoded>
+ <wfw:commentRss>http://aroundthebloc.podbean.com/e/s03e10-no-money-mo-problems/feed/</wfw:commentRss>
+ <enclosure url="http://aroundthebloc.podbean.com/mf/feed/h6ifqz/S03E10_Around_the_Bloc_podcast.mp3" length="70387085" type="audio/mpeg"/>
+ <itunes:subtitle>Well, the Wanderers lost two games in the last week, and to top it off, the players are having issues with the clubs owners about ...</itunes:subtitle>
+ <itunes:summary>Well, the Wanderers lost two games in the last week, and to top it off, the players are having issues with the clubs owners about their bonuses for playing in the Club World Cup… That’s right, the Wanderers are playing in the Club World Cup! We start off against a Mexican team, once we Cruz through them, things will get Real… really Real. After we Bale them over, we've got one game to win before we’re champions of the world.Easier said than won eh?This is Around the Bloc.</itunes:summary>
+ <itunes:keywords /> <itunes:author>Around the Bloc</itunes:author>
+ <itunes:explicit>No</itunes:explicit>
+ <itunes:block>No</itunes:block>
+ <itunes:duration>02:47:25</itunes:duration>
+ <media:content url="http://aroundthebloc.podbean.com/mf/web/28bcnk/ATBLogo-BlackBackground.png" medium="image">
+ <media:title type="html">S03E10: No Money, Mo&#8217; Problems</media:title></media:content> </item>
+ <item>
+ <title>S03E09: K-Gate</title>
+ <link>http://aroundthebloc.podbean.com/e/s03e09-k-gate/</link>
+ <comments>http://aroundthebloc.podbean.com/e/s03e09-k-gate/#comments</comments>
+ <pubDate>Tue, 02 Dec 2014 13:47:31 +0000</pubDate>
+ &l