2012-03-07 02:30:37 +01:00
|
|
|
<?php
|
|
|
|
|
2012-06-13 18:01:10 +02:00
|
|
|
if (file_exists($file = __DIR__.'/../vendor/autoload.php')) {
|
2012-03-07 02:30:37 +01:00
|
|
|
$loader = require_once $file;
|
|
|
|
} else {
|
|
|
|
throw new RuntimeException('Install dependencies to run test suite.');
|
|
|
|
}
|
|
|
|
|
|
|
|
spl_autoload_register(function($class) {
|
2013-03-27 18:44:06 +01:00
|
|
|
if (0 === strpos($class, 'FOS\\ElasticaBundle\\')) {
|
2012-03-07 02:30:37 +01:00
|
|
|
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
|
|
|
|
if (!stream_resolve_include_path($path)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
require_once $path;
|
|
|
|
return true;
|
|
|
|
}
|
2013-03-02 12:23:44 +01:00
|
|
|
return false;
|
2012-03-07 02:30:37 +01:00
|
|
|
});
|