No Description

EngineeringTest.php 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. <?php
  2. // Custom assertion class for handling precision of Complex numbers
  3. require_once 'custom/complexAssert.php';
  4. // Data Provider handler
  5. require_once 'testDataFileIterator.php';
  6. class EngineeringTest extends PHPUnit_Framework_TestCase
  7. {
  8. public function setUp()
  9. {
  10. if (!defined('PHPEXCEL_ROOT'))
  11. {
  12. define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
  13. }
  14. require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
  15. PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL);
  16. }
  17. /**
  18. * @dataProvider providerBESSELI
  19. */
  20. public function testBESSELI()
  21. {
  22. $args = func_get_args();
  23. $expectedResult = array_pop($args);
  24. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'),$args);
  25. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  26. }
  27. public function providerBESSELI()
  28. {
  29. return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELI.data');
  30. }
  31. /**
  32. * @dataProvider providerBESSELJ
  33. */
  34. public function testBESSELJ()
  35. {
  36. $args = func_get_args();
  37. $expectedResult = array_pop($args);
  38. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'),$args);
  39. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  40. }
  41. public function providerBESSELJ()
  42. {
  43. return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELJ.data');
  44. }
  45. /**
  46. * @dataProvider providerBESSELK
  47. */
  48. public function testBESSELK()
  49. {
  50. $args = func_get_args();
  51. $expectedResult = array_pop($args);
  52. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'),$args);
  53. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  54. }
  55. public function providerBESSELK()
  56. {
  57. return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELK.data');
  58. }
  59. /**
  60. * @dataProvider providerBESSELY
  61. */
  62. public function testBESSELY()
  63. {
  64. $args = func_get_args();
  65. $expectedResult = array_pop($args);
  66. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'),$args);
  67. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  68. }
  69. public function providerBESSELY()
  70. {
  71. return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELY.data');
  72. }
  73. /**
  74. * @dataProvider providerCOMPLEX
  75. */
  76. public function testCOMPLEX()
  77. {
  78. $args = func_get_args();
  79. $expectedResult = array_pop($args);
  80. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','COMPLEX'),$args);
  81. $this->assertEquals($expectedResult, $result);
  82. }
  83. public function providerCOMPLEX()
  84. {
  85. return new testDataFileIterator('rawTestData/Calculation/Engineering/COMPLEX.data');
  86. }
  87. /**
  88. * @dataProvider providerIMAGINARY
  89. */
  90. public function testIMAGINARY()
  91. {
  92. $args = func_get_args();
  93. $expectedResult = array_pop($args);
  94. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'),$args);
  95. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  96. }
  97. public function providerIMAGINARY()
  98. {
  99. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMAGINARY.data');
  100. }
  101. /**
  102. * @dataProvider providerIMREAL
  103. */
  104. public function testIMREAL()
  105. {
  106. $args = func_get_args();
  107. $expectedResult = array_pop($args);
  108. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'),$args);
  109. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  110. }
  111. public function providerIMREAL()
  112. {
  113. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMREAL.data');
  114. }
  115. /**
  116. * @dataProvider providerIMABS
  117. */
  118. public function testIMABS()
  119. {
  120. $args = func_get_args();
  121. $expectedResult = array_pop($args);
  122. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'),$args);
  123. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  124. }
  125. public function providerIMABS()
  126. {
  127. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMABS.data');
  128. }
  129. /**
  130. * @dataProvider providerIMARGUMENT
  131. */
  132. public function testIMARGUMENT()
  133. {
  134. $args = func_get_args();
  135. $expectedResult = array_pop($args);
  136. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'),$args);
  137. $this->assertEquals($expectedResult, $result, NULL, 1E-8);
  138. }
  139. public function providerIMARGUMENT()
  140. {
  141. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMARGUMENT.data');
  142. }
  143. /**
  144. * @dataProvider providerIMCONJUGATE
  145. */
  146. public function testIMCONJUGATE()
  147. {
  148. $args = func_get_args();
  149. $expectedResult = array_pop($args);
  150. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCONJUGATE'),$args);
  151. $complexAssert = new complexAssert();
  152. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  153. $complexAssert->getErrorMessage());
  154. }
  155. public function providerIMCONJUGATE()
  156. {
  157. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMCONJUGATE.data');
  158. }
  159. /**
  160. * @dataProvider providerIMCOS
  161. */
  162. public function testIMCOS()
  163. {
  164. $args = func_get_args();
  165. $expectedResult = array_pop($args);
  166. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCOS'),$args);
  167. $complexAssert = new complexAssert();
  168. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  169. $complexAssert->getErrorMessage());
  170. }
  171. public function providerIMCOS()
  172. {
  173. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMCOS.data');
  174. }
  175. /**
  176. * @dataProvider providerIMDIV
  177. */
  178. public function testIMDIV()
  179. {
  180. $args = func_get_args();
  181. $expectedResult = array_pop($args);
  182. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMDIV'),$args);
  183. $complexAssert = new complexAssert();
  184. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  185. $complexAssert->getErrorMessage());
  186. }
  187. public function providerIMDIV()
  188. {
  189. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMDIV.data');
  190. }
  191. /**
  192. * @dataProvider providerIMEXP
  193. */
  194. public function testIMEXP()
  195. {
  196. $args = func_get_args();
  197. $expectedResult = array_pop($args);
  198. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMEXP'),$args);
  199. $complexAssert = new complexAssert();
  200. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  201. $complexAssert->getErrorMessage());
  202. }
  203. public function providerIMEXP()
  204. {
  205. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMEXP.data');
  206. }
  207. /**
  208. * @dataProvider providerIMLN
  209. */
  210. public function testIMLN()
  211. {
  212. $args = func_get_args();
  213. $expectedResult = array_pop($args);
  214. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLN'),$args);
  215. $complexAssert = new complexAssert();
  216. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  217. $complexAssert->getErrorMessage());
  218. }
  219. public function providerIMLN()
  220. {
  221. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMLN.data');
  222. }
  223. /**
  224. * @dataProvider providerIMLOG2
  225. */
  226. public function testIMLOG2()
  227. {
  228. $args = func_get_args();
  229. $expectedResult = array_pop($args);
  230. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG2'),$args);
  231. $complexAssert = new complexAssert();
  232. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  233. $complexAssert->getErrorMessage());
  234. }
  235. public function providerIMLOG2()
  236. {
  237. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMLOG2.data');
  238. }
  239. /**
  240. * @dataProvider providerIMLOG10
  241. */
  242. public function testIMLOG10()
  243. {
  244. $args = func_get_args();
  245. $expectedResult = array_pop($args);
  246. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG10'),$args);
  247. $complexAssert = new complexAssert();
  248. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  249. $complexAssert->getErrorMessage());
  250. }
  251. public function providerIMLOG10()
  252. {
  253. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMLOG10.data');
  254. }
  255. /**
  256. * @dataProvider providerIMPOWER
  257. */
  258. public function testIMPOWER()
  259. {
  260. $args = func_get_args();
  261. $expectedResult = array_pop($args);
  262. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPOWER'),$args);
  263. $complexAssert = new complexAssert();
  264. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  265. $complexAssert->getErrorMessage());
  266. }
  267. public function providerIMPOWER()
  268. {
  269. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMPOWER.data');
  270. }
  271. /**
  272. * @dataProvider providerIMPRODUCT
  273. */
  274. public function testIMPRODUCT()
  275. {
  276. $args = func_get_args();
  277. $expectedResult = array_pop($args);
  278. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPRODUCT'),$args);
  279. $complexAssert = new complexAssert();
  280. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  281. $complexAssert->getErrorMessage());
  282. }
  283. public function providerIMPRODUCT()
  284. {
  285. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMPRODUCT.data');
  286. }
  287. /**
  288. * @dataProvider providerIMSIN
  289. */
  290. public function testIMSIN()
  291. {
  292. $args = func_get_args();
  293. $expectedResult = array_pop($args);
  294. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSIN'),$args);
  295. $complexAssert = new complexAssert();
  296. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  297. $complexAssert->getErrorMessage());
  298. }
  299. public function providerIMSIN()
  300. {
  301. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSIN.data');
  302. }
  303. /**
  304. * @dataProvider providerIMSQRT
  305. */
  306. public function testIMSQRT()
  307. {
  308. $args = func_get_args();
  309. $expectedResult = array_pop($args);
  310. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSQRT'),$args);
  311. $complexAssert = new complexAssert();
  312. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  313. $complexAssert->getErrorMessage());
  314. }
  315. public function providerIMSQRT()
  316. {
  317. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSQRT.data');
  318. }
  319. /**
  320. * @dataProvider providerIMSUB
  321. */
  322. public function testIMSUB()
  323. {
  324. $args = func_get_args();
  325. $expectedResult = array_pop($args);
  326. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUB'),$args);
  327. $complexAssert = new complexAssert();
  328. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  329. $complexAssert->getErrorMessage());
  330. }
  331. public function providerIMSUB()
  332. {
  333. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSUB.data');
  334. }
  335. /**
  336. * @dataProvider providerIMSUM
  337. */
  338. public function testIMSUM()
  339. {
  340. $args = func_get_args();
  341. $expectedResult = array_pop($args);
  342. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUM'),$args);
  343. $complexAssert = new complexAssert();
  344. $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
  345. $complexAssert->getErrorMessage());
  346. }
  347. public function providerIMSUM()
  348. {
  349. return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSUM.data');
  350. }
  351. /**
  352. * @dataProvider providerERF
  353. */
  354. public function testERF()
  355. {
  356. $args = func_get_args();
  357. $expectedResult = array_pop($args);
  358. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'),$args);
  359. $this->assertEquals($expectedResult, $result, NULL, 1E-12);
  360. }
  361. public function providerERF()
  362. {
  363. return new testDataFileIterator('rawTestData/Calculation/Engineering/ERF.data');
  364. }
  365. /**
  366. * @dataProvider providerERFC
  367. */
  368. public function testERFC()
  369. {
  370. $args = func_get_args();
  371. $expectedResult = array_pop($args);
  372. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'),$args);
  373. $this->assertEquals($expectedResult, $result, NULL, 1E-12);
  374. }
  375. public function providerERFC()
  376. {
  377. return new testDataFileIterator('rawTestData/Calculation/Engineering/ERFC.data');
  378. }
  379. /**
  380. * @dataProvider providerBIN2DEC
  381. */
  382. public function testBIN2DEC()
  383. {
  384. $args = func_get_args();
  385. $expectedResult = array_pop($args);
  386. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTODEC'),$args);
  387. $this->assertEquals($expectedResult, $result);
  388. }
  389. public function providerBIN2DEC()
  390. {
  391. return new testDataFileIterator('rawTestData/Calculation/Engineering/BIN2DEC.data');
  392. }
  393. /**
  394. * @dataProvider providerBIN2HEX
  395. */
  396. public function testBIN2HEX()
  397. {
  398. $args = func_get_args();
  399. $expectedResult = array_pop($args);
  400. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOHEX'),$args);
  401. $this->assertEquals($expectedResult, $result);
  402. }
  403. public function providerBIN2HEX()
  404. {
  405. return new testDataFileIterator('rawTestData/Calculation/Engineering/BIN2HEX.data');
  406. }
  407. /**
  408. * @dataProvider providerBIN2OCT
  409. */
  410. public function testBIN2OCT()
  411. {
  412. $args = func_get_args();
  413. $expectedResult = array_pop($args);
  414. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOOCT'),$args);
  415. $this->assertEquals($expectedResult, $result);
  416. }
  417. public function providerBIN2OCT()
  418. {
  419. return new testDataFileIterator('rawTestData/Calculation/Engineering/BIN2OCT.data');
  420. }
  421. /**
  422. * @dataProvider providerDEC2BIN
  423. */
  424. public function testDEC2BIN()
  425. {
  426. $args = func_get_args();
  427. $expectedResult = array_pop($args);
  428. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'),$args);
  429. $this->assertEquals($expectedResult, $result, NULL);
  430. }
  431. public function providerDEC2BIN()
  432. {
  433. return new testDataFileIterator('rawTestData/Calculation/Engineering/DEC2BIN.data');
  434. }
  435. /**
  436. * @dataProvider providerDEC2HEX
  437. */
  438. public function testDEC2HEX()
  439. {
  440. $args = func_get_args();
  441. $expectedResult = array_pop($args);
  442. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'),$args);
  443. $this->assertEquals($expectedResult, $result, NULL);
  444. }
  445. public function providerDEC2HEX()
  446. {
  447. return new testDataFileIterator('rawTestData/Calculation/Engineering/DEC2HEX.data');
  448. }
  449. /**
  450. * @dataProvider providerDEC2OCT
  451. */
  452. public function testDEC2OCT()
  453. {
  454. $args = func_get_args();
  455. $expectedResult = array_pop($args);
  456. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'),$args);
  457. $this->assertEquals($expectedResult, $result, NULL);
  458. }
  459. public function providerDEC2OCT()
  460. {
  461. return new testDataFileIterator('rawTestData/Calculation/Engineering/DEC2OCT.data');
  462. }
  463. /**
  464. * @dataProvider providerHEX2BIN
  465. */
  466. public function testHEX2BIN()
  467. {
  468. $args = func_get_args();
  469. $expectedResult = array_pop($args);
  470. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'),$args);
  471. $this->assertEquals($expectedResult, $result, NULL);
  472. }
  473. public function providerHEX2BIN()
  474. {
  475. return new testDataFileIterator('rawTestData/Calculation/Engineering/HEX2BIN.data');
  476. }
  477. /**
  478. * @dataProvider providerHEX2DEC
  479. */
  480. public function testHEX2DEC()
  481. {
  482. $args = func_get_args();
  483. $expectedResult = array_pop($args);
  484. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'),$args);
  485. $this->assertEquals($expectedResult, $result, NULL);
  486. }
  487. public function providerHEX2DEC()
  488. {
  489. return new testDataFileIterator('rawTestData/Calculation/Engineering/HEX2DEC.data');
  490. }
  491. /**
  492. * @dataProvider providerHEX2OCT
  493. */
  494. public function testHEX2OCT()
  495. {
  496. $args = func_get_args();
  497. $expectedResult = array_pop($args);
  498. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'),$args);
  499. $this->assertEquals($expectedResult, $result, NULL);
  500. }
  501. public function providerHEX2OCT()
  502. {
  503. return new testDataFileIterator('rawTestData/Calculation/Engineering/HEX2OCT.data');
  504. }
  505. /**
  506. * @dataProvider providerOCT2BIN
  507. */
  508. public function testOCT2BIN()
  509. {
  510. $args = func_get_args();
  511. $expectedResult = array_pop($args);
  512. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'),$args);
  513. $this->assertEquals($expectedResult, $result, NULL);
  514. }
  515. public function providerOCT2BIN()
  516. {
  517. return new testDataFileIterator('rawTestData/Calculation/Engineering/OCT2BIN.data');
  518. }
  519. /**
  520. * @dataProvider providerOCT2DEC
  521. */
  522. public function testOCT2DEC()
  523. {
  524. $args = func_get_args();
  525. $expectedResult = array_pop($args);
  526. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'),$args);
  527. $this->assertEquals($expectedResult, $result, NULL);
  528. }
  529. public function providerOCT2DEC()
  530. {
  531. return new testDataFileIterator('rawTestData/Calculation/Engineering/OCT2DEC.data');
  532. }
  533. /**
  534. * @dataProvider providerOCT2HEX
  535. */
  536. public function testOCT2HEX()
  537. {
  538. $args = func_get_args();
  539. $expectedResult = array_pop($args);
  540. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'),$args);
  541. $this->assertEquals($expectedResult, $result, NULL);
  542. }
  543. public function providerOCT2HEX()
  544. {
  545. return new testDataFileIterator('rawTestData/Calculation/Engineering/OCT2HEX.data');
  546. }
  547. /**
  548. * @dataProvider providerDELTA
  549. */
  550. public function testDELTA()
  551. {
  552. $args = func_get_args();
  553. $expectedResult = array_pop($args);
  554. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'),$args);
  555. $this->assertEquals($expectedResult, $result, NULL);
  556. }
  557. public function providerDELTA()
  558. {
  559. return new testDataFileIterator('rawTestData/Calculation/Engineering/DELTA.data');
  560. }
  561. /**
  562. * @dataProvider providerGESTEP
  563. */
  564. public function testGESTEP()
  565. {
  566. $args = func_get_args();
  567. $expectedResult = array_pop($args);
  568. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'),$args);
  569. $this->assertEquals($expectedResult, $result, NULL);
  570. }
  571. public function providerGESTEP()
  572. {
  573. return new testDataFileIterator('rawTestData/Calculation/Engineering/GESTEP.data');
  574. }
  575. public function testGetConversionGroups()
  576. {
  577. $result = PHPExcel_Calculation_Engineering::getConversionGroups();
  578. $this->assertInternalType('array', $result);
  579. }
  580. public function testGetConversionGroupUnits()
  581. {
  582. $result = PHPExcel_Calculation_Engineering::getConversionGroupUnits();
  583. $this->assertInternalType('array', $result);
  584. }
  585. public function testGetConversionGroupUnitDetails()
  586. {
  587. $result = PHPExcel_Calculation_Engineering::getConversionGroupUnitDetails();
  588. $this->assertInternalType('array', $result);
  589. }
  590. public function testGetConversionMultipliers()
  591. {
  592. $result = PHPExcel_Calculation_Engineering::getConversionMultipliers();
  593. $this->assertInternalType('array', $result);
  594. }
  595. /**
  596. * @dataProvider providerCONVERTUOM
  597. */
  598. public function testCONVERTUOM()
  599. {
  600. $args = func_get_args();
  601. $expectedResult = array_pop($args);
  602. $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'),$args);
  603. $this->assertEquals($expectedResult, $result, NULL);
  604. }
  605. public function providerCONVERTUOM()
  606. {
  607. return new testDataFileIterator('rawTestData/Calculation/Engineering/CONVERTUOM.data');
  608. }
  609. }