| 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 |
|
| 11 |
chdir(dirname(__FILE__)); |
| 12 |
|
| 13 |
setlocale(LC_ALL, 'en_US.utf8'); |
| 14 |
|
| 15 |
// PHP 5.3 Compat |
| 16 |
date_default_timezone_set('Europe/London'); |
| 17 |
|
| 18 |
// Define path to application directory |
| 19 |
defined('APPLICATION_PATH') |
| 20 |
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../Classes')); |
| 21 |
|
| 22 |
// Define path to application tests directory |
| 23 |
defined('APPLICATION_TESTS_PATH') |
| 24 |
|| define('APPLICATION_TESTS_PATH', realpath(dirname(__FILE__) )); |
| 25 |
|
| 26 |
// Define application environment |
| 27 |
defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'ci'); |
| 28 |
|
| 29 |
// Ensure library/ is on include_path |
| 30 |
set_include_path(implode(PATH_SEPARATOR, array( |
| 31 |
realpath(APPLICATION_PATH . '/../Classes'), |
| 32 |
'./', |
| 33 |
dirname(__FILE__), |
| 34 |
get_include_path(), |
| 35 |
))); |
| 36 |
|
| 37 |
|
| 38 |
/** |
| 39 |
* @todo Sort out xdebug in vagrant so that this works in all sandboxes |
| 40 |
* For now, it is safer to test for it rather then remove it. |
| 41 |
*/ |
| 42 |
echo "PHPExcel tests beginning\n"; |
| 43 |
|
| 44 |
if(extension_loaded('xdebug')) { |
| 45 |
echo "Xdebug extension loaded and running\n"; |
| 46 |
xdebug_enable(); |
| 47 |
} else { |
| 48 |
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"; |
| 49 |
} |
| 50 |
|