mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-26 11:07:04 +00:00
41c8a4f1b4
* Additional unit tests for previously untested financial functions, and some additions to follow untested paths * Start splitting Financial function tests out from the large FinancialTests class into individual test classes for each function
32 lines
804 B
PHP
32 lines
804 B
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Financial;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Financial;
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class AmorDegRcTest extends TestCase
|
|
{
|
|
protected function setUp(): void
|
|
{
|
|
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
|
}
|
|
|
|
/**
|
|
* @dataProvider providerAMORDEGRC
|
|
*
|
|
* @param mixed $expectedResult
|
|
*/
|
|
public function testAMORDEGRC($expectedResult, ...$args): void
|
|
{
|
|
$result = Financial::AMORDEGRC(...$args);
|
|
self::assertEqualsWithDelta($expectedResult, $result, 1E-8);
|
|
}
|
|
|
|
public function providerAMORDEGRC()
|
|
{
|
|
return require 'tests/data/Calculation/Financial/AMORDEGRC.php';
|
|
}
|
|
}
|