summaryrefslogtreecommitdiffstats
path: root/tests/Bootstrap.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Bootstrap.php')
-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');