1 | <?php |
||
20 | class FilterTest extends \Mockery\Adapter\Phpunit\MockeryTestCase |
||
21 | { |
||
22 | const FQCN = 'SomeFilterClass'; |
||
23 | |||
24 | /** @var ClassFactory|m\Mock */ |
||
25 | protected $classFactoryMock; |
||
26 | |||
27 | /** @var FilterChain|m\Mock */ |
||
28 | protected $filterChainMock; |
||
29 | |||
30 | /** @var Filter $fixture */ |
||
31 | protected $fixture; |
||
32 | |||
33 | /** |
||
34 | * Creates a new (empty) fixture object. |
||
35 | */ |
||
36 | protected function setUp() |
||
42 | |||
43 | /** |
||
44 | * @covers phpDocumentor\Descriptor\Filter\Filter::__construct |
||
45 | */ |
||
46 | public function testClassFactoryIsSetUponConstruction() |
||
50 | |||
51 | /** |
||
52 | * @covers phpDocumentor\Descriptor\Filter\Filter::attach |
||
53 | */ |
||
54 | public function testAttach() |
||
63 | |||
64 | /** |
||
65 | * @covers phpDocumentor\Descriptor\Filter\Filter::filter |
||
66 | */ |
||
67 | public function testFilter() |
||
77 | } |
||
78 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: