blob: 71394720ada56910034d5f5c4cfe6fe956484355 [file] [log] [blame]
Pascal Kriete69c97a72011-04-20 21:44:54 -04001<?php
2
Pascal Krietef5aee9d2011-04-21 01:20:40 -04003// Errors on full!
Pascal Kriete69c97a72011-04-20 21:44:54 -04004ini_set('display_errors', 1);
5error_reporting(E_ALL | E_STRICT);
6
Pascal Krietef5aee9d2011-04-21 01:20:40 -04007$dir = realpath(dirname(__FILE__));
Pascal Kriete69c97a72011-04-20 21:44:54 -04008
Pascal Krietef5aee9d2011-04-21 01:20:40 -04009// Path constants
10define('PROJECT_BASE', realpath($dir.'/../').'/');
Pascal Krietec5d93cb2011-04-21 00:58:51 -040011define('BASEPATH', PROJECT_BASE.'system/');
12define('APPPATH', PROJECT_BASE.'application/');
Taufan Aditya8749bc72012-03-11 05:43:45 +070013define('VIEWPATH', PROJECT_BASE.'');
Pascal Kriete69c97a72011-04-20 21:44:54 -040014
Taufan Adityae13511a2012-05-25 02:15:42 +070015// Get vfsStream either via PEAR or composer
Taufan Aditya6bca9f82012-05-25 01:55:36 +070016if (file_exists('vfsStream/vfsStream.php'))
17{
18 require_once 'vfsStream/vfsStream.php';
19}
20else
21{
Taufan Adityae13511a2012-05-25 02:15:42 +070022 include_once PROJECT_BASE.'vendor/autoload.php';
23 class_alias('org\bovigo\vfs\vfsStream', 'vfsStream');
24 class_alias('org\bovigo\vfs\vfsStreamDirectory', 'vfsStreamDirectory');
25 class_alias('org\bovigo\vfs\vfsStreamWrapper', 'vfsStreamWrapper');
Taufan Aditya6bca9f82012-05-25 01:55:36 +070026}
27
Pascal Krietef5aee9d2011-04-21 01:20:40 -040028// Prep our test environment
Taufan Adityaca16c4f2012-03-28 15:15:30 +070029include_once $dir.'/mocks/core/common.php';
30include_once $dir.'/mocks/autoloader.php';
31spl_autoload_register('autoload');
Pascal Krietef5aee9d2011-04-21 01:20:40 -040032
33unset($dir);