diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-22 11:06:43 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-22 11:06:43 +0200 |
commit | dc8b8301d387d48e38624423cba9cf5323f26291 (patch) | |
tree | bbc8f280f74f4f628d0f2720e410bf09f2134325 /tests/unit/fetcher/FeedFetcherTest.php | |
parent | cc3fa38cee2e24dacb940ec5d7ca41e593aa824a (diff) |
fix #302
Diffstat (limited to 'tests/unit/fetcher/FeedFetcherTest.php')
-rw-r--r-- | tests/unit/fetcher/FeedFetcherTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index 1f3b3d108..db954d952 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -44,6 +44,7 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase { private $feedImage; private $webFavicon; private $modified; + private $etag; protected function setUp(){ $this->reader = $this->getMockBuilder( @@ -97,6 +98,7 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase { $this->webFavicon = 'http://anon.google.com'; $this->authorMail = 'doe@joes.com'; $this->modified = 3; + $this->etag = 'yo'; } @@ -115,6 +117,9 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase { $this->client->expects($this->once()) ->method('getLastModified') ->will($this->returnValue($this->modified)); + $this->client->expects($this->once()) + ->method('getEtag') + ->will($this->returnValue($this->etag)); if ($noParser) { $this->reader->expects($this->once()) @@ -199,6 +204,8 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase { $feed->setUrl($this->url); $feed->setLink($this->feedLink); $feed->setAdded($this->time); + $feed->setLastModified($this->modified); + $feed->setEtag($this->etag); if($hasFavicon) { $this->faviconFetcher->expects($this->once()) @@ -249,6 +256,8 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase { $feed->setLink($this->feedLink); $feed->setAdded($this->time); $feed->setFaviconLink(null); + $feed->setLastModified($this->modified); + $feed->setEtag($this->etag); $item = $this->createItem(); $this->expectFeed('getItems', [$this->item]); |