Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testMDETERM2($expectedResult, $matrix): void |
||
14 | { |
||
15 | $this->mightHaveException($expectedResult); |
||
16 | $sheet = $this->sheet; |
||
17 | if (is_array($matrix)) { |
||
18 | $sheet->fromArray($matrix, null, 'A1', true); |
||
19 | $maxCol = $sheet->getHighestColumn(); |
||
20 | $maxRow = $sheet->getHighestRow(); |
||
21 | $sheet->getCell('Z1')->setValue("=MDETERM(A1:$maxCol$maxRow)"); |
||
22 | } else { |
||
23 | $sheet->getCell('Z1')->setValue("=MDETERM($matrix)"); |
||
24 | } |
||
25 | $result = $sheet->getCell('Z1')->getCalculatedValue(); |
||
26 | self::assertEqualsWithDelta($expectedResult, $result, 1E-12); |
||
27 | } |
||
34 |