Permalink
Browse files

Use Composer autoloader in test bootstrap

  • Loading branch information...
1 parent b5c5d04 commit b8c1b54b870c4fecc87d4daae44b34c262b0e6f8 @jmikola jmikola committed Jun 27, 2012
Showing with 3 additions and 7 deletions.
  1. +3 −7 tests/bootstrap.php
View
@@ -1,13 +1,9 @@
<?php
-$file = __DIR__.'/../vendor/autoload.php';
-if (!file_exists($file)) {
+if (!file_exists($file = __DIR__.'/../vendor/autoload.php')) {
throw new RuntimeException('Install dependencies to run test suite.');
}
-require_once $file;
+$loader = require_once $file;
-use Doctrine\Common\ClassLoader;
-
-$classLoader = new ClassLoader('Doctrine\MongoDB\Tests', __DIR__ . '/../tests');
-$classLoader->register();
+$loader->add('Doctrine\MongoDB\Tests', __DIR__ . '/../tests');

0 comments on commit b8c1b54

Please sign in to comment.