diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-19 21:24:33 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-19 21:24:33 +0100 |
commit | d96e7946734c88683920d00a28fd901c7a18be66 (patch) | |
tree | 6e32b9c54370aceb1a02c111a4e622743e97254a /tests/db/EntityTest.php | |
parent | 50e00916ce1d4536acc2268161135a588fb0c12f (diff) |
added getter and setter automation and added translation for database fields
Diffstat (limited to 'tests/db/EntityTest.php')
-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(); |