Skip to content

Commit

Permalink
Applying patch from 'asavoy'. Changing schema shell so that schema fi…
Browse files Browse the repository at this point in the history
…les generated for plugins have the classname of PluginSchema instead of AppSchema. Tests updated. Fixes #922
  • Loading branch information
markstory committed Jul 24, 2010
1 parent a965056 commit b5d7f64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cake/console/libs/schema.php
Expand Up @@ -90,6 +90,9 @@ function startup() {
}
if (!empty($this->params['plugin'])) {
$plugin = $this->params['plugin'];
if (empty($name)) {
$name = $plugin;
}
}
$this->Schema =& new CakeSchema(compact('name', 'path', 'file', 'connection', 'plugin'));
}
Expand Down
1 change: 1 addition & 0 deletions cake/tests/cases/console/libs/schema.test.php
Expand Up @@ -368,6 +368,7 @@ function testGenerateWithPlugins() {
$file =& new File(TMP . 'tests' . DS . 'schema.php');
$contents = $file->read();

$this->assertPattern('/class TestPluginSchema/', $contents);
$this->assertPattern('/var \$posts/', $contents);
$this->assertPattern('/var \$auth_users/', $contents);
$this->assertPattern('/var \$authors/', $contents);
Expand Down

0 comments on commit b5d7f64

Please sign in to comment.