Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testSUM($expectedResult, ...$args): void |
||
13 | { |
||
14 | $sheet = $this->sheet; |
||
15 | $row = 0; |
||
16 | foreach ($args as $arg) { |
||
17 | ++$row; |
||
18 | $sheet->getCell("A$row")->setValue($arg); |
||
19 | } |
||
20 | $sheet->getCell('B1')->setValue("=SUM(A1:A$row)"); |
||
21 | $result = $sheet->getCell('B1')->getCalculatedValue(); |
||
22 | self::assertEqualsWithDelta($expectedResult, $result, 1E-12); |
||
23 | } |
||
30 |