fixing some errors in schema and test shell

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7657 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-09-24 13:49:37 +00:00
parent 3f8c959ab3
commit 7266f86d14
2 changed files with 25 additions and 21 deletions

View file

@ -248,7 +248,7 @@ class SchemaShell extends Shell {
$options = array('name' => $name);
if (isset($this->params['s'])) {
$fileName = substr($name, 0, strpos($this->Schema->file, '.php'));
$fileName = rtrim($this->Schema->file, '.php');
$options['file'] = $fileName . '_' . $this->params['s'] . '.php';
}

View file

@ -109,8 +109,6 @@ class TestTask extends Shell {
}
if ($class) {
$this->path .= 'cases' . DS . Inflector::tableize($class) . DS;
$name = $this->in(__("Enter the name for the test or (q)uit", true), null, 'q');
if ($name !== 'q') {
$case = null;
@ -146,7 +144,13 @@ class TestTask extends Shell {
$cases = array($cases);
}
$name = Inflector::camelize($name);
if (strpos($this->path, $class) === false) {
$this->path .= 'cases' . DS . Inflector::tableize($class) . DS;
}
$class = Inflector::classify($class);
$name = Inflector::classify($name);
$import = $name;
if (isset($this->plugin)) {
$import = $this->plugin . '.' . $name;