| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Financial;
- use PhpOffice\PhpSpreadsheet\Calculation\Financial;
- use PhpOffice\PhpSpreadsheet\Calculation\Functions;
- use PHPUnit\Framework\TestCase;
- class EffectTest extends TestCase
- {
- protected function setUp(): void
- {
- Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
- }
- /**
- * @dataProvider providerEFFECT
- *
- * @param mixed $expectedResult
- * @param mixed $rate
- * @param mixed $periods
- */
- public function testEFFECT($expectedResult, $rate, $periods): void
- {
- $result = Financial::EFFECT($rate, $periods);
- self::assertEqualsWithDelta($expectedResult, $result, 1E-8);
- }
- public function providerEFFECT(): array
- {
- return require 'tests/data/Calculation/Financial/EFFECT.php';
- }
- }
|