diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-20 12:03:02 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-20 12:03:02 +0100 |
commit | 5a32f7a95687f7599c4c36f23a9807cf52a312d6 (patch) | |
tree | 11829359624e471f090bb8ad75b20978c3883532 /tests/db | |
parent | d18ab3212a4e6f0101722e842c515895408d9c18 (diff) |
added tablename for entites
Diffstat (limited to 'tests/db')
-rw-r--r-- | tests/db/EntityTest.php | 9 | ||||
-rw-r--r-- | tests/db/ItemTest.php | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/db/EntityTest.php b/tests/db/EntityTest.php index 3ad5c8d1e..e7e44e332 100644 --- a/tests/db/EntityTest.php +++ b/tests/db/EntityTest.php @@ -31,6 +31,10 @@ require_once(__DIR__ . "/../classloader.php"); class TestEntity extends Entity { public $name; public $email; + + public function __construct(){ + parent::__construct('entity'); + } }; @@ -123,4 +127,9 @@ class EntityTest extends \PHPUnit_Framework_TestCase { $this->assertEquals($entity2, $this->entity); } + + public function testEntityShouldSetTableName(){ + $this->assertEquals('*dbprefix*entity', $this->entity->getTableName()); + } + }
\ No newline at end of file diff --git a/tests/db/ItemTest.php b/tests/db/ItemTest.php index 792085733..872b464c3 100644 --- a/tests/db/ItemTest.php +++ b/tests/db/ItemTest.php @@ -65,4 +65,9 @@ class ItemTest extends \PHPUnit_Framework_TestCase { $this->assertTrue($this->item->isUnstarred()); } + + public function testTableName(){ + $this->assertEquals('*dbprefix*news_items', $this->item->getTableName()); + } + }
\ No newline at end of file |