diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bl/FeedBlTest.php | 1 | ||||
-rw-r--r-- | tests/db/ItemMapperTest.php | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/bl/FeedBlTest.php b/tests/bl/FeedBlTest.php index 2ec3d3e47..b43060112 100644 --- a/tests/bl/FeedBlTest.php +++ b/tests/bl/FeedBlTest.php @@ -197,6 +197,7 @@ class FeedBlTest extends \OCA\AppFramework\Utility\TestUtility { $this->itemMapper->expects($this->once()) ->method('findByGuidHash') ->with($this->equalTo($item->getGuidHash()), + $this->equalTo($feed->getId()), $this->equalTo($this->user)) ->will($this->returnValue($item)); $this->itemMapper->expects($this->once()) diff --git a/tests/db/ItemMapperTest.php b/tests/db/ItemMapperTest.php index 7c1cb743e..f528e31c3 100644 --- a/tests/db/ItemMapperTest.php +++ b/tests/db/ItemMapperTest.php @@ -249,11 +249,14 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { public function testFindByGuidHash(){ $hash = md5('test'); - $sql = $this->makeSelectQuery('AND `*PREFIX*news_items`.`guid_hash` = ? '); + $feedId = 3; + $sql = $this->makeSelectQuery( + 'AND `items`.`guid_hash` = ? ' . + 'AND `feed`.`id = ? '); - $this->setMapperResult($sql, array($this->userId, $hash), $this->row); + $this->setMapperResult($sql, array($this->userId, $hash, $feedId), $this->row); - $result = $this->mapper->findByGuidHash($hash, $this->userId); + $result = $this->mapper->findByGuidHash($hash, $feedId, $this->userId); $this->assertEquals($this->items[0], $result); } |