1 | <?php |
||
19 | class ContainerFunctionalTest extends AbstractHttpControllerTestCase |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * @inheritdoc |
||
24 | * |
||
25 | * @throws \Zend\Stdlib\Exception\LogicException |
||
26 | */ |
||
27 | protected function setUp() |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Тестирование получения службы по контексту |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | public function dataTestGetEntryByContext() |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Проверка ситуации когда пытаемся получить сервис, который: |
||
56 | * 1) Не может быть разрезолвен в другой, в зависимости от контекста |
||
57 | * 2) Не зарегестрирован в ServiceLocator приложения |
||
58 | * |
||
59 | * |
||
60 | * @expectedException \Zend\ServiceManager\Exception\ServiceNotFoundException |
||
61 | * @expectedExceptionMessage Nnx\Container\Container::get was unable to fetch or create an instance for |
||
62 | * |
||
63 | * |
||
64 | * @return void |
||
65 | * |
||
66 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
||
67 | * @throws \Zend\Stdlib\Exception\LogicException |
||
68 | */ |
||
69 | public function testLoadModule() |
||
77 | |||
78 | |||
79 | /** |
||
80 | * Тестирование получени службы, в зависимости от контекста |
||
81 | * |
||
82 | * @dataProvider dataTestGetEntryByContext |
||
83 | * |
||
84 | * @param $entryName |
||
85 | * @param $context |
||
86 | * @param $expectedEntryClassName |
||
87 | * |
||
88 | * @throws \Zend\Stdlib\Exception\LogicException |
||
89 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
||
90 | */ |
||
91 | public function testGetEntryByContext($entryName, $context, $expectedEntryClassName) |
||
101 | |||
102 | /** |
||
103 | * Проверка getter/setter для свойства flagUsePeeringServiceManagers |
||
104 | * |
||
105 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
||
106 | */ |
||
107 | public function testSetterGetterFlagUsePeeringServiceManagers() |
||
115 | |||
116 | |||
117 | /** |
||
118 | * Проверка getter/setter для свойства flagCheckAbstractFactories |
||
119 | * |
||
120 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
||
121 | */ |
||
122 | public function testSetterGetterFlagCheckAbstractFactories() |
||
130 | } |
||
131 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: