diff options
Diffstat (limited to 'tests/Integration/Db/ItemMapperTest.php')
-rw-r--r-- | tests/Integration/Db/ItemMapperTest.php | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/tests/Integration/Db/ItemMapperTest.php b/tests/Integration/Db/ItemMapperTest.php index e510aab96..026834e6b 100644 --- a/tests/Integration/Db/ItemMapperTest.php +++ b/tests/Integration/Db/ItemMapperTest.php @@ -18,7 +18,7 @@ use OCA\News\Tests\Integration\Fixtures\ItemFixture; class ItemMapperTest extends IntegrationTest { - public function testFind() + public function testFind() { $feed = new FeedFixture(); $feed = $this->feedMapper->insert($feed); @@ -38,7 +38,7 @@ class ItemMapperTest extends IntegrationTest * @param $title * @return mixed */ - private function whereTitleId($title) + private function whereTitleId($title) { return $this->findItemByTitle($title)->getId(); } @@ -46,8 +46,9 @@ class ItemMapperTest extends IntegrationTest /** * @expectedException OCP\AppFramework\Db\DoesNotExistException */ - public function testFindNotFoundWhenDeletedFeed() + public function testFindNotFoundWhenDeletedFeed() { + $this->expectException('OCP\AppFramework\Db\DoesNotExistException'); $this->loadFixtures('default'); $id = $this->whereTitleId('not found feed'); @@ -58,8 +59,9 @@ class ItemMapperTest extends IntegrationTest /** * @expectedException OCP\AppFramework\Db\DoesNotExistException */ - public function testFindNotFoundWhenDeletedFolder() + public function testFindNotFoundWhenDeletedFolder() { + $this->expectException('OCP\AppFramework\Db\DoesNotExistException'); $this->loadFixtures('default'); @@ -68,7 +70,7 @@ class ItemMapperTest extends IntegrationTest } - private function deleteReadOlderThanThreshold() + private function deleteReadOlderThanThreshold() { $this->loadFixtures('default'); @@ -84,8 +86,9 @@ class ItemMapperTest extends IntegrationTest /** * @expectedException OCP\AppFramework\Db\DoesNotExistException */ - public function testDeleteOlderThanThresholdOne() + public function testDeleteOlderThanThresholdOne() { + $this->expectException('OCP\AppFramework\Db\DoesNotExistException'); $this->loadFixtures('default'); $id = $this->whereTitleId('del1'); @@ -97,8 +100,9 @@ class ItemMapperTest extends IntegrationTest /** * @expectedException OCP\AppFramework\Db\DoesNotExistException */ - public function testDeleteOlderThanThresholdTwo() + public function testDeleteOlderThanThresholdTwo() { + $this->expectException('OCP\AppFramework\Db\DoesNotExistException'); $this->loadFixtures('default'); $id = $this->whereTitleId('del2'); @@ -108,7 +112,7 @@ class ItemMapperTest extends IntegrationTest } - public function testStarredCount() + public function testStarredCount() { $this->loadFixtures('default'); @@ -117,7 +121,7 @@ class ItemMapperTest extends IntegrationTest } - public function testReadAll() + public function testReadAll() { $this->loadFixtures('default'); @@ -146,7 +150,7 @@ class ItemMapperTest extends IntegrationTest } - public function testReadFolder() + public function testReadFolder() { $this->loadFixtures('default'); @@ -178,7 +182,7 @@ class ItemMapperTest extends IntegrationTest } - public function testReadFeed() + public function testReadFeed() { $this->loadFixtures('default'); @@ -209,7 +213,7 @@ class ItemMapperTest extends IntegrationTest } - public function testDeleteUser() + public function testDeleteUser() { $this->loadFixtures('default'); @@ -219,7 +223,7 @@ class ItemMapperTest extends IntegrationTest $this->assertEquals(0, $id); } - public function testGetNewestItemId() + public function testGetNewestItemId() { $this->loadFixtures('default'); @@ -229,7 +233,7 @@ class ItemMapperTest extends IntegrationTest $this->assertEquals($itemId, $id); } - public function testFindAllUnreadOrStarred() + public function testFindAllUnreadOrStarred() { $this->loadFixtures('default'); @@ -238,7 +242,7 @@ class ItemMapperTest extends IntegrationTest } - public function testReadItem() + public function testReadItem() { $this->loadFixtures('readitem'); // assert that all items are unread @@ -277,7 +281,7 @@ class ItemMapperTest extends IntegrationTest } } - public function testUnreadItem() + public function testUnreadItem() { $this->loadFixtures('readitem'); // unread an item |