mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Add visibility keyword for 'helpers' property in controller template.
This commit is contained in:
parent
87a8af420f
commit
87a3937def
2 changed files with 3 additions and 3 deletions
|
@ -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]) . "', ";
|
||||
|
|
|
@ -274,8 +274,8 @@ class ControllerTaskTest extends CakeTestCase {
|
|||
$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);
|
||||
|
|
Loading…
Add table
Reference in a new issue