No Description

FileTest.php 999B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. require_once 'testDataFileIterator.php';
  3. class FileTest extends PHPUnit_Framework_TestCase
  4. {
  5. public function setUp()
  6. {
  7. if (!defined('PHPEXCEL_ROOT')) {
  8. define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
  9. }
  10. require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
  11. }
  12. public function testGetUseUploadTempDirectory()
  13. {
  14. $expectedResult = FALSE;
  15. $result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
  16. $this->assertEquals($expectedResult, $result);
  17. }
  18. public function testSetUseUploadTempDirectory()
  19. {
  20. $useUploadTempDirectoryValues = array(
  21. TRUE,
  22. FALSE,
  23. );
  24. foreach($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
  25. call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'),$useUploadTempDirectoryValue);
  26. $result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
  27. $this->assertEquals($useUploadTempDirectoryValue, $result);
  28. }
  29. }
  30. }