diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2019-03-12 14:00:05 +0100 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2019-03-12 19:58:06 +0100 |
commit | f416213993bc014664fde940df050aa6225e08a7 (patch) | |
tree | 00443f555cecb13dbe9ec20af62e9b520d78329e /tests/Unit/Fetcher/FeedFetcherTest.php | |
parent | e4da09575fc67b20bb3bf61cbf8cff1dd4c789c9 (diff) |
Fix email and password not being encoded
Diffstat (limited to 'tests/Unit/Fetcher/FeedFetcherTest.php')
-rw-r--r-- | tests/Unit/Fetcher/FeedFetcherTest.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/Unit/Fetcher/FeedFetcherTest.php b/tests/Unit/Fetcher/FeedFetcherTest.php index c7f42a63e..8f031d365 100644 --- a/tests/Unit/Fetcher/FeedFetcherTest.php +++ b/tests/Unit/Fetcher/FeedFetcherTest.php @@ -229,6 +229,17 @@ class FeedFetcherTest extends TestCase $this->assertEquals([$feed, [$item]], $result); } + public function testFetchAccount() + { + $this->__setUpReader('http://account%40email.com:F9sEU%2ARt%25%3AKFK8HMHT%26@tests'); + $item = $this->_createItem(); + $feed = $this->_createFeed('de-DE', false, 'http://account%40email.com:F9sEU%2ARt%25%3AKFK8HMHT%26@tests'); + $this->_mockIterator($this->feed_mock, [$this->item_mock]); + $result = $this->fetcher->fetch($this->url, false, null, 'account@email.com', 'F9sEU*Rt%:KFK8HMHT&'); + + $this->assertEquals([$feed, [$item]], $result); + } + public function testAudioEnclosure() { @@ -496,8 +507,9 @@ class FeedFetcherTest extends TestCase } - private function _createFeed($lang='de-DE', $favicon=false) + private function _createFeed($lang='de-DE', $favicon=false, $url= null) { + $url = $url ?? $this->url; $this->_expectFeed('getTitle', $this->feed_title, 2); $this->_expectFeed('getLink', $this->feed_link); $this->_expectFeed('getLastModified', $this->modified); @@ -508,7 +520,7 @@ class FeedFetcherTest extends TestCase $feed->setTitle('&its a title'); $feed->setLink($this->feed_link); $feed->setLocation($this->location); - $feed->setUrl($this->url); + $feed->setUrl($url); $feed->setLastModified(3); $feed->setAdded($this->time); if ($favicon) { |