Skip to content

Commit

Permalink
Fixing tests related to PluginTask
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Apr 21, 2011
1 parent cf73c1d commit a8c2dbf
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions lib/Cake/tests/Case/Console/Command/Task/PluginTaskTest.php
Expand Up @@ -67,11 +67,11 @@ public function testBakeFoldersAndFiles() {

$path = $this->Task->path . 'bake_test_plugin';

$file = $path . DS . 'bake_test_plugin_app_controller.php';
$file = $path . DS . 'Controller' . DS .'BakeTestPluginAppController.php';
$this->Task->expects($this->at(2))->method('createFile')
->with($file, new PHPUnit_Framework_Constraint_IsAnything());

$file = $path . DS . 'bake_test_plugin_app_model.php';
$file = $path . DS . 'Model' . DS . 'BakeTestPluginAppModel.php';
$this->Task->expects($this->at(3))->method('createFile')
->with($file, new PHPUnit_Framework_Constraint_IsAnything());

Expand All @@ -82,19 +82,16 @@ public function testBakeFoldersAndFiles() {

$directories = array(
'config' . DS . 'schema',
'models' . DS . 'behaviors',
'models' . DS . 'datasources',
'console' . DS . 'shells' . DS . 'tasks',
'controllers' . DS . 'components',
'libs',
'views' . DS . 'helpers',
'tests' . DS . 'cases' . DS . 'components',
'tests' . DS . 'cases' . DS . 'helpers',
'tests' . DS . 'cases' . DS . 'behaviors',
'tests' . DS . 'cases' . DS . 'controllers',
'tests' . DS . 'cases' . DS . 'models',
'tests' . DS . 'groups',
'tests' . DS . 'fixtures',
'Model' . DS . 'Behavior',
'Model' . DS . 'Datasource',
'Console' . DS . 'Command' . DS . 'Task',
'Controller' . DS . 'Component',
'Lib',
'View' . DS . 'Helper',
'tests' . DS . 'Case' . DS . 'Controller' . DS . 'Component',
'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper',
'tests' . DS . 'Case' . DS . 'Model' . DS . 'Behavior',
'tests' . DS . 'Fixture',
'vendors',
'webroot'
);
Expand All @@ -117,11 +114,11 @@ public function testExecuteWithNoArgs() {
$this->Task->expects($this->at(2))->method('in')->will($this->returnValue('y'));

$path = $this->Task->path . 'test_plugin';
$file = $path . DS . 'test_plugin_app_controller.php';
$file = $path . DS . 'Controller' . DS . 'TestPluginAppController.php';
$this->Task->expects($this->at(3))->method('createFile')
->with($file, new PHPUnit_Framework_Constraint_IsAnything());

$file = $path . DS . 'test_plugin_app_model.php';
$file = $path . DS . 'Model' . DS . 'TestPluginAppModel.php';
$this->Task->expects($this->at(4))->method('createFile')
->with($file, new PHPUnit_Framework_Constraint_IsAnything());

Expand All @@ -144,12 +141,12 @@ public function testExecuteWithOneArg() {
->will($this->returnValue('y'));

$path = $this->Task->path . 'bake_test_plugin';
$file = $path . DS . 'bake_test_plugin_app_controller.php';
$file = $path . DS . 'Controller' . DS . 'BakeTestPluginAppController.php';
$this->Task->expects($this->at(2))->method('createFile')
->with($file, new PHPUnit_Framework_Constraint_IsAnything());

$path = $this->Task->path . 'bake_test_plugin';
$file = $path . DS . 'bake_test_plugin_app_model.php';
$file = $path . DS . 'Model' . DS . 'BakeTestPluginAppModel.php';
$this->Task->expects($this->at(3))->method('createFile')
->with($file, new PHPUnit_Framework_Constraint_IsAnything());

Expand Down

0 comments on commit a8c2dbf

Please sign in to comment.