1 | <?php |
||
18 | class FieldTest extends Unit |
||
19 | { |
||
20 | /** |
||
21 | * @var Fields |
||
22 | */ |
||
23 | private $converter; |
||
24 | |||
25 | /** |
||
26 | * Set the converter. |
||
27 | * |
||
28 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
||
29 | */ |
||
30 | protected function _before() |
||
34 | |||
35 | //============================================================================================================== |
||
36 | //================================================= TESTS ==================================================== |
||
37 | //============================================================================================================== |
||
38 | |||
39 | /** |
||
40 | * @dataProvider provideFields |
||
41 | * |
||
42 | * @param FieldModel $field |
||
43 | * @param array $definition |
||
44 | */ |
||
45 | public function testGetRecordDefinition(FieldModel $field, array $definition) |
||
51 | |||
52 | /** |
||
53 | * @dataProvider provideFields |
||
54 | * |
||
55 | * @param FieldModel $field |
||
56 | * @param array $definition |
||
57 | * @param string $groupStatus existing|new|invalid |
||
58 | */ |
||
59 | public function testSaveRecord(FieldModel $field, array $definition, string $groupStatus) |
||
78 | |||
79 | /** |
||
80 | * @dataProvider provideFields |
||
81 | * |
||
82 | * @param FieldModel $field |
||
83 | */ |
||
84 | public function testDeleteRecord(FieldModel $field) |
||
92 | |||
93 | //============================================================================================================== |
||
94 | //============================================== PROVIDERS =================================================== |
||
95 | //============================================================================================================== |
||
96 | |||
97 | /** |
||
98 | * @return array |
||
99 | */ |
||
100 | public function provideFields() |
||
123 | |||
124 | //============================================================================================================== |
||
125 | //================================================ HELPERS =================================================== |
||
126 | //============================================================================================================== |
||
127 | |||
128 | /** |
||
129 | * @param FieldModel $mockField |
||
130 | * |
||
131 | * @return array |
||
132 | */ |
||
133 | private function getMockFieldDefinition(FieldModel $mockField) |
||
151 | |||
152 | /** |
||
153 | * @param int $fieldId |
||
154 | * @param int $groupId |
||
155 | * |
||
156 | * @return Mock|FieldModel |
||
157 | */ |
||
158 | private function getMockField(int $fieldId, int $groupId) |
||
176 | |||
177 | /** |
||
178 | * Get a mock field group. |
||
179 | * |
||
180 | * @param int $groupId |
||
181 | * |
||
182 | * @return Mock|FieldGroup |
||
183 | */ |
||
184 | private function getMockFieldGroup(int $groupId) |
||
195 | } |
||
196 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..