diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-12 23:16:08 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-12 23:16:08 +0200 |
commit | 874c469e0241962e15927de5aba758a7206849ba (patch) | |
tree | 219febba5e72e13e2a4f789cf59fd057b7368c28 /tests/unit/db | |
parent | 541318cb81710ef080b30cc790681ace773c11ac (diff) |
remove more dead code
Diffstat (limited to 'tests/unit/db')
-rw-r--r-- | tests/unit/db/EntityTest.php | 1 | ||||
-rw-r--r-- | tests/unit/db/FeedMapperTest.php | 11 | ||||
-rw-r--r-- | tests/unit/db/FolderMapperTest.php | 6 | ||||
-rw-r--r-- | tests/unit/db/ItemMapperTest.php | 2 |
4 files changed, 9 insertions, 11 deletions
diff --git a/tests/unit/db/EntityTest.php b/tests/unit/db/EntityTest.php index 8356e0336..9d41d6e82 100644 --- a/tests/unit/db/EntityTest.php +++ b/tests/unit/db/EntityTest.php @@ -88,7 +88,6 @@ class EntityTest extends \PHPUnit_Framework_TestCase { public function testSetterMarksFieldUpdated(){ - $id = 3; $this->entity->setId(3); $this->assertContains('id', $this->entity->getUpdatedFields()); diff --git a/tests/unit/db/FeedMapperTest.php b/tests/unit/db/FeedMapperTest.php index 35433bf31..5c2921063 100644 --- a/tests/unit/db/FeedMapperTest.php +++ b/tests/unit/db/FeedMapperTest.php @@ -84,7 +84,7 @@ class FeedMapperTest extends \OCA\News\Utility\MapperTestUtility { $this->setMapperResult($sql, $params); $this->setExpectedException('\OCA\News\Db\DoesNotExistException'); - $result = $this->mapper->find($id, $userId); + $this->mapper->find($id, $userId); } @@ -111,12 +111,11 @@ class FeedMapperTest extends \OCA\News\Utility\MapperTestUtility { $this->setMapperResult($sql, $params, $rows); $this->setExpectedException('\OCA\News\Db\MultipleObjectsReturnedException'); - $result = $this->mapper->find($id, $userId); + $this->mapper->find($id, $userId); } public function testFindAll(){ - $userId = 'john'; $rows = array( array('id' => $this->feeds[0]->getId()), array('id' => $this->feeds[1]->getId()) @@ -227,7 +226,7 @@ class FeedMapperTest extends \OCA\News\Utility\MapperTestUtility { array($urlHash, $this->user)); $this->setExpectedException('\OCA\News\Db\DoesNotExistException'); - $result = $this->mapper->findByUrlHash($urlHash, $this->user); + $this->mapper->findByUrlHash($urlHash, $this->user); } @@ -253,7 +252,7 @@ class FeedMapperTest extends \OCA\News\Utility\MapperTestUtility { array($urlHash, $this->user), $rows); $this->setExpectedException('\OCA\News\Db\MultipleObjectsReturnedException'); - $result = $this->mapper->findByUrlHash($urlHash, $this->user); + $this->mapper->findByUrlHash($urlHash, $this->user); } @@ -318,7 +317,7 @@ class FeedMapperTest extends \OCA\News\Utility\MapperTestUtility { array('id' => $this->feeds[0]->getId()), array('id' => $this->feeds[1]->getId()) ); - $deleteOlderThan = 110; + $sql = 'SELECT * FROM `*PREFIX*news_feeds` ' . 'WHERE `deleted_at` > 0 ' . 'AND `user_id` = ?'; diff --git a/tests/unit/db/FolderMapperTest.php b/tests/unit/db/FolderMapperTest.php index 5389800aa..c979f8ce0 100644 --- a/tests/unit/db/FolderMapperTest.php +++ b/tests/unit/db/FolderMapperTest.php @@ -67,7 +67,7 @@ class FolderMapperTest extends \OCA\News\Utility\MapperTestUtility { $this->setMapperResult($sql, array($id, $userId)); $this->setExpectedException('\OCA\News\Db\DoesNotExistException'); - $result = $this->folderMapper->find($id, $userId); + $this->folderMapper->find($id, $userId); } @@ -85,7 +85,7 @@ class FolderMapperTest extends \OCA\News\Utility\MapperTestUtility { $this->setMapperResult($sql, array($id, $userId), $rows); $this->setExpectedException('\OCA\News\Db\MultipleObjectsReturnedException'); - $result = $this->folderMapper->find($id, $userId); + $this->folderMapper->find($id, $userId); } @@ -185,7 +185,7 @@ class FolderMapperTest extends \OCA\News\Utility\MapperTestUtility { array('id' => $this->folders[0]->getId()), array('id' => $this->folders[1]->getId()) ); - $deleteOlderThan = 110; + $sql = 'SELECT * FROM `*PREFIX*news_folders` ' . 'WHERE `deleted_at` > 0 ' . 'AND `user_id` = ?'; diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php index bddf8cd28..d9d6bf02c 100644 --- a/tests/unit/db/ItemMapperTest.php +++ b/tests/unit/db/ItemMapperTest.php @@ -389,7 +389,7 @@ class ItemMapperTest extends \OCA\News\Utility\MapperTestUtility { $this->setMapperResult($sql, $params, $rows); $this->setExpectedException('\OCA\News\Db\DoesNotExistException'); - $result = $this->mapper->getNewestItemId($this->user); + $this->mapper->getNewestItemId($this->user); } |