1 | <?php |
||
13 | class AbstractCheckCommandFactoryTest extends \PHPUnit_Framework_TestCase |
||
14 | { |
||
15 | /** @var ServiceManager */ |
||
16 | private $serviceLocator; |
||
17 | |||
18 | /** @var \PHPUnit_Framework_MockObject_MockObject|AbstractCheckCommandFactory */ |
||
19 | private $sut; |
||
20 | |||
21 | protected function setUp() |
||
29 | |||
30 | public function testCreateService() |
||
40 | |||
41 | /** |
||
42 | * @expectedException \UnexpectedValueException |
||
43 | */ |
||
44 | public function testNotCreateServiceDueToInvalidCommandType() |
||
52 | } |
||
53 |
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: