The method expects() does not exist on Jalle19\StatusManager\Database\UserQuery. Since you implemented __call, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
23
$mock->/** @scrutinizer ignore-call */
24
expects($this->exactly(4))
Loading history...
24
->method('filterByName');
25
26
$ignoredUsers = [
27
'foo',
28
'bar',
29
'baz',
30
];
31
32
$mock->filterIgnoredUsers($ignoredUsers);
33
}
34
35
36
/**
37
* When no ignored users are specified, only the DVR user should be added
The expression return $this->getMockBui...terByName'))->getMock() returns the type PHPUnit\Framework\MockObject\MockObject which is incompatible with the documented return type Jalle19\StatusManager\Da...k_MockObject_MockObject.
The function PHPUnit\Framework\MockOb...ckBuilder::setMethods() has been deprecated: https://github.com/sebastianbergmann/phpunit/pull/3687
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation