summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-05-24 22:26:44 +0200
committerAndrey Andreev <narf@bofh.bg>2012-05-24 22:26:44 +0200
commit91900dd09b83ab61c9475c10c94a1fe01b684080 (patch)
tree721b370fc3d1a16c6f10e7470dce56893ab3d9b9
parent13d0575d9ba20a1e4bdebe00638a682e37b8bcb5 (diff)
parenteeca6d265c4e104e3a6b34b8581180d2926b3dba (diff)
Merge pull request #1393 from toopay/travis-ci
Backward compatibility
-rw-r--r--tests/Bootstrap.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index 71394720a..1dbd178ca 100644
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -13,11 +13,16 @@ define('APPPATH', PROJECT_BASE.'application/');
define('VIEWPATH', PROJECT_BASE.'');
// Get vfsStream either via PEAR or composer
-if (file_exists('vfsStream/vfsStream.php'))
+foreach (explode(PATH_SEPARATOR, get_include_path()) as $path)
{
- require_once 'vfsStream/vfsStream.php';
+ if (file_exists($path.DIRECTORY_SEPARATOR.'vfsStream/vfsStream.phps'))
+ {
+ require_once 'vfsStream/vfsStream.php';
+ break;
+ }
}
-else
+
+if ( ! class_exists('vfsStream') && file_exists(PROJECT_BASE.'vendor/autoload.php'))
{
include_once PROJECT_BASE.'vendor/autoload.php';
class_alias('org\bovigo\vfs\vfsStream', 'vfsStream');