Skip to content

Commit

Permalink
Adding a few tests for DboSource::fullTableName();
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 9, 2010
1 parent a88b8dd commit 2f527cc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cake/tests/cases/libs/model/datasources/dbo_source.test.php
Expand Up @@ -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.