PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/LookupRefTest.php

52 lines
1.2 KiB
PHP
Raw Normal View History

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Calculation\LookupRef;
/**
* Class LookupRefTest
*/
2016-03-22 14:35:50 +00:00
class LookupRefTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
2015-05-17 13:00:02 +00:00
}
/**
* @dataProvider providerHLOOKUP
* @group fail19
*/
2015-05-17 13:00:02 +00:00
public function testHLOOKUP()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([LookupRef::class, 'HLOOKUP'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
public function providerHLOOKUP()
{
return require 'data/Calculation/LookupRef/HLOOKUP.php';
2015-05-17 13:00:02 +00:00
}
/**
* @dataProvider providerVLOOKUP
* @group fail19
*/
2015-05-17 13:00:02 +00:00
public function testVLOOKUP()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([LookupRef::class, 'VLOOKUP'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
public function providerVLOOKUP()
{
return require 'data/Calculation/LookupRef/VLOOKUP.php';
2015-05-17 13:00:02 +00:00
}
}