mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-14 07:47:14 +00:00
27 lines
729 B
PHP
27 lines
729 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class InfoTest extends TestCase
|
|
{
|
|
#[\PHPUnit\Framework\Attributes\DataProvider('providerINFO')]
|
|
public function testINFO(mixed $expectedResult, string $typeText): void
|
|
{
|
|
$calculation = Calculation::getInstance();
|
|
|
|
$formula = "=INFO($typeText)";
|
|
$result = $calculation->_calculateFormulaValue($formula);
|
|
self::assertEquals($expectedResult, $result);
|
|
}
|
|
|
|
public static function providerINFO(): array
|
|
{
|
|
return require 'tests/data/Calculation/Information/INFO.php';
|
|
}
|
|
}
|