Skip to content
Permalink
Browse files

Replacing direct construction with method calls.

  • Loading branch information...
markstory committed Oct 13, 2011
1 parent f65d763 commit 3c611eef90180628f1740f6f77607e657d018bad
Showing with 11 additions and 11 deletions.
  1. +11 −11 lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php
@@ -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();
@@ -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();
@@ -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');
@@ -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();
@@ -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();
}
@@ -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');
@@ -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();
}
@@ -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();

0 comments on commit 3c611ee

Please sign in to comment.
You can’t perform that action at this time.