Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarFrTest.php
oleibman c112802023 Eliminate Most Scrutinizer Problems in Test Suite (#2699)
* Eliminate Most Scrutinizer Problems in Test Suite

Mostly minor code changes, with some annotations.

* Missed 2 php-cs-fixer Problems

They should be fixed now.
2022-03-21 13:58:42 -07:00

32 lines
843 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Financial;
use PhpOffice\PhpSpreadsheet\Calculation\Financial;
use PHPUnit\Framework\TestCase;
class DollarFrTest extends TestCase
{
/**
* @dataProvider providerDOLLARFR
*
* @param mixed $expectedResult
*/
public function testDOLLARFR($expectedResult, ...$args): void
{
if (count($args) === 0) {
$result = Financial::DOLLARFR();
} elseif (count($args) === 1) {
$result = Financial::DOLLARFR($args[0]);
} else {
$result = Financial::DOLLARFR($args[0], $args[1]);
}
self::assertEqualsWithDelta($expectedResult, $result, 1E-8);
}
public function providerDOLLARFR(): array
{
return require 'tests/data/Calculation/Financial/DOLLARFR.php';
}
}