2019-07-27 14:02:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef;
|
|
|
|
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
2019-07-27 14:35:27 +00:00
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\LookupRef;
|
2019-07-27 14:02:58 +00:00
|
|
|
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';
|
|
|
|
}
|
|
|
|
}
|