1 | <?php |
||
21 | class PluginMapperTest extends Unit |
||
22 | { |
||
23 | /** |
||
24 | * @var PluginMapper |
||
25 | */ |
||
26 | private $mapper; |
||
27 | |||
28 | /** |
||
29 | * Set the mapper. |
||
30 | * |
||
31 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
||
32 | */ |
||
33 | protected function _before() |
||
37 | |||
38 | //============================================================================================================== |
||
39 | //================================================= TESTS ==================================================== |
||
40 | //============================================================================================================== |
||
41 | |||
42 | /** |
||
43 | * Test default import functionality. |
||
44 | */ |
||
45 | public function testImportWithInstalledPlugins() |
||
56 | |||
57 | /** |
||
58 | * Test default import functionality. |
||
59 | */ |
||
60 | public function testImportWithInstalledDisabledPlugins() |
||
74 | |||
75 | /** |
||
76 | * Test default import functionality. |
||
77 | */ |
||
78 | public function testImportWithMissingPlugin() |
||
88 | |||
89 | /** |
||
90 | * Test default import functionality. |
||
91 | */ |
||
92 | public function testImportWithInstallException() |
||
103 | |||
104 | /** |
||
105 | * Test default import functionality. |
||
106 | */ |
||
107 | public function testImportWithNotInstalledPlugin() |
||
121 | |||
122 | /** |
||
123 | * Test default import functionality. |
||
124 | */ |
||
125 | public function testImportWithForce() |
||
141 | |||
142 | /** |
||
143 | * Test export functionality. |
||
144 | */ |
||
145 | public function testExport() |
||
158 | |||
159 | //============================================================================================================== |
||
160 | //================================================ HELPERS =================================================== |
||
161 | //============================================================================================================== |
||
162 | |||
163 | /** |
||
164 | * @param bool $returnPlugin |
||
165 | * @param bool $installPluginResponse |
||
166 | * @param bool $enablePluginResponse |
||
167 | * @param bool $disablePluginResponse |
||
168 | * @param bool $saveSettingsResponse |
||
169 | */ |
||
170 | private function mockPluginsService( |
||
189 | |||
190 | /** |
||
191 | * @return Mock|plugin |
||
192 | */ |
||
193 | private function getMockplugin() |
||
205 | |||
206 | /** |
||
207 | * Get mock settings. |
||
208 | * |
||
209 | * @return Mock|Model |
||
210 | */ |
||
211 | private function getMockSettings() |
||
226 | |||
227 | /** |
||
228 | * Returns plugins data. |
||
229 | * |
||
230 | * @return array |
||
231 | */ |
||
232 | private function getPluginsData() |
||
246 | |||
247 | /** |
||
248 | * Returns plugins data. |
||
249 | * |
||
250 | * @return array |
||
251 | */ |
||
252 | private function getPluginsDefinition() |
||
266 | } |
||
267 |
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: