diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-05-24 21:32:47 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-05-24 21:32:47 +0200 |
commit | 13d0575d9ba20a1e4bdebe00638a682e37b8bcb5 (patch) | |
tree | ff6d371d275a558e0b4cc32a3a88f2ed544d2653 /tests/Bootstrap.php | |
parent | 55d3ad4faf2727b900832884e7c219076a255b66 (diff) | |
parent | 76e2f034f55b7e0f678f22043eb841b428377fa6 (diff) |
Merge pull request #1392 from toopay/travis-ci
Travis ci
Diffstat (limited to 'tests/Bootstrap.php')
-rw-r--r-- | tests/Bootstrap.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 9f89d1be8..71394720a 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -12,8 +12,20 @@ define('BASEPATH', PROJECT_BASE.'system/'); define('APPPATH', PROJECT_BASE.'application/'); define('VIEWPATH', PROJECT_BASE.''); +// Get vfsStream either via PEAR or composer +if (file_exists('vfsStream/vfsStream.php')) +{ + require_once 'vfsStream/vfsStream.php'; +} +else +{ + include_once PROJECT_BASE.'vendor/autoload.php'; + class_alias('org\bovigo\vfs\vfsStream', 'vfsStream'); + class_alias('org\bovigo\vfs\vfsStreamDirectory', 'vfsStreamDirectory'); + class_alias('org\bovigo\vfs\vfsStreamWrapper', 'vfsStreamWrapper'); +} + // Prep our test environment -require_once 'vfsStream/vfsStream.php'; include_once $dir.'/mocks/core/common.php'; include_once $dir.'/mocks/autoloader.php'; spl_autoload_register('autoload'); |