1 | <?php |
||
8 | class TestContainer extends Container |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private $mocked = []; |
||
14 | |||
15 | /** |
||
16 | * @var array|null |
||
17 | */ |
||
18 | private $parametersOriginal; |
||
19 | |||
20 | /** |
||
21 | * @var \ReflectionProperty |
||
22 | */ |
||
23 | private $parametersReflection; |
||
24 | |||
25 | /** |
||
26 | * @var Prophet |
||
27 | */ |
||
28 | protected $prophet; |
||
29 | |||
30 | /** |
||
31 | * @param string $id The service identifier |
||
32 | * @param string|null $class Class or interface fully qualified name |
||
33 | * @return \Prophecy\Prophecy\ObjectProphecy |
||
34 | * @throws \InvalidArgumentException |
||
35 | * @throws \BadMethodCallException |
||
36 | * @throws \Prophecy\Exception\Prophecy\ObjectProphecyException |
||
37 | */ |
||
38 | public function prophesize($id, $class = null) |
||
53 | |||
54 | /** |
||
55 | * Remove all mocked services |
||
56 | */ |
||
57 | public function tearDown() |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function reset() |
||
74 | |||
75 | /** |
||
76 | * @param string $id |
||
77 | * @param mixed $mock |
||
78 | */ |
||
79 | public function setMock($id, $mock) |
||
83 | |||
84 | /** |
||
85 | * @param string $id |
||
86 | */ |
||
87 | public function unMock($id) |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function has($id) |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function initialized($id) |
||
127 | |||
128 | /** |
||
129 | * @return array |
||
130 | */ |
||
131 | public function getMockedServices() |
||
135 | |||
136 | /** |
||
137 | * @return Prophet |
||
138 | */ |
||
139 | public function getProphet() |
||
147 | |||
148 | /** |
||
149 | * @param string $service |
||
150 | * @return string |
||
151 | * @throws \BadMethodCallException |
||
152 | */ |
||
153 | protected function detectClass($service) |
||
157 | |||
158 | /** |
||
159 | * @param string $name |
||
160 | * @param mixed $value |
||
161 | * @throws \ReflectionException |
||
162 | */ |
||
163 | public function setMockedParameter($name, $value) |
||
173 | |||
174 | /** |
||
175 | * @throws \ReflectionException |
||
176 | */ |
||
177 | public function clearMockedParameters() |
||
185 | |||
186 | /** |
||
187 | * @return \ReflectionProperty |
||
188 | * @throws \ReflectionException |
||
189 | */ |
||
190 | private function getParametersReflection() |
||
199 | } |
||
200 | |||
201 |