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

32 lines
757 B
PHP
Raw Normal View History

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