Skip to content

Commit

Permalink
Replacing direct construction with method calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 13, 2011
1 parent f65d763 commit 3c611ee
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php
Expand Up @@ -386,7 +386,7 @@ public function testBakeWithPlugin() {
CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS));
$path = APP . 'Plugin' . DS . 'TestTest' . DS . 'View' . DS . 'ViewTaskComments' . DS . 'view.ctp';
$this->Task->expects($this->once())->method('createFile')
->with($path, new PHPUnit_Framework_Constraint_IsAnything());
->with($path, $this->anything());

$this->Task->bake('view', true);
CakePlugin::unload();
Expand Down Expand Up @@ -434,7 +434,7 @@ public function testCustomAction() {
$this->Task->expects($this->once())->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'my_action.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);

$this->Task->customAction();
Expand All @@ -454,12 +454,12 @@ public function testExecuteIntoAll() {
$this->Task->expects($this->at(0))->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'index.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
$this->Task->expects($this->at(1))->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'add.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
$this->Task->expects($this->exactly(2))->method('createFile');

Expand All @@ -480,7 +480,7 @@ public function testExecuteIntoAllWithActionName() {
$this->Task->expects($this->once())->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'index.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);

$this->Task->execute();
Expand All @@ -498,7 +498,7 @@ public function testExecuteWithActionParam() {
$this->Task->expects($this->once())->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'view.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
$this->Task->execute();
}
Expand All @@ -515,12 +515,12 @@ public function testExecuteWithController() {
$this->Task->expects($this->at(0))->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'index.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
$this->Task->expects($this->at(1))->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'add.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
$this->Task->expects($this->exactly(2))->method('createFile');

Expand Down Expand Up @@ -548,12 +548,12 @@ public function testExecuteWithControllerVariations($name) {
$this->Task->expects($this->at(0))->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'index.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
$this->Task->expects($this->at(1))->method('createFile')
->with(
TMP . 'ViewTaskComments' . DS . 'add.ctp',
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
$this->Task->execute();
}
Expand All @@ -579,7 +579,7 @@ public function testExecuteWithControllerAndAdminFlag() {
$this->Task->expects($this->at($i))->method('createFile')
->with(
TMP . 'ViewTaskArticles' . DS . $view,
new PHPUnit_Framework_Constraint_IsAnything()
$this->anything()
);
}
$this->Task->execute();
Expand Down

0 comments on commit 3c611ee

Please sign in to comment.