mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing TestTask so that if you give an invalid class type you get an error.
This commit is contained in:
parent
918e961f7d
commit
5ea4f027db
1 changed files with 2 additions and 4 deletions
|
@ -95,14 +95,12 @@ class TestTask extends BakeTask {
|
|||
$this->out(sprintf(__("Path: %s", true), $this->path));
|
||||
$this->hr();
|
||||
|
||||
$type = null;
|
||||
if ($type) {
|
||||
$type = Inflector::camelize($type);
|
||||
if (!in_array($type, $this->classTypes)) {
|
||||
unset($type);
|
||||
$this->error(sprintf('Incorrect type provided. Please choose one of %s', implode(', ', $this->classTypes)));
|
||||
}
|
||||
}
|
||||
if (!$type) {
|
||||
} else {
|
||||
$type = $this->getObjectType();
|
||||
}
|
||||
$className = $this->getClassName($type);
|
||||
|
|
Loading…
Add table
Reference in a new issue