diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-12 23:26:59 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-12 23:26:59 +0200 |
commit | 937f025137cf511eba332260ea1ae876090b7d43 (patch) | |
tree | 1e35307731960700cddea26e0e4b0621ebb251c0 /tests/unit/db | |
parent | 2dd8827768379ef8a96611b7b702464da8fd7349 (diff) |
remove more unused code
Diffstat (limited to 'tests/unit/db')
-rw-r--r-- | tests/unit/db/MapperTest.php | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/tests/unit/db/MapperTest.php b/tests/unit/db/MapperTest.php index b25fc4fcc..52c8f205d 100644 --- a/tests/unit/db/MapperTest.php +++ b/tests/unit/db/MapperTest.php @@ -63,7 +63,7 @@ class MapperTest extends MapperTestUtility { $rows = array( array('hi') ); - $row = $this->setMapperResult($sql, $params, $rows); + $this->setMapperResult($sql, $params, $rows); $this->mapper->find($sql, $params); } @@ -73,7 +73,7 @@ class MapperTest extends MapperTestUtility { $rows = array( array('pre_name' => 'hi') ); - $row = $this->setMapperResult($sql, $params, $rows); + $this->setMapperResult($sql, $params, $rows); $this->mapper->findOneEntity($sql, $params); } @@ -81,7 +81,7 @@ class MapperTest extends MapperTestUtility { $sql = 'hi'; $params = array('jo'); $rows = array(); - $row = $this->setMapperResult($sql, $params, $rows); + $this->setMapperResult($sql, $params, $rows); $this->setExpectedException( '\OCA\News\Db\DoesNotExistException'); $this->mapper->find($sql, $params); @@ -91,7 +91,7 @@ class MapperTest extends MapperTestUtility { $sql = 'hi'; $params = array('jo'); $rows = array(); - $row = $this->setMapperResult($sql, $params, $rows); + $this->setMapperResult($sql, $params, $rows); $this->setExpectedException( '\OCA\News\Db\DoesNotExistException'); $this->mapper->findOneEntity($sql, $params); @@ -103,7 +103,7 @@ class MapperTest extends MapperTestUtility { $rows = array( array('jo'), array('ho') ); - $row = $this->setMapperResult($sql, $params, $rows); + $this->setMapperResult($sql, $params, $rows); $this->setExpectedException( '\OCA\News\Db\MultipleObjectsReturnedException'); $this->mapper->find($sql, $params); @@ -115,7 +115,7 @@ class MapperTest extends MapperTestUtility { $rows = array( array('jo'), array('ho') ); - $row = $this->setMapperResult($sql, $params, $rows); + $this->setMapperResult($sql, $params, $rows); $this->setExpectedException( '\OCA\News\Db\MultipleObjectsReturnedException'); $this->mapper->findOneEntity($sql, $params); @@ -196,12 +196,6 @@ class MapperTest extends MapperTestUtility { public function testUpdateNoId(){ - $sql = 'UPDATE `*PREFIX*table` ' . - 'SET ' . - '`pre_name` = ?,'. - '`email` = ? ' . - 'WHERE `id` = ?'; - $params = array('john', 'my@email'); $entity = new Example(); $entity->setPreName($params[0]); @@ -230,7 +224,7 @@ class MapperTest extends MapperTestUtility { $entity = new Example(); $entity->setPreName('hi'); $entity->resetUpdatedFields(); - $row = $this->setMapperResult($sql, array(), $rows); + $this->setMapperResult($sql, array(), $rows); $result = $this->mapper->findAllEntities($sql); $this->assertEquals(array($entity), $result); } @@ -238,7 +232,7 @@ class MapperTest extends MapperTestUtility { public function testFindEntitiesNotFound(){ $sql = 'hi'; $rows = array(); - $row = $this->setMapperResult($sql, array(), $rows); + $this->setMapperResult($sql, array(), $rows); $result = $this->mapper->findAllEntities($sql); $this->assertEquals(array(), $result); } @@ -254,7 +248,7 @@ class MapperTest extends MapperTestUtility { $entity2 = new Example(); $entity2->setEmail('ho'); $entity2->resetUpdatedFields(); - $row = $this->setMapperResult($sql, array(), $rows); + $this->setMapperResult($sql, array(), $rows); $result = $this->mapper->findAllEntities($sql); $this->assertEquals(array($entity1, $entity2), $result); } |