mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-31 12:40:00 +00:00
e41c4280f6
Start removing some of the deprecations, starting with the old Excel Function implementations.
26 lines
655 B
PHP
26 lines
655 B
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Financial;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class PDurationTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider providerPDURATION
|
|
*
|
|
* @param mixed $expectedResult
|
|
*/
|
|
public function testPDURATION($expectedResult, array $args = []): void
|
|
{
|
|
$result = Single::periods(...$args);
|
|
self::assertEqualsWithDelta($expectedResult, $result, 1E-8);
|
|
}
|
|
|
|
public function providerPDURATION(): array
|
|
{
|
|
return require 'tests/data/Calculation/Financial/PDURATION.php';
|
|
}
|
|
}
|