mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
3f8c959ab3
commit
7266f86d14
2 changed files with 25 additions and 21 deletions
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue