Skip to content

Commit

Permalink
Add visibility keyword for 'helpers' property in controller template.
Browse files Browse the repository at this point in the history
  • Loading branch information
majna committed Nov 30, 2011
1 parent 87a8af4 commit 87a3937
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Templates/default/classes/controller.ctp
Expand Up @@ -50,7 +50,7 @@ class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>App
<?php
if (count($helpers)):
echo "/**\n * Helpers\n *\n * @var array\n */\n";
echo "\tvar \$helpers = array(";
echo "\tpublic \$helpers = array(";
for ($i = 0, $len = count($helpers); $i < $len; $i++):
if ($i != $len - 1):
echo "'" . Inflector::camelize($helpers[$i]) . "', ";
Expand Down
Expand Up @@ -274,8 +274,8 @@ public function testBake() {
$this->assertContains(' * @property AclComponent $Acl', $result);
$this->assertContains(' * @property AuthComponent $Auth', $result);
$this->assertContains('class ArticlesController extends AppController', $result);
$this->assertContains("\$components = array('Acl', 'Auth')", $result);
$this->assertContains("\$helpers = array('Ajax', 'Time')", $result);
$this->assertContains("public \$components = array('Acl', 'Auth')", $result);
$this->assertContains("public \$helpers = array('Ajax', 'Time')", $result);
$this->assertContains("--actions--", $result);

$result = $this->Task->bake('Articles', 'scaffold', $helpers, $components);
Expand Down

0 comments on commit 87a3937

Please sign in to comment.