1 | <?php |
||
23 | class ServiceProviderTest extends UnitTestCase |
||
24 | { |
||
25 | //tests also private method disable this tests as soon as all are used in public interfaces |
||
26 | //<editor-fold desc="Public Methods"> |
||
27 | |||
28 | /** |
||
29 | * @covers \Tfboe\FmLib\Providers\ServiceProvider::register |
||
30 | * @throws ReflectionException |
||
31 | * @throws ReflectionException |
||
32 | */ |
||
33 | public function testRegister() |
||
49 | //</editor-fold desc="Public Methods"> |
||
50 | |||
51 | //<editor-fold desc="Private Methods"> |
||
52 | /** |
||
53 | * @param null|Application|MockObject $app |
||
54 | * @return MockObject|ServiceProvider |
||
55 | * @throws ReflectionException |
||
56 | */ |
||
57 | private function provider($app = null): MockObject |
||
64 | //</editor-fold desc="Private Methods"> |
||
65 | } |
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: