diff --git a/unitTests/PHPExcel/Calculation/FinancialTest.php b/unitTests/PHPExcel/Calculation/FinancialTest.php index 98a61b97..2a333341 100644 --- a/unitTests/PHPExcel/Calculation/FinancialTest.php +++ b/unitTests/PHPExcel/Calculation/FinancialTest.php @@ -463,6 +463,22 @@ class FinancialTest extends PHPUnit_Framework_TestCase return new testDataFileIterator('rawTestData/Calculation/Financial/NPV.data'); } + /** + * @dataProvider providerPRICE + */ + public function testPRICE() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-8); + } + + public function providerPRICE() + { + return new testDataFileIterator('rawTestData/Calculation/Financial/PRICE.data'); + } + /** * @dataProvider providerRATE */ diff --git a/unitTests/PHPExcel/Calculation/MathTrigTest.php b/unitTests/PHPExcel/Calculation/MathTrigTest.php index 6db6889b..74b2c7c4 100644 --- a/unitTests/PHPExcel/Calculation/MathTrigTest.php +++ b/unitTests/PHPExcel/Calculation/MathTrigTest.php @@ -303,6 +303,22 @@ class MathTrigTest extends PHPUnit_Framework_TestCase return new testDataFileIterator('rawTestData/Calculation/MathTrig/MMULT.data'); } + /** + * @dataProvider providerMULTINOMIAL + */ + public function testMULTINOMIAL() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MULTINOMIAL'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerMULTINOMIAL() + { + return new testDataFileIterator('rawTestData/Calculation/MathTrig/MULTINOMIAL.data'); + } + /** * @dataProvider providerMROUND */ @@ -321,6 +337,38 @@ class MathTrigTest extends PHPUnit_Framework_TestCase return new testDataFileIterator('rawTestData/Calculation/MathTrig/MROUND.data'); } + /** + * @dataProvider providerPRODUCT + */ + public function testPRODUCT() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','PRODUCT'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerPRODUCT() + { + return new testDataFileIterator('rawTestData/Calculation/MathTrig/PRODUCT.data'); + } + + /** + * @dataProvider providerQUOTIENT + */ + public function testQUOTIENT() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','QUOTIENT'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerQUOTIENT() + { + return new testDataFileIterator('rawTestData/Calculation/MathTrig/QUOTIENT.data'); + } + /** * @dataProvider providerROUNDUP */ @@ -353,6 +401,38 @@ class MathTrigTest extends PHPUnit_Framework_TestCase return new testDataFileIterator('rawTestData/Calculation/MathTrig/ROUNDDOWN.data'); } + /** + * @dataProvider providerSERIESSUM + */ + public function testSERIESSUM() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SERIESSUM'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerSERIESSUM() + { + return new testDataFileIterator('rawTestData/Calculation/MathTrig/SERIESSUM.data'); + } + + /** + * @dataProvider providerSUMSQ + */ + public function testSUMSQ() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SUMSQ'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerSUMSQ() + { + return new testDataFileIterator('rawTestData/Calculation/MathTrig/SUMSQ.data'); + } + /** * @dataProvider providerTRUNC */