mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Fixing syntax error for baked component test case. Updated relevant
test case. Fixes #342. Signed-off-by: Joël Perras <joel.perras@gmail.com>
This commit is contained in:
parent
a479f32da5
commit
2e8e233f73
2 changed files with 3 additions and 3 deletions
|
@ -421,7 +421,7 @@ class TestTask extends Shell {
|
||||||
$className = substr($fullClassName, 0, strlen($fullClassName) - 10);
|
$className = substr($fullClassName, 0, strlen($fullClassName) - 10);
|
||||||
return "new Test$fullClassName();\n\t\t\$this->{$className}->constructClasses();\n";
|
return "new Test$fullClassName();\n\t\t\$this->{$className}->constructClasses();\n";
|
||||||
}
|
}
|
||||||
return "new $fullClassName()\n";
|
return "new $fullClassName();\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -520,7 +520,7 @@ class TestTaskTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function testGenerateContsructor() {
|
function testGenerateConstructor() {
|
||||||
$result = $this->Task->generateConstructor('controller', 'PostsController');
|
$result = $this->Task->generateConstructor('controller', 'PostsController');
|
||||||
$expected = "new TestPostsController();\n\t\t\$this->Posts->constructClasses();\n";
|
$expected = "new TestPostsController();\n\t\t\$this->Posts->constructClasses();\n";
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
@ -530,7 +530,7 @@ class TestTaskTest extends CakeTestCase {
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
$result = $this->Task->generateConstructor('helper', 'FormHelper');
|
$result = $this->Task->generateConstructor('helper', 'FormHelper');
|
||||||
$expected = "new FormHelper()\n";
|
$expected = "new FormHelper();\n";
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue