Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Information/InfoTest.php
T
Robin van der Vliet e18bf2a2ef Fix tests
2025-11-10 22:45:43 +01:00

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';
}
}