From efb2f4143a9ecf92c79b70e242abb863dee4cab4 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sat, 7 Apr 2012 20:53:36 +0000 Subject: [PATCH] Unit tests git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@88961 2327b42d-5241-43d6-9e2a-de5ac946f064 --- unitTests/PHPExcel/Calculation/FinancialTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/unitTests/PHPExcel/Calculation/FinancialTest.php b/unitTests/PHPExcel/Calculation/FinancialTest.php index e551dd6e..04a40668 100644 --- a/unitTests/PHPExcel/Calculation/FinancialTest.php +++ b/unitTests/PHPExcel/Calculation/FinancialTest.php @@ -79,4 +79,20 @@ class FinancialTest extends PHPUnit_Framework_TestCase return new testDataFileIterator('rawTestData/Calculation/Financial/AMORLINC.data'); } + /** + * @dataProvider providerRATE + */ + public function testRATE() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerRATE() + { + return new testDataFileIterator('rawTestData/Calculation/Financial/RATE.data'); + } + }