Skip to content

Commit d912aa4

Browse files
Merge branch '5.4' into 6.0
* 5.4: Update ComposerPlugin.php [Notifier] [OvhCloud] handle invalid receiver [Cache] fix collecting cache stats when nesting computations [VarDumper] Fix JS to expand / collapse [Tests] Remove `$this` occurrences in future static data providers
2 parents 1a3d588 + 5db17a4 commit d912aa4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Tests/ExpressionLanguageTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,19 @@ public function testParseThrowsInsteadOfNotice()
121121

122122
public function shortCircuitProviderEvaluate()
123123
{
124-
$object = $this->getMockBuilder(\stdClass::class)->setMethods(['foo'])->getMock();
125-
$object->expects($this->never())->method('foo');
124+
$object = new class(\Closure::fromCallable([static::class, 'fail'])) {
125+
private $fail;
126+
127+
public function __construct(callable $fail)
128+
{
129+
$this->fail = $fail;
130+
}
131+
132+
public function foo()
133+
{
134+
($this->fail)();
135+
}
136+
};
126137

127138
return [
128139
['false and object.foo()', ['object' => $object], false],

0 commit comments

Comments
 (0)