From b9c88ffae4b4f04788f4ef8d52dd8c4389a3278e Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Thu, 26 Jan 2012 22:40:23 +0000 Subject: [PATCH] Unit Test scripts git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@85795 2327b42d-5241-43d6-9e2a-de5ac946f064 --- .../PHPExcel/Calculation/MathTrigTest.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/unitTests/PHPExcel/Calculation/MathTrigTest.php b/unitTests/PHPExcel/Calculation/MathTrigTest.php index aea67a5..db1b67d 100644 --- a/unitTests/PHPExcel/Calculation/MathTrigTest.php +++ b/unitTests/PHPExcel/Calculation/MathTrigTest.php @@ -223,4 +223,36 @@ class MathTrigTest extends PHPUnit_Framework_TestCase return new testDataFileIterator('rawTestData/Calculation/MathTrig/POWER.data'); } + /** + * @dataProvider providerLOG + */ + public function testLOG() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LOG_BASE'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerLOG() + { + return new testDataFileIterator('rawTestData/Calculation/MathTrig/LOG.data'); + } + + /** + * @dataProvider providerSQRTPI + */ + public function testSQRTPI() + { + $args = func_get_args(); + $expectedResult = array_pop($args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SQRTPI'),$args); + $this->assertEquals($expectedResult, $result, NULL, 1E-12); + } + + public function providerSQRTPI() + { + return new testDataFileIterator('rawTestData/Calculation/MathTrig/SQRTPI.data'); + } + }