FOSElasticaBundle/Tests/bootstrap.php
cevou cbe6071969 Code cleanup
- updated deprecated calls
- cleaned up PHPDoc comments
2013-03-02 12:23:44 +01:00

19 lines
543 B
PHP

<?php
if (file_exists($file = __DIR__.'/../vendor/autoload.php')) {
$loader = require_once $file;
} else {
throw new RuntimeException('Install dependencies to run test suite.');
}
spl_autoload_register(function($class) {
if (0 === strpos($class, 'FOQ\\ElasticaBundle\\')) {
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
if (!stream_resolve_include_path($path)) {
return false;
}
require_once $path;
return true;
}
return false;
});