Skip to content
Permalink
Browse files

Adding a few tests for DboSource::fullTableName();

  • Loading branch information...
markstory committed Jun 9, 2010
1 parent a88b8dd commit 2f527cc5af6ef91a677d5255dfeb315dd726d688
Showing with 15 additions and 0 deletions.
  1. +15 −0 cake/tests/cases/libs/model/datasources/dbo_source.test.php
@@ -4426,4 +4426,19 @@ function testVirtualFieldsInGroup() {
$expected = " GROUP BY (YEAR(`Article`.`created`))";
$this->assertEqual($expected, $result);
}
/**
* test the permutations of fullTableName()
*
* @return void
*/
function testFullTablePermutations() {
$Article =& ClassRegistry::init('Article');
$result = $this->testDb->fullTableName($Article, false);
$this->assertEqual($result, 'articles');
$Article->tablePrefix = 'tbl_';
$result = $this->testDb->fullTableName($Article, false);
$this->assertEqual($result, 'tbl_articles');
}
}

0 comments on commit 2f527cc

Please sign in to comment.
You can’t perform that action at this time.