Skip to content

Commit

Permalink
Merge branch '4.4'
Browse files Browse the repository at this point in the history
* 4.4:
  Use willReturn() instead of will(returnValue()).
  • Loading branch information
nicolas-grekas committed May 30, 2019
2 parents 7a0940f + 36c4f00 commit fa57928
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/DelegatingEngineTest.php
Expand Up @@ -26,7 +26,7 @@ public function testRenderDelegatesToSupportedEngine()
$secondEngine->expects($this->once())
->method('render')
->with('template.php', ['foo' => 'bar'])
->will($this->returnValue('<html />'));
->willReturn('<html />');

$delegatingEngine = new DelegatingEngine([$firstEngine, $secondEngine]);
$result = $delegatingEngine->render('template.php', ['foo' => 'bar']);
Expand All @@ -53,7 +53,7 @@ public function testStreamDelegatesToSupportedEngine()
$streamingEngine->expects($this->once())
->method('stream')
->with('template.php', ['foo' => 'bar'])
->will($this->returnValue('<html />'));
->willReturn('<html />');

$delegatingEngine = new DelegatingEngine([$streamingEngine]);
$result = $delegatingEngine->stream('template.php', ['foo' => 'bar']);
Expand All @@ -77,7 +77,7 @@ public function testExists()
$engine->expects($this->once())
->method('exists')
->with('template.php')
->will($this->returnValue(true));
->willReturn(true);

$delegatingEngine = new DelegatingEngine([$engine]);

Expand Down Expand Up @@ -132,7 +132,7 @@ private function getEngineMock($template, $supports)
$engine->expects($this->once())
->method('supports')
->with($template)
->will($this->returnValue($supports));
->willReturn($supports);

return $engine;
}
Expand All @@ -144,7 +144,7 @@ private function getStreamingEngineMock($template, $supports)
$engine->expects($this->once())
->method('supports')
->with($template)
->will($this->returnValue($supports));
->willReturn($supports);

return $engine;
}
Expand Down

0 comments on commit fa57928

Please sign in to comment.