summaryrefslogtreecommitdiffstats
path: root/tests/db/EntityTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/db/EntityTest.php')
-rw-r--r--tests/db/EntityTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/db/EntityTest.php b/tests/db/EntityTest.php
index 3e778d4fe..44f288a04 100644
--- a/tests/db/EntityTest.php
+++ b/tests/db/EntityTest.php
@@ -64,6 +64,30 @@ class EntityTest extends \PHPUnit_Framework_TestCase {
}
+ public function testColumnToPropertyNoReplacement(){
+ $column = 'my';
+ $entity = new TestEntity();
+ $this->assertEquals('my',
+ $entity->columnToProperty($column));
+ }
+
+
+ public function testColumnToProperty(){
+ $column = 'my_attribute';
+ $entity = new TestEntity();
+ $this->assertEquals('myAttribute',
+ $entity->columnToProperty($column));
+ }
+
+
+ public function testPropertyToColumnNoReplacement(){
+ $property = 'my';
+ $entity = new TestEntity();
+ $this->assertEquals('my',
+ $entity->propertyToColumn($property));
+ }
+
+
public function testSetterMarksFieldUpdated(){
$id = 3;
$entity = new TestEntity();