Sin descripción

bootstrap.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * $Id: bootstrap.php 2892 2011-08-14 15:11:50Z markbaker@phpexcel.net $
  4. *
  5. * @copyright Copyright (C) 2011-2014 PHPExcel. All rights reserved.
  6. * @package PHPExcel
  7. * @subpackage PHPExcel Unit Tests
  8. * @author Mark Baker
  9. */
  10. chdir(dirname(__FILE__));
  11. setlocale(LC_ALL, 'en_US.utf8');
  12. // PHP 5.3 Compat
  13. date_default_timezone_set('Europe/London');
  14. // Define path to application directory
  15. defined('APPLICATION_PATH')
  16. || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../Classes'));
  17. // Define path to application tests directory
  18. defined('APPLICATION_TESTS_PATH')
  19. || define('APPLICATION_TESTS_PATH', realpath(dirname(__FILE__) ));
  20. // Define application environment
  21. defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'ci');
  22. // Ensure library/ is on include_path
  23. set_include_path(implode(PATH_SEPARATOR, array(
  24. realpath(APPLICATION_PATH . '/../Classes'),
  25. './',
  26. dirname(__FILE__),
  27. get_include_path(),
  28. )));
  29. /**
  30. * @todo Sort out xdebug in vagrant so that this works in all sandboxes
  31. * For now, it is safer to test for it rather then remove it.
  32. */
  33. echo "PHPExcel tests beginning\n";
  34. if(extension_loaded('xdebug')) {
  35. echo "Xdebug extension loaded and running\n";
  36. xdebug_enable();
  37. } else {
  38. echo 'Xdebug not found, you should run the following at the command line: echo "zend_extension=/usr/lib64/php/modules/xdebug.so" > /etc/php.d/xdebug.ini' . "\n";
  39. }