Skip to content

Commit 5db17a4

Browse files
[Tests] Remove $this occurrences in future static data providers
1 parent f6c909a commit 5db17a4

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)