diff options
author | Bernhard Posselt <bernhard@posselt.at> | 2015-11-28 14:19:51 +0100 |
---|---|---|
committer | Bernhard Posselt <bernhard@posselt.at> | 2015-11-28 14:19:51 +0100 |
commit | 30e66657b8709e95240da4f252a3fce6797acfda (patch) | |
tree | 5fad4b3ed44675e72d26be22d4b914bf99f961b2 /tests/integration | |
parent | 911af7d64402f86383b13eac832c8bd9a6a0556e (diff) |
also read duplicate feed items read
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/bootstrap.php | 1 | ||||
-rw-r--r-- | tests/integration/db/ItemMapperTest.php | 4 | ||||
-rw-r--r-- | tests/integration/fixtures/items.json | 14 |
3 files changed, 16 insertions, 3 deletions
diff --git a/tests/integration/bootstrap.php b/tests/integration/bootstrap.php index 19a169a7e..7cd298beb 100644 --- a/tests/integration/bootstrap.php +++ b/tests/integration/bootstrap.php @@ -162,6 +162,7 @@ class NewsIntegrationTest extends PHPUnit_Framework_TestCase { $newItem->setLastModified($item['lastModified']); $newItem->setEnclosureMime($item['enclosureMime']); $newItem->setEnclosureLink($item['enclosureLink']); + $newItem->generateSearchIndex(); return $this->itemMapper->insert($newItem); } diff --git a/tests/integration/db/ItemMapperTest.php b/tests/integration/db/ItemMapperTest.php index dcd101a9f..89fe98ebf 100644 --- a/tests/integration/db/ItemMapperTest.php +++ b/tests/integration/db/ItemMapperTest.php @@ -133,7 +133,7 @@ class ItemMapperTest extends NewsIntegrationTest { 30, 0, $status, false, $this->userId ); - $this->assertEquals(1, count($items)); + $this->assertEquals(2, count($items)); $item = $this->items['a title1']; $item = $this->itemMapper->find($item->getId(), $this->userId); @@ -210,7 +210,7 @@ class ItemMapperTest extends NewsIntegrationTest { public function testFindAllUnreadOrStarred () { $items = $this->itemMapper->findAllUnreadOrStarred($this->userId); - $this->assertEquals(4, count($items)); + $this->assertEquals(5, count($items)); } diff --git a/tests/integration/fixtures/items.json b/tests/integration/fixtures/items.json index 5396fde9b..c9f744a56 100644 --- a/tests/integration/fixtures/items.json +++ b/tests/integration/fixtures/items.json @@ -101,6 +101,18 @@ ], "fourth feed": [ { + "status": 2, + "body": "this is a body", + "title": "a title9", + "author": "my author", + "guid": "a title9", + "url": "http://google.de", + "pubDate": 1234, + "lastModified": 1234, + "enclosureMime": "video/mpeg", + "enclosureLink": "http://google.de/web.webm" + }, + { "status": 0, "body": "this is a body", "title": "no folder", @@ -141,4 +153,4 @@ "enclosureLink": "http://google.de/web.webm" } ] -}
\ No newline at end of file +} |