Unit tests

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@88961 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-04-07 20:53:36 +00:00
parent d481003b50
commit efb2f4143a
1 changed files with 16 additions and 0 deletions

View File

@ -79,4 +79,20 @@ class FinancialTest extends PHPUnit_Framework_TestCase
return new testDataFileIterator('rawTestData/Calculation/Financial/AMORLINC.data'); 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');
}
} }