Skip to content

Commit

Permalink
Fix missing behavior constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 28, 2012
1 parent fb7717c commit 752711e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Cake/Console/Command/Task/TestTask.php
Expand Up @@ -444,6 +444,9 @@ public function generateConstructor($type, $fullClassName) {
if ($type == 'model') {
$construct = "ClassRegistry::init('$fullClassName');\n";
}
if ($type == 'behavior') {
$construct = "new $fullClassName();\n";
}
if ($type == 'controller') {
$className = substr($fullClassName, 0, strlen($fullClassName) - 10);
$construct = "new Test$fullClassName();\n";
Expand Down

0 comments on commit 752711e

Please sign in to comment.