Skip to content

Commit

Permalink
Renaming setUp() to startTest() in Controller task. Fixes issues with…
Browse files Browse the repository at this point in the history
… fixtures and baked controller tests.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8142 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
markstory committed Apr 14, 2009
1 parent 9765223 commit fcb8ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/console/libs/tasks/controller.php
Expand Up @@ -465,11 +465,11 @@ function bakeTest($className) {
$out .= "\tvar \$autoRender = false;\n}\n\n";
$out .= "class {$className}ControllerTest extends CakeTestCase {\n";
$out .= "\tvar \${$className} = null;\n\n";
$out .= "\tfunction setUp() {\n\t\t\$this->{$className} = new Test{$className}();";
$out .= "\tfunction startTest() {\n\t\t\$this->{$className} = new Test{$className}();";
$out .= "\n\t\t\$this->{$className}->constructClasses();\n\t}\n\n";
$out .= "\tfunction test{$className}ControllerInstance() {\n";
$out .= "\t\t\$this->assertTrue(is_a(\$this->{$className}, '{$className}Controller'));\n\t}\n\n";
$out .= "\tfunction tearDown() {\n\t\tunset(\$this->{$className});\n\t}\n}\n";
$out .= "\tfunction endTest() {\n\t\tunset(\$this->{$className});\n\t}\n}\n";

$path = CONTROLLER_TESTS;
if (isset($this->plugin)) {
Expand Down

0 comments on commit fcb8ef2

Please sign in to comment.