mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Applying patch from 'asavoy'. Changing schema shell so that schema files generated for plugins have the classname of PluginSchema instead of AppSchema. Tests updated. Fixes #922
This commit is contained in:
parent
a965056af7
commit
b5d7f6447f
2 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,9 @@ class SchemaShell extends Shell {
|
|||
}
|
||||
if (!empty($this->params['plugin'])) {
|
||||
$plugin = $this->params['plugin'];
|
||||
if (empty($name)) {
|
||||
$name = $plugin;
|
||||
}
|
||||
}
|
||||
$this->Schema =& new CakeSchema(compact('name', 'path', 'file', 'connection', 'plugin'));
|
||||
}
|
||||
|
|
|
@ -368,6 +368,7 @@ class SchemaShellTest extends CakeTestCase {
|
|||
$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);
|
||||
|
|
Loading…
Reference in a new issue