From c98eaf18f7dcd63aa2c83e6abdaa19163aab2d3d Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sat, 24 Mar 2012 23:11:57 +0000 Subject: [PATCH] Unit tests git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@88320 2327b42d-5241-43d6-9e2a-de5ac946f064 --- .../PHPExcel/Calculation/FinancialTest.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 unitTests/PHPExcel/Calculation/FinancialTest.php diff --git a/unitTests/PHPExcel/Calculation/FinancialTest.php b/unitTests/PHPExcel/Calculation/FinancialTest.php new file mode 100644 index 00000000..6fe4a067 --- /dev/null +++ b/unitTests/PHPExcel/Calculation/FinancialTest.php @@ -0,0 +1,50 @@ +assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerACCRINT() + { + return new testDataFileIterator('rawTestData/Calculation/Financial/ACCRINT.data'); + } + + /** + * @dataProvider providerACCRINTM + */ + public function testACCRINTM() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerACCRINTM() + { + return new testDataFileIterator('rawTestData/Calculation/Financial/ACCRINTM.data'); + } + +}