summaryrefslogtreecommitdiffstats
path: root/Tests/bootstrap.php
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/bootstrap.php')
-rw-r--r--Tests/bootstrap.php30
1 files changed, 4 insertions, 26 deletions
diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php
index b154988..84ae3a6 100644
--- a/Tests/bootstrap.php
+++ b/Tests/bootstrap.php
@@ -10,35 +10,13 @@
*/
spl_autoload_register(function ($class) {
- foreach (array(
- 'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation',
- 'SYMFONY_HTTP_KERNEL' => 'HttpKernel',
- 'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher',
- 'SYMFONY_FORM' => 'Form',
- 'SYMFONY_ROUTING' => 'Routing',
- ) as $env => $name) {
- if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) {
- if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) {
- require_once $file;
- }
- }
- }
-
- if (isset($_SERVER['DOCTRINE_DBAL']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\DBAL')) {
- if (file_exists($file = $_SERVER['DOCTRINE_DBAL'].'/lib/'.str_replace('\\', '/', $class).'.php')) {
- require_once $file;
- }
- }
-
- if (isset($_SERVER['DOCTRINE_COMMON']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common')) {
- if (file_exists($file = $_SERVER['DOCTRINE_COMMON'].'/lib/'.str_replace('\\', '/', $class).'.php')) {
- require_once $file;
- }
- }
-
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Security')) {
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Security')).'.php')) {
require_once $file;
}
}
});
+
+if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
+ require_once $loader;
+}