diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/db/EntityTest.php | 24 |
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(); |