markTestIncomplete('TODO: This test should be fixed'); $result = Financial::PRICE(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerPRICE() { return require 'tests/data/Calculation/Financial/PRICE.php'; } /** * @dataProvider providerPRICEDISC * * @param mixed $expectedResult */ public function testPRICEDISC($expectedResult, array $args) { $result = Financial::PRICEDISC(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerPRICEDISC() { return require 'tests/data/Calculation/Financial/PRICEDISC.php'; } /** * @dataProvider providerPV * * @param mixed $expectedResult */ public function testPV($expectedResult, array $args) { $result = Financial::PV(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerPV() { return require 'tests/data/Calculation/Financial/PV.php'; } /** * @dataProvider providerRATE * * @param mixed $expectedResult */ public function testRATE($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); $result = Financial::RATE(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerRATE() { return require 'tests/data/Calculation/Financial/RATE.php'; } /** * @dataProvider providerXIRR * * @param mixed $expectedResult * @param mixed $message */ public function testXIRR($expectedResult, $message, ...$args) { $result = Financial::XIRR(...$args); self::assertEqualsWithDelta($expectedResult, $result, Financial::FINANCIAL_PRECISION, $message); } public function providerXIRR() { return require 'tests/data/Calculation/Financial/XIRR.php'; } /** * @dataProvider providerPDURATION * * @param mixed $expectedResult */ public function testPDURATION($expectedResult, array $args) { $result = Financial::PDURATION(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerPDURATION() { return require 'tests/data/Calculation/Financial/PDURATION.php'; } /** * @dataProvider providerRRI * * @param mixed $expectedResult */ public function testRRI($expectedResult, array $args) { $result = Financial::RRI(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerRRI() { return require 'tests/data/Calculation/Financial/RRI.php'; } /** * @dataProvider providerSLN * * @param mixed $expectedResult */ public function testSLN($expectedResult, array $args) { $result = Financial::SLN(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerSLN() { return require 'tests/data/Calculation/Financial/SLN.php'; } /** * @dataProvider providerSYD * * @param mixed $expectedResult */ public function testSYD($expectedResult, array $args) { $result = Financial::SYD(...$args); self::assertEqualsWithDelta($expectedResult, $result, 1E-8); } public function providerSYD() { return require 'tests/data/Calculation/Financial/SYD.php'; } }