summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-06-22 16:01:56 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-06-22 16:01:56 +0200
commit3c7486272cd665123d50c233690b0f07a9c18d43 (patch)
treed3354fc8212c662b0318b74c1bd75edbdfdf2bce /tests
parentd2d0fae2b73ce1750ad0fc52b8729fdabe45a5b5 (diff)
Revert "fix #253, use current date when no pubdate is provided"
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/utility/FeedFetcherTest.php28
1 files changed, 3 insertions, 25 deletions
diff --git a/tests/unit/utility/FeedFetcherTest.php b/tests/unit/utility/FeedFetcherTest.php
index b624d998e..b783da296 100644
--- a/tests/unit/utility/FeedFetcherTest.php
+++ b/tests/unit/utility/FeedFetcherTest.php
@@ -167,7 +167,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
}
- private function createItem($author=false, $enclosureType=null, $noPubDate=false) {
+ private function createItem($author=false, $enclosureType=null) {
$this->purifier->expects($this->once())
->method('purify')
->with($this->equalTo($this->body))
@@ -176,17 +176,9 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$this->expectItem('get_title', $this->title);
$this->expectItem('get_id', $this->guid);
$this->expectItem('get_content', $this->body);
+ $this->expectItem('get_date', $this->pub);
$item = new Item();
-
- if($noPubDate) {
- $this->expectItem('get_date', 0);
- $item->setPubDate($this->time);
- } else {
- $this->expectItem('get_date', $this->pub);
- $item->setPubDate($this->pub);
- }
-
$item->setStatus(0);
$item->setUnread();
$item->setUrl($this->permalink);
@@ -194,6 +186,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$item->setGuid($this->guid);
$item->setGuidHash(md5($this->guid));
$item->setBody($this->body2);
+ $item->setPubDate($this->pub);
$item->setLastModified($this->time);
if($author) {
$mock = $this->getMock('author', array('get_name'));
@@ -320,20 +313,6 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$this->assertEquals(array($feed, array($item)), $result);
}
-
- public function testFetchMapItemsNoPubdate(){
- $this->core->expects($this->once())
- ->method('init')
- ->will($this->returnValue(true));
- $item = $this->createItem(false, true, true);
- $feed = $this->createFeed(false, true);
- $this->expectCore('get_items', array($this->item));
- $result = $this->fetcher->fetch($this->url);
-
- $this->assertEquals(array($feed, array($item)), $result);
- }
-
-
public function testFetchMapItemsGetFavicon() {
$this->expectCore('get_title', $this->feedTitle);
$this->expectCore('get_link', $this->feedLink);
@@ -386,5 +365,4 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$this->assertEquals(array($feed, array($item)), $result);
}
-
}