summaryrefslogtreecommitdiffstats
path: root/tests/integration/db/ItemMapperTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-12-03 21:40:46 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2016-01-17 18:18:39 +0100
commit570c75db776a79294d97a05cd8ac63ac4ab39685 (patch)
treedeedd28a10628a06b9d0b53400a2719b7a659562 /tests/integration/db/ItemMapperTest.php
parente5d606d3ee7dc046e7db9eb1f94b6cc6e542ecbe (diff)
fix several integration test issues
Diffstat (limited to 'tests/integration/db/ItemMapperTest.php')
-rw-r--r--tests/integration/db/ItemMapperTest.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/integration/db/ItemMapperTest.php b/tests/integration/db/ItemMapperTest.php
index 948b843de..0f5f15318 100644
--- a/tests/integration/db/ItemMapperTest.php
+++ b/tests/integration/db/ItemMapperTest.php
@@ -11,16 +11,21 @@
namespace OCA\News\Db;
+use OCA\News\Tests\Integration\Fixtures\FeedFixture;
use OCA\News\Tests\Integration\Fixtures\ItemFixture;
use OCA\News\Tests\Integration\IntegrationTest;
class ItemMapperTest extends IntegrationTest {
public function testFind() {
- $item = new ItemFixture();
+ $feed = new FeedFixture();
+ $feed = $this->feedMapper->insert($feed);
- $created = $this->itemMapper->insert($item);
- $fetched = $this->itemMapper->find($created->getId(), $this->user);
+ $item = new ItemFixture(['feedId' => $feed->getId()]);
+
+ $item = $this->itemMapper->insert($item);
+
+ $fetched = $this->itemMapper->find($item->getId(), $this->user);
$this->assertEquals($item->getTitle(), $fetched->getTitle());
}
@@ -51,6 +56,7 @@ class ItemMapperTest extends IntegrationTest {
public function testFindNotFoundWhenDeletedFolder() {
$this->loadFixtures('default');
+
$id = $this->whereTitleId('not found folder');
$this->itemMapper->find($id, $this->user);
}