1 | <?php |
||
19 | class SiteTest extends Unit |
||
20 | { |
||
21 | /** |
||
22 | * @var Sites |
||
23 | */ |
||
24 | private $converter; |
||
25 | |||
26 | /** |
||
27 | * Set the converter. |
||
28 | * |
||
29 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
||
30 | */ |
||
31 | protected function _before() |
||
35 | |||
36 | //============================================================================================================== |
||
37 | //================================================= TESTS ==================================================== |
||
38 | //============================================================================================================== |
||
39 | |||
40 | /** |
||
41 | * @dataProvider provideSites |
||
42 | * |
||
43 | * @param SiteModel $site |
||
44 | * @param array $definition |
||
45 | */ |
||
46 | public function testGetRecordDefinition(SiteModel $site, array $definition) |
||
52 | |||
53 | /** |
||
54 | * @dataProvider provideSites |
||
55 | * |
||
56 | * @param SiteModel $site |
||
57 | * @param array $definition |
||
58 | * @param string $groupStatus existing|new|invalid |
||
59 | */ |
||
60 | public function testSaveRecord(SiteModel $site, array $definition, string $groupStatus) |
||
79 | |||
80 | /** |
||
81 | * @dataProvider provideSites |
||
82 | * |
||
83 | * @param SiteModel $site |
||
84 | */ |
||
85 | public function testDeleteRecord(SiteModel $site) |
||
93 | |||
94 | //============================================================================================================== |
||
95 | //============================================== PROVIDERS =================================================== |
||
96 | //============================================================================================================== |
||
97 | |||
98 | /** |
||
99 | * @return array |
||
100 | */ |
||
101 | public function provideSites() |
||
124 | |||
125 | //============================================================================================================== |
||
126 | //================================================ HELPERS =================================================== |
||
127 | //============================================================================================================== |
||
128 | |||
129 | /** |
||
130 | * @param SiteModel $mockSite |
||
131 | * |
||
132 | * @return array |
||
133 | */ |
||
134 | private function getMockSiteDefinition(SiteModel $mockSite) |
||
152 | |||
153 | /** |
||
154 | * @param int $siteId |
||
155 | * |
||
156 | * @return Mock|SiteModel |
||
157 | */ |
||
158 | private function getMockSite(int $siteId, int $groupId) |
||
182 | |||
183 | /** |
||
184 | * Get a mock site group. |
||
185 | * |
||
186 | * @param int $groupId |
||
187 | * |
||
188 | * @return Mock|SiteGroup |
||
189 | */ |
||
190 | private function getMockSiteGroup(int $groupId) |
||
201 | } |
||
202 |
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..