 09d456e477
			
		
	
	
		09d456e477
		
			
		
	
	
	
	
		
			
			PHP-CS-Fixer allow to check different things than phpcs and it allows code to be more consistent. Configuration can be changed in `.php_cs`
		
			
				
	
	
		
			49 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @copyright   Copyright (C) 2011-2014 PhpSpreadsheet. All rights reserved.
 | |
|  * @author      Mark Baker
 | |
|  */
 | |
| chdir(dirname(__FILE__));
 | |
| 
 | |
| setlocale(LC_ALL, 'en_US.utf8');
 | |
| 
 | |
| // PHP 5.3 Compat
 | |
| date_default_timezone_set('Europe/London');
 | |
| 
 | |
| // Define path to application directory
 | |
| defined('APPLICATION_PATH')
 | |
|     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../src'));
 | |
| 
 | |
| // Define path to application tests directory
 | |
| defined('APPLICATION_TESTS_PATH')
 | |
|     || define('APPLICATION_TESTS_PATH', realpath(dirname(__FILE__)));
 | |
| 
 | |
| // Define application environment
 | |
| defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'ci');
 | |
| 
 | |
| // Ensure library/ is on include_path
 | |
| set_include_path(implode(PATH_SEPARATOR, [
 | |
|     realpath(APPLICATION_PATH . '/../src'),
 | |
|     './',
 | |
|     dirname(__FILE__),
 | |
|     get_include_path(),
 | |
| ]));
 | |
| 
 | |
| if (!defined('PHPSPREADSHEET_ROOT')) {
 | |
|     define('PHPSPREADSHEET_ROOT', APPLICATION_PATH . '/');
 | |
| }
 | |
| require_once PHPSPREADSHEET_ROOT . 'Bootstrap.php';
 | |
| 
 | |
| /*
 | |
|  * @todo Sort out xdebug in vagrant so that this works in all sandboxes
 | |
|  * For now, it is safer to test for it rather then remove it.
 | |
|  */
 | |
| echo "PhpSpreadsheet tests beginning\n";
 | |
| 
 | |
| if (extension_loaded('xdebug')) {
 | |
|     echo "Xdebug extension loaded and running\n";
 | |
|     xdebug_enable();
 | |
| } else {
 | |
|     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";
 | |
| }
 |