Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/OrTest.php
T
Adrien Crivelli 1b05dfab8b Rector AddParamTypeBasedOnPHPUnitDataProviderRector
And quite a bit more manual changes. The idea is that typing of our
tests can be a bit more loose, so we assume PHPDoc is mostly correct. If
that happens to be wrong, it should be caught by the tests themselves.
2023-09-07 17:00:24 +08:00

35 lines
905 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Logical;
class OrTest extends AllSetupTeardown
{
/**
* @dataProvider providerOR
*/
public function testOR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('OR', $expectedResult, ...$args);
}
public static function providerOR(): array
{
return require 'tests/data/Calculation/Logical/OR.php';
}
/**
* @dataProvider providerORLiteral
*/
public function testORLiteral(mixed $expectedResult, mixed $formula): void
{
$sheet = $this->getSheet();
$sheet->getCell('A1')->setValue("=OR($formula)");
self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());
}
public static function providerORLiteral(): array
{
return require 'tests/data/Calculation/Logical/ORLiteral.php';
}
}