Files
oleibman a884013d00 Fix Unintential Deprecated Calls in Tests - FINANCIAL (#3180)
* Fix Unintential Deprecated Calls in Tests - FINANCIAL

I think it's best to install these before PR #3166. There are no changes to source code, only to doc-blocks and to test members which continue to inadvertently use calls to deprecated functions.

* Change Tests to Run in Spreadsheet Context

Found and fixed some problems with how MIRR handles errors.
2022-11-25 07:19:19 -08:00

40 lines
1019 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Financial;
class PriceTest extends AllSetupTeardown
{
/**
* @dataProvider providerPRICE
*
* @param mixed $expectedResult
*/
public function testPRICE($expectedResult, ...$args): void
{
$this->runTestCase('PRICE', $expectedResult, $args);
}
public function providerPRICE(): array
{
return require 'tests/data/Calculation/Financial/PRICE.php';
}
/**
* @dataProvider providerPRICE3
*
* @param mixed $expectedResult
*/
public function testPRICE3($expectedResult, ...$args): void
{
// These results (PRICE function with basis codes 2 and 3)
// agree with published algorithm, LibreOffice, and Gnumeric.
// They do not agree with Excel.
$this->runTestCase('PRICE', $expectedResult, $args);
}
public function providerPRICE3(): array
{
return require 'tests/data/Calculation/Financial/PRICE3.php';
}
}