PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php

32 lines
760 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Calculation\LookupRef;
use PHPUnit\Framework\TestCase;
class IndexTest extends TestCase
{
protected function setUp(): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
/**
* @dataProvider providerINDEX
*
* @param mixed $expectedResult
*/
public function testINDEX($expectedResult, ...$args)
{
$result = LookupRef::INDEX(...$args);
$this->assertEquals($expectedResult, $result);
}
public function providerINDEX()
{
return require 'tests/data/Calculation/LookupRef/INDEX.php';
}
}