Skip to content

Commit

Permalink
Fix path to Config/routes.php and update tests.
Browse files Browse the repository at this point in the history
Refs #3964
  • Loading branch information
markstory committed Jul 14, 2014
1 parent c673b81 commit 0254eb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Console/Command/Task/PluginTask.php
Expand Up @@ -188,7 +188,7 @@ protected function _generateRoutes($plugin, $path) {
]);
$this->out( __d('cake_console', 'Generating routes.php file...'));
$out = $this->Template->generate('config', 'routes');
$file = $path . $plugin . DS . 'Config' . DS . 'routes.php';
$file = $path . $plugin . DS . 'src' . DS . 'Config' . DS . 'routes.php';
$this->createFile($file, $out);
}

Expand Down
5 changes: 2 additions & 3 deletions tests/TestCase/Console/Command/Task/PluginTaskTest.php
Expand Up @@ -85,13 +85,12 @@ public function testBakeFoldersAndFiles() {
$this->assertTrue(is_dir($path), 'No plugin dir');

$directories = array(
'src/Config/Schema',
'src/Config',
'src/Model/Behavior',
'src/Model/Table',
'src/Model/Entity',
'src/Console/Command/Task',
'src/Controller/Component',
'src/Lib',
'src/View/Helper',
'tests/TestCase/Controller/Component',
'tests/TestCase/View/Helper',
Expand Down Expand Up @@ -144,7 +143,7 @@ public function testExecuteWithOneArg() {
$this->Task->expects($this->at(1))->method('createFile')
->with($file, $this->stringContains('class AppController extends BaseController {'));

$file = $path . DS . 'Config' . DS . 'routes.php';
$file = $path . DS . 'src' . DS . 'Config' . DS . 'routes.php';
$this->Task->expects($this->at(2))->method('createFile')
->with($file, $this->stringContains("Router::plugin('BakeTestPlugin', function(\$routes)"));

Expand Down

0 comments on commit 0254eb3

Please sign in to comment.