Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php
T
Mark Baker 70f372d88c Start refactoring the Lookup and Reference functions (#1912)
* Start refactoring the Lookup and Reference functions
 - COLUMN(), COLUMNS(), ROW() and ROWS()
 - LOOKUP(), VLOOKUP() and HLOOKUP()
 - Refactor TRANSPOSE() and ADDRESS() functions into their own classes

* Additional unit tests
 - LOOKUP()
 - TRANSPOSE()
 - ADDRESS()
2021-03-10 21:18:33 +01:00

32 lines
781 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Calculation\LookupRef;
use PHPUnit\Framework\TestCase;
class AddressTest extends TestCase
{
protected function setUp(): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
/**
* @dataProvider providerADDRESS
*
* @param mixed $expectedResult
*/
public function testADDRESS($expectedResult, ...$args): void
{
$result = LookupRef::cellAddress(...$args);
self::assertEquals($expectedResult, $result);
}
public function providerADDRESS()
{
return require 'tests/data/Calculation/LookupRef/ADDRESS.php';
}
}