summaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework/db/MapperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/appframework/db/MapperTest.php')
-rw-r--r--tests/lib/appframework/db/MapperTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/lib/appframework/db/MapperTest.php b/tests/lib/appframework/db/MapperTest.php
index e21edbd05cf..4ddc4ef0422 100644
--- a/tests/lib/appframework/db/MapperTest.php
+++ b/tests/lib/appframework/db/MapperTest.php
@@ -217,6 +217,20 @@ class MapperTest extends MapperTestUtility {
}
+ public function testUpdateNothingChangedNoQuery(){
+ $params = array('john', 'my@email');
+ $entity = new Example();
+ $entity->setId(3);
+ $entity->setEmail($params[1]);
+ $entity->resetUpdatedFields();
+
+ $this->db->expects($this->never())
+ ->method('prepareQuery');
+
+ $this->mapper->update($entity);
+ }
+
+
public function testMapRowToEntity(){
$entity1 = $this->mapper->mapRow(array('pre_name' => 'test1', 'email' => 'test2'));
$entity2 = new Example();