Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ModeTest extends TestCase |
||
9 | { |
||
10 | /** |
||
11 | * @dataProvider providerMODE |
||
12 | * |
||
13 | * @param mixed $expectedResult |
||
14 | * @param string $str |
||
15 | */ |
||
16 | public function testMODE($expectedResult, string $str): void |
||
17 | { |
||
18 | $workbook = new Spreadsheet(); |
||
19 | $sheet = $workbook->getActiveSheet(); |
||
20 | |||
21 | $row = 1; |
||
22 | $sheet->setCellValue("B$row", "=MODE($str)"); |
||
23 | $sheet->setCellValue("C$row", "=MODE.SNGL($str)"); |
||
24 | self::assertEquals($expectedResult, $sheet->getCell("B$row")->getCalculatedValue()); |
||
25 | self::assertEquals($expectedResult, $sheet->getCell("C$row")->getCalculatedValue()); |
||
26 | } |
||
27 | |||
28 | public function providerMODE(): array |
||
31 | } |
||
32 | |||
33 | public function testMODENoArgs(): void |
||
42 | } |
||
43 | } |
||
44 |