Skip to content

Commit b050cca

Browse files
committed
Use willReturn() instead of will(returnValue()).
1 parent 74631d4 commit b050cca

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Tests/ExpressionLanguageTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ public function testCachedParse()
3636
$cacheItemMock
3737
->expects($this->exactly(2))
3838
->method('get')
39-
->will($this->returnCallback(function () use (&$savedParsedExpression) {
39+
->willReturnCallback(function () use (&$savedParsedExpression) {
4040
return $savedParsedExpression;
41-
}))
41+
})
4242
;
4343

4444
$cacheItemMock
4545
->expects($this->exactly(1))
4646
->method('set')
4747
->with($this->isInstanceOf(ParsedExpression::class))
48-
->will($this->returnCallback(function ($parsedExpression) use (&$savedParsedExpression) {
48+
->willReturnCallback(function ($parsedExpression) use (&$savedParsedExpression) {
4949
$savedParsedExpression = $parsedExpression;
50-
}))
50+
})
5151
;
5252

5353
$cacheMock
@@ -85,9 +85,9 @@ public function testCachedParseWithDeprecatedParserCacheInterface()
8585
->expects($this->exactly(1))
8686
->method('save')
8787
->with('1%20%2B%201%2F%2F', $this->isInstanceOf(ParsedExpression::class))
88-
->will($this->returnCallback(function ($key, $expression) use (&$savedParsedExpression) {
88+
->willReturnCallback(function ($key, $expression) use (&$savedParsedExpression) {
8989
$savedParsedExpression = $expression;
90-
}))
90+
})
9191
;
9292

9393
$parsedExpression = $expressionLanguage->parse('1 + 1', []);
@@ -213,18 +213,18 @@ public function testCachingWithDifferentNamesOrder()
213213
$cacheItemMock
214214
->expects($this->exactly(2))
215215
->method('get')
216-
->will($this->returnCallback(function () use (&$savedParsedExpression) {
216+
->willReturnCallback(function () use (&$savedParsedExpression) {
217217
return $savedParsedExpression;
218-
}))
218+
})
219219
;
220220

221221
$cacheItemMock
222222
->expects($this->exactly(1))
223223
->method('set')
224224
->with($this->isInstanceOf(ParsedExpression::class))
225-
->will($this->returnCallback(function ($parsedExpression) use (&$savedParsedExpression) {
225+
->willReturnCallback(function ($parsedExpression) use (&$savedParsedExpression) {
226226
$savedParsedExpression = $parsedExpression;
227-
}))
227+
})
228228
;
229229

230230
$cacheMock

0 commit comments

Comments
 (0)