ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
FinancialTest.php
Go to the documentation of this file.
1 <?php
2 
3 
4 require_once 'testDataFileIterator.php';
5 
7 {
8 
9  public function setUp()
10  {
11  if (!defined('PHPEXCEL_ROOT'))
12  {
13  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
14  }
15  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
16 
18  }
19 
23  public function testACCRINT()
24  {
25  $args = func_get_args();
26  $expectedResult = array_pop($args);
27  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINT'),$args);
28  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
29  }
30 
31  public function providerACCRINT()
32  {
33  return new testDataFileIterator('rawTestData/Calculation/Financial/ACCRINT.data');
34  }
35 
39  public function testACCRINTM()
40  {
41  $args = func_get_args();
42  $expectedResult = array_pop($args);
43  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'),$args);
44  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
45  }
46 
47  public function providerACCRINTM()
48  {
49  return new testDataFileIterator('rawTestData/Calculation/Financial/ACCRINTM.data');
50  }
51 
55  public function testAMORDEGRC()
56  {
57  $args = func_get_args();
58  $expectedResult = array_pop($args);
59  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORDEGRC'),$args);
60  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
61  }
62 
63  public function providerAMORDEGRC()
64  {
65  return new testDataFileIterator('rawTestData/Calculation/Financial/AMORDEGRC.data');
66  }
67 
71  public function testAMORLINC()
72  {
73  $args = func_get_args();
74  $expectedResult = array_pop($args);
75  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORLINC'),$args);
76  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
77  }
78 
79  public function providerAMORLINC()
80  {
81  return new testDataFileIterator('rawTestData/Calculation/Financial/AMORLINC.data');
82  }
83 
87  public function testCOUPDAYBS()
88  {
89  $args = func_get_args();
90  $expectedResult = array_pop($args);
91  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYBS'),$args);
92  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
93  }
94 
95  public function providerCOUPDAYBS()
96  {
97  return new testDataFileIterator('rawTestData/Calculation/Financial/COUPDAYBS.data');
98  }
99 
103  public function testCOUPDAYS()
104  {
105  $args = func_get_args();
106  $expectedResult = array_pop($args);
107  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYS'),$args);
108  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
109  }
110 
111  public function providerCOUPDAYS()
112  {
113  return new testDataFileIterator('rawTestData/Calculation/Financial/COUPDAYS.data');
114  }
115 
119  public function testCOUPDAYSNC()
120  {
121  $args = func_get_args();
122  $expectedResult = array_pop($args);
123  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYSNC'),$args);
124  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
125  }
126 
127  public function providerCOUPDAYSNC()
128  {
129  return new testDataFileIterator('rawTestData/Calculation/Financial/COUPDAYSNC.data');
130  }
131 
135  public function testCOUPNCD()
136  {
137  $args = func_get_args();
138  $expectedResult = array_pop($args);
139  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNCD'),$args);
140  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
141  }
142 
143  public function providerCOUPNCD()
144  {
145  return new testDataFileIterator('rawTestData/Calculation/Financial/COUPNCD.data');
146  }
147 
151  public function testCOUPNUM()
152  {
153  $args = func_get_args();
154  $expectedResult = array_pop($args);
155  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNUM'),$args);
156  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
157  }
158 
159  public function providerCOUPNUM()
160  {
161  return new testDataFileIterator('rawTestData/Calculation/Financial/COUPNUM.data');
162  }
163 
167  public function testCOUPPCD()
168  {
169  $args = func_get_args();
170  $expectedResult = array_pop($args);
171  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPPCD'),$args);
172  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
173  }
174 
175  public function providerCOUPPCD()
176  {
177  return new testDataFileIterator('rawTestData/Calculation/Financial/COUPPCD.data');
178  }
179 
183  public function testCUMIPMT()
184  {
185  $args = func_get_args();
186  $expectedResult = array_pop($args);
187  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMIPMT'),$args);
188  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
189  }
190 
191  public function providerCUMIPMT()
192  {
193  return new testDataFileIterator('rawTestData/Calculation/Financial/CUMIPMT.data');
194  }
195 
199  public function testCUMPRINC()
200  {
201  $args = func_get_args();
202  $expectedResult = array_pop($args);
203  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMPRINC'),$args);
204  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
205  }
206 
207  public function providerCUMPRINC()
208  {
209  return new testDataFileIterator('rawTestData/Calculation/Financial/CUMPRINC.data');
210  }
211 
215  public function testDB()
216  {
217  $args = func_get_args();
218  $expectedResult = array_pop($args);
219  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DB'),$args);
220  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
221  }
222 
223  public function providerDB()
224  {
225  return new testDataFileIterator('rawTestData/Calculation/Financial/DB.data');
226  }
227 
231  public function testDDB()
232  {
233  $args = func_get_args();
234  $expectedResult = array_pop($args);
235  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DDB'),$args);
236  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
237  }
238 
239  public function providerDDB()
240  {
241  return new testDataFileIterator('rawTestData/Calculation/Financial/DDB.data');
242  }
243 
247  public function testDISC()
248  {
249  $args = func_get_args();
250  $expectedResult = array_pop($args);
251  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DISC'),$args);
252  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
253  }
254 
255  public function providerDISC()
256  {
257  return new testDataFileIterator('rawTestData/Calculation/Financial/DISC.data');
258  }
259 
263  public function testDOLLARDE()
264  {
265  $args = func_get_args();
266  $expectedResult = array_pop($args);
267  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARDE'),$args);
268  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
269  }
270 
271  public function providerDOLLARDE()
272  {
273  return new testDataFileIterator('rawTestData/Calculation/Financial/DOLLARDE.data');
274  }
275 
279  public function testDOLLARFR()
280  {
281  $args = func_get_args();
282  $expectedResult = array_pop($args);
283  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARFR'),$args);
284  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
285  }
286 
287  public function providerDOLLARFR()
288  {
289  return new testDataFileIterator('rawTestData/Calculation/Financial/DOLLARFR.data');
290  }
291 
295  public function testEFFECT()
296  {
297  $args = func_get_args();
298  $expectedResult = array_pop($args);
299  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','EFFECT'),$args);
300  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
301  }
302 
303  public function providerEFFECT()
304  {
305  return new testDataFileIterator('rawTestData/Calculation/Financial/EFFECT.data');
306  }
307 
311  public function testFV()
312  {
313  $args = func_get_args();
314  $expectedResult = array_pop($args);
315  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','FV'),$args);
316  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
317  }
318 
319  public function providerFV()
320  {
321  return new testDataFileIterator('rawTestData/Calculation/Financial/FV.data');
322  }
323 
327  public function testFVSCHEDULE()
328  {
329  $args = func_get_args();
330  $expectedResult = array_pop($args);
331  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','FVSCHEDULE'),$args);
332  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
333  }
334 
335  public function providerFVSCHEDULE()
336  {
337  return new testDataFileIterator('rawTestData/Calculation/Financial/FVSCHEDULE.data');
338  }
339 
343  public function testINTRATE()
344  {
345  $args = func_get_args();
346  $expectedResult = array_pop($args);
347  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','INTRATE'),$args);
348  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
349  }
350 
351  public function providerINTRATE()
352  {
353  return new testDataFileIterator('rawTestData/Calculation/Financial/INTRATE.data');
354  }
355 
359  public function testIPMT()
360  {
361  $args = func_get_args();
362  $expectedResult = array_pop($args);
363  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','IPMT'),$args);
364  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
365  }
366 
367  public function providerIPMT()
368  {
369  return new testDataFileIterator('rawTestData/Calculation/Financial/IPMT.data');
370  }
371 
375  public function testIRR()
376  {
377  $args = func_get_args();
378  $expectedResult = array_pop($args);
379  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','IRR'),$args);
380  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
381  }
382 
383  public function providerIRR()
384  {
385  return new testDataFileIterator('rawTestData/Calculation/Financial/IRR.data');
386  }
387 
391  public function testISPMT()
392  {
393  $args = func_get_args();
394  $expectedResult = array_pop($args);
395  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ISPMT'),$args);
396  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
397  }
398 
399  public function providerISPMT()
400  {
401  return new testDataFileIterator('rawTestData/Calculation/Financial/ISPMT.data');
402  }
403 
407  public function testMIRR()
408  {
409  $args = func_get_args();
410  $expectedResult = array_pop($args);
411  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','MIRR'),$args);
412  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
413  }
414 
415  public function providerMIRR()
416  {
417  return new testDataFileIterator('rawTestData/Calculation/Financial/MIRR.data');
418  }
419 
423  public function testNOMINAL()
424  {
425  $args = func_get_args();
426  $expectedResult = array_pop($args);
427  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NOMINAL'),$args);
428  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
429  }
430 
431  public function providerNOMINAL()
432  {
433  return new testDataFileIterator('rawTestData/Calculation/Financial/NOMINAL.data');
434  }
435 
439  public function testNPER()
440  {
441  $args = func_get_args();
442  $expectedResult = array_pop($args);
443  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPER'),$args);
444  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
445  }
446 
447  public function providerNPER()
448  {
449  return new testDataFileIterator('rawTestData/Calculation/Financial/NPER.data');
450  }
451 
455  public function testNPV()
456  {
457  $args = func_get_args();
458  $expectedResult = array_pop($args);
459  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPV'),$args);
460  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
461  }
462 
463  public function providerNPV()
464  {
465  return new testDataFileIterator('rawTestData/Calculation/Financial/NPV.data');
466  }
467 
471  public function testPRICE()
472  {
473  $args = func_get_args();
474  $expectedResult = array_pop($args);
475  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'),$args);
476  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
477  }
478 
479  public function providerPRICE()
480  {
481  return new testDataFileIterator('rawTestData/Calculation/Financial/PRICE.data');
482  }
483 
487  public function testRATE()
488  {
489  $args = func_get_args();
490  $expectedResult = array_pop($args);
491  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'),$args);
492  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
493  }
494 
495  public function providerRATE()
496  {
497  return new testDataFileIterator('rawTestData/Calculation/Financial/RATE.data');
498  }
499 
503  public function testXIRR()
504  {
505  $args = func_get_args();
506  $expectedResult = array_pop($args);
507  $result = call_user_func_array(array('PHPExcel_Calculation_Financial','XIRR'),$args);
508  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
509  }
510 
511  public function providerXIRR()
512  {
513  return new testDataFileIterator('rawTestData/Calculation/Financial/XIRR.data');
514  }
515 
516 }
testCOUPDAYS()
providerCOUPDAYS
testACCRINT()
providerACCRINT
testDB()
providerDB
testDOLLARDE()
providerDOLLARDE
$result
testNOMINAL()
providerNOMINAL
testRATE()
providerRATE
testFVSCHEDULE()
providerFVSCHEDULE
testACCRINTM()
providerACCRINTM
testMIRR()
providerMIRR
const COMPATIBILITY_EXCEL
constants
Definition: Functions.php:62
testCUMPRINC()
providerCUMPRINC
testXIRR()
providerXIRR
testISPMT()
providerISPMT
testIRR()
providerIRR
testIPMT()
providerIPMT
testDISC()
providerDISC
testFV()
providerFV
testCOUPNUM()
providerCOUPNUM
testCOUPDAYSNC()
providerCOUPDAYSNC
testINTRATE()
providerINTRATE
testEFFECT()
providerEFFECT
testCOUPPCD()
providerCOUPPCD
testDDB()
providerDDB
Create styles array
The data for the language used.
testCUMIPMT()
providerCUMIPMT
testNPER()
providerNPER
testDOLLARFR()
providerDOLLARFR
testAMORLINC()
providerAMORLINC
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
testCOUPDAYBS()
providerCOUPDAYBS
testAMORDEGRC()
providerAMORDEGRC
static setCompatibilityMode($compatibilityMode)
Definition: Functions.php:116
testNPV()
providerNPV
testPRICE()
providerPRICE
testCOUPNCD()
providerCOUPNCD