From a5fabcc1dc10e95e1cc92a5805a276ae5ac0f28a Mon Sep 17 00:00:00 2001 From: AD7six Date: Wed, 6 Jun 2012 21:04:02 +0200 Subject: [PATCH] No startup and teardown for controller tests and.. no startup/teardown functions unless they are actually going to do more than just call parent --- lib/Cake/Console/Command/Task/TestTask.php | 5 ----- lib/Cake/Console/Templates/default/classes/test.ctp | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Cake/Console/Command/Task/TestTask.php b/lib/Cake/Console/Command/Task/TestTask.php index 74b178a9e92..20d7e7b9bec 100644 --- a/lib/Cake/Console/Command/Task/TestTask.php +++ b/lib/Cake/Console/Command/Task/TestTask.php @@ -459,11 +459,6 @@ public function generateConstructor($type, $fullClassName, $plugin) { if ($type == 'behavior') { $construct = "new $fullClassName();\n"; } - if ($type == 'controller') { - $className = substr($fullClassName, 0, -10); - $construct = "new $fullClassName();\n"; - $post = "\$this->{$className}->constructClasses();\n"; - } if ($type == 'helper') { $pre = "\$View = new View();\n"; $construct = "new {$fullClassName}(\$View);\n"; diff --git a/lib/Cake/Console/Templates/default/classes/test.ctp b/lib/Cake/Console/Templates/default/classes/test.ctp index 5bf1fc502be..2eb2b6c5299 100644 --- a/lib/Cake/Console/Templates/default/classes/test.ctp +++ b/lib/Cake/Console/Templates/default/classes/test.ctp @@ -44,6 +44,7 @@ class Test extends CakeTestCase { ); + /** * setUp method * @@ -67,6 +68,7 @@ class Test extends CakeTestCase { parent::tearDown(); } + /** * test method