1 | <?php |
||
5 | class ArrayUtilsTraitTest extends \PHPUnit_Framework_TestCase |
||
6 | { |
||
7 | /** |
||
8 | * @var ArrayUtilsTrait |
||
9 | */ |
||
10 | protected $trait; |
||
11 | |||
12 | /** |
||
13 | * set up trait |
||
14 | */ |
||
15 | public function setUp() |
||
19 | /** |
||
20 | * @param array $data |
||
21 | * @param bool $expected |
||
22 | * @dataProvider isEmptyDataProvider |
||
23 | */ |
||
24 | public function testIsEmptyData(array $data, $expected) |
||
28 | |||
29 | /** |
||
30 | * @return array |
||
31 | */ |
||
32 | public function isEmptyDataProvider() |
||
56 | |||
57 | /** |
||
58 | * @dataProvider rowProvider |
||
59 | * @param array $row |
||
60 | * @param $expected |
||
61 | */ |
||
62 | public function normalize(array $row, $expected) |
||
66 | |||
67 | /** |
||
68 | * @expectedException \Maketok\DataMigration\Action\Exception\NormalizationException |
||
69 | * @expectedExceptionMessage Can not extract values: uneven data for row |
||
70 | */ |
||
71 | public function normalizeError() |
||
76 | |||
77 | /** |
||
78 | * @return array |
||
79 | */ |
||
80 | public function rowProvider() |
||
94 | |||
95 | /** |
||
96 | * @param $data |
||
97 | * @param $expectedRow |
||
98 | * @dataProvider tmpUnitsProvider |
||
99 | */ |
||
100 | public function testAssemble($data, $expectedRow) |
||
104 | |||
105 | /** |
||
106 | * @expectedException \Maketok\DataMigration\Action\Exception\ConflictException |
||
107 | */ |
||
108 | public function testAssembleConflict() |
||
122 | |||
123 | /** |
||
124 | * @expectedException \Maketok\DataMigration\Action\Exception\ConflictException |
||
125 | */ |
||
126 | public function testAssembleConflict2() |
||
139 | |||
140 | /** |
||
141 | * @expectedException \Maketok\DataMigration\Action\Exception\ConflictException |
||
142 | */ |
||
143 | public function testAssembleConflict3() |
||
157 | |||
158 | /** |
||
159 | * @expectedException \Maketok\DataMigration\Action\Exception\ConflictException |
||
160 | * @dataProvider tmpUnitConflictProvider |
||
161 | */ |
||
162 | public function testAssembleConflict4($units) |
||
166 | |||
167 | /** |
||
168 | * @return array |
||
169 | */ |
||
170 | public function tmpUnitsProvider() |
||
223 | |||
224 | /** |
||
225 | * @param array $data |
||
226 | * @param array $expected |
||
227 | * @dataProvider tmpUnitConflictProvider |
||
228 | */ |
||
229 | public function testAssembleResolve($data, $expected) |
||
233 | |||
234 | /** |
||
235 | * @param array $data |
||
236 | * @param array $expected |
||
237 | * @dataProvider tmpUnitsProvider |
||
238 | */ |
||
239 | public function testAssembleResolve2($data, $expected) |
||
243 | |||
244 | /** |
||
245 | * @return array |
||
246 | */ |
||
247 | public function tmpUnitConflictProvider() |
||
313 | } |
||
314 |
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..