diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index d367aad9016..e60d8e734b0 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -89,7 +89,7 @@ public function startup() { $name = $plugin; } } - $name = Inflector::classify($name); + $name = Inflector::camelize($name); $this->Schema = new CakeSchema(compact('name', 'path', 'file', 'connection', 'plugin')); } diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php index 6256e04c53b..793d8daf878 100644 --- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php @@ -617,19 +617,19 @@ public function testName() { $this->Shell->params = array( 'plugin' => 'TestPlugin', 'connection' => 'test', - 'name' => 'custom_name', + 'name' => 'custom_names', 'force' => false, 'overwrite' => true, ); $this->Shell->startup(); - if (file_exists($this->Shell->Schema->path . DS . 'custom_name.php')) { - unlink($this->Shell->Schema->path . DS . 'custom_name.php'); + if (file_exists($this->Shell->Schema->path . DS . 'custom_names.php')) { + unlink($this->Shell->Schema->path . DS . 'custom_names.php'); } $this->Shell->generate(); - $contents = file_get_contents($this->Shell->Schema->path . DS . 'custom_name.php'); - $this->assertRegExp('/class CustomNameSchema/', $contents); - unlink($this->Shell->Schema->path . DS . 'custom_name.php'); + $contents = file_get_contents($this->Shell->Schema->path . DS . 'custom_names.php'); + $this->assertRegExp('/class CustomNamesSchema/', $contents); + unlink($this->Shell->Schema->path . DS . 'custom_names.php'); CakePlugin::unload(); }