Pascal Kriete | 69c97a7 | 2011-04-20 21:44:54 -0400 | [diff] [blame] | 1 | <?php |
| 2 | |
Pascal Kriete | f5aee9d | 2011-04-21 01:20:40 -0400 | [diff] [blame] | 3 | // Errors on full! |
Pascal Kriete | 69c97a7 | 2011-04-20 21:44:54 -0400 | [diff] [blame] | 4 | ini_set('display_errors', 1); |
| 5 | error_reporting(E_ALL | E_STRICT); |
| 6 | |
Pascal Kriete | f5aee9d | 2011-04-21 01:20:40 -0400 | [diff] [blame] | 7 | $dir = realpath(dirname(__FILE__)); |
Pascal Kriete | 69c97a7 | 2011-04-20 21:44:54 -0400 | [diff] [blame] | 8 | |
Pascal Kriete | f5aee9d | 2011-04-21 01:20:40 -0400 | [diff] [blame] | 9 | // Path constants |
| 10 | define('PROJECT_BASE', realpath($dir.'/../').'/'); |
Pascal Kriete | c5d93cb | 2011-04-21 00:58:51 -0400 | [diff] [blame] | 11 | define('BASEPATH', PROJECT_BASE.'system/'); |
| 12 | define('APPPATH', PROJECT_BASE.'application/'); |
Taufan Aditya | 8749bc7 | 2012-03-11 05:43:45 +0700 | [diff] [blame] | 13 | define('VIEWPATH', PROJECT_BASE.''); |
Pascal Kriete | 69c97a7 | 2011-04-20 21:44:54 -0400 | [diff] [blame] | 14 | |
Taufan Aditya | 6bca9f8 | 2012-05-25 01:55:36 +0700 | [diff] [blame^] | 15 | // Get vfsStream either via pear or composer |
| 16 | if (file_exists('vfsStream/vfsStream.php')) |
| 17 | { |
| 18 | require_once 'vfsStream/vfsStream.php'; |
| 19 | } |
| 20 | else |
| 21 | { |
| 22 | include_once '../vendor/autoload.php'; |
| 23 | } |
| 24 | |
Pascal Kriete | f5aee9d | 2011-04-21 01:20:40 -0400 | [diff] [blame] | 25 | // Prep our test environment |
Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 26 | include_once $dir.'/mocks/core/common.php'; |
| 27 | include_once $dir.'/mocks/autoloader.php'; |
| 28 | spl_autoload_register('autoload'); |
Pascal Kriete | f5aee9d | 2011-04-21 01:20:40 -0400 | [diff] [blame] | 29 | |
| 30 | unset($dir); |