mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-25 23:06:03 +03:00
Additional unit tests
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@91577 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
64fe139503
commit
7d173abeb2
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user