Passed
Push — master ( a97294...8972d3 )
by Adrien
28:45 queued 21:13
created

RowsTest::testROWS()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef;
4
5
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
6
use PhpOffice\PhpSpreadsheet\Calculation\LookupRef;
7
use PHPUnit\Framework\TestCase;
8
9
class RowsTest extends TestCase
10
{
11
    public function setUp()
12
    {
13
        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
14
    }
15
16
    /**
17
     * @dataProvider providerROWS
18
     *
19
     * @param mixed $expectedResult
20
     */
21
    public function testROWS($expectedResult, ...$args)
22
    {
23
        $result = LookupRef::ROWS(...$args);
1 ignored issue
show
Bug introduced by
$args is expanded, but the parameter $cellAddress of PhpOffice\PhpSpreadsheet...ation\LookupRef::ROWS() does not expect variable arguments. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

23
        $result = LookupRef::ROWS(/** @scrutinizer ignore-type */ ...$args);
Loading history...
24
        $this->assertEquals($expectedResult, $result);
25
    }
26
27
    public function providerROWS()
28
    {
29
        return require 'data/Calculation/LookupRef/ROWS.php';
30
    }
31
}
32