Skip to content

Commit

Permalink
Updating fixture test to fix issues caused by refactoring in CakeSchema.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 22, 2009
1 parent 3a85197 commit 6847d34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cake/console/libs/tasks/fixture.php
Expand Up @@ -256,7 +256,8 @@ function generateFixtureFile($model, $otherVars) {
* @return string fields definitions
**/
function _generateSchema($tableInfo) {
return $this->_Schema->generateTable('table', $tableInfo);
$schema = $this->_Schema->generateTable('f', $tableInfo);
return substr($schema, 10, -2);
}

/**
Expand Down
1 change: 1 addition & 0 deletions cake/tests/cases/console/libs/tasks/fixture.test.php
Expand Up @@ -222,6 +222,7 @@ function testBake() {
$this->assertPattern('/class ArticleFixture extends CakeTestFixture/', $result);
$this->assertPattern('/var \$name \= \'Article\';/', $result);
$this->assertPattern('/var \$table \= \'comments\';/', $result);
$this->assertPattern('/var \$fields = array\(/', $result);

$result = $this->Task->bake('Article', 'comments', array('records' => true));
$this->assertPattern("/var \\\$import \= array\('records' \=\> true\);/", $result);
Expand Down

0 comments on commit 6847d34

Please sign in to comment.