diff --git a/src/Shell/Task/ControllerTask.php b/src/Shell/Task/ControllerTask.php index a205952ee..e67593e6f 100644 --- a/src/Shell/Task/ControllerTask.php +++ b/src/Shell/Task/ControllerTask.php @@ -209,10 +209,6 @@ public function bakeTest($className) } $this->Test->plugin = $this->plugin; $this->Test->connection = $this->connection; - $prefix = $this->_getPrefix(); - if ($prefix) { - $className = str_replace('/', '\\', $prefix) . '\\' . $className; - } return $this->Test->bake('Controller', $className); } diff --git a/tests/TestCase/Shell/Task/ControllerTaskTest.php b/tests/TestCase/Shell/Task/ControllerTaskTest.php index e69448fff..624269cc6 100644 --- a/tests/TestCase/Shell/Task/ControllerTaskTest.php +++ b/tests/TestCase/Shell/Task/ControllerTaskTest.php @@ -245,7 +245,7 @@ public function testBakePrefixed() $this->Task->Test->expects($this->at(0)) ->method('bake') - ->with('Controller', 'Admin\BakeArticles'); + ->with('Controller', 'BakeArticles'); $result = $this->Task->bake('BakeArticles'); $this->assertTextContains('namespace App\Controller\Admin;', $result); @@ -268,7 +268,7 @@ public function testBakePrefixNested() $this->Task->Test->expects($this->at(0)) ->method('bake') - ->with('Controller', 'Admin\Management\BakeArticles'); + ->with('Controller', 'BakeArticles'); $result = $this->Task->bake('BakeArticles'); $this->assertTextContains('namespace App\Controller\Admin\Management;', $result);