Permalink
Browse files

Fix failing tests caused by previous commit.

  • Loading branch information...
1 parent 58a2ee0 commit 6d6ac1083425ecc4e0efe4be6ce98d8cea6a2989 @markstory markstory committed Nov 21, 2011
@@ -279,7 +279,7 @@ public function getPath() {
*/
protected function _generateSchema($tableInfo) {
$schema = $this->_Schema->generateTable('f', $tableInfo);
- return substr($schema, 10, -2);
+ return substr($schema, 13, -2);
}
/**
@@ -353,12 +353,12 @@ public function testGenerateWithPlugins() {
$contents = $this->file->read();
$this->assertRegExp('/class TestPluginSchema/', $contents);
- $this->assertRegExp('/var \$posts/', $contents);
- $this->assertRegExp('/var \$auth_users/', $contents);
- $this->assertRegExp('/var \$authors/', $contents);
- $this->assertRegExp('/var \$test_plugin_comments/', $contents);
- $this->assertNotRegExp('/var \$users/', $contents);
- $this->assertNotRegExp('/var \$articles/', $contents);
+ $this->assertRegExp('/public \$posts/', $contents);
+ $this->assertRegExp('/public \$auth_users/', $contents);
+ $this->assertRegExp('/public \$authors/', $contents);
+ $this->assertRegExp('/public \$test_plugin_comments/', $contents);
+ $this->assertNotRegExp('/public \$users/', $contents);
+ $this->assertNotRegExp('/public \$articles/', $contents);
CakePlugin::unload();
}
@@ -21,6 +21,7 @@
App::uses('Shell', 'Console');
App::uses('ConsoleOutput', 'Console');
App::uses('ConsoleInput', 'Console');
+App::uses('ModelTask', 'Console/Command/Task');
App::uses('FixtureTask', 'Console/Command/Task');
App::uses('TemplateTask', 'Console/Command/Task');
App::uses('DbConfigTask', 'Console/Command/Task');
@@ -741,7 +741,7 @@ public function testGenerateTable() {
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => true)),
);
$result = $this->Schema->generateTable('posts', $posts);
- $this->assertRegExp('/var \$posts/', $result);
+ $this->assertRegExp('/public \$posts/', $result);
}
/**
* testSchemaWrite method

0 comments on commit 6d6ac10

Please sign in to comment.