Skip to content
Permalink
Browse files

Updating fixture test to fix issues caused by refactoring in CakeSchema.

  • Loading branch information...
markstory committed Oct 22, 2009
1 parent 3a85197 commit 6847d34d80a722bd6cef3a36b0e11c2612a9f8f9
Showing with 3 additions and 1 deletion.
  1. +2 −1 cake/console/libs/tasks/fixture.php
  2. +1 −0 cake/tests/cases/console/libs/tasks/fixture.test.php
@@ -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);
}
/**
@@ -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);

0 comments on commit 6847d34

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