Permalink
Browse files

Use composer for test suite

  • Loading branch information...
1 parent 1a8380f commit 9114efef7782ae343d775caa863e139f0730d7fe @jmikola jmikola committed Jun 20, 2012
Showing with 13 additions and 12 deletions.
  1. +5 −0 .gitignore
  2. +0 −3 .gitmodules
  3. +2 −1 .travis.yml
  4. +0 −1 lib/vendor/doctrine-common
  5. +6 −7 tests/bootstrap.php
View
@@ -0,0 +1,5 @@
+phpunit.xml
+vendor
+composer.lock
+composer.phar
+
View
@@ -1,3 +0,0 @@
-[submodule "lib/vendor/doctrine-common"]
- path = lib/vendor/doctrine-common
- url = git://github.com/doctrine/common.git
View
@@ -9,4 +9,5 @@ before_script:
- tar -xzf mongo-1.2.7.tgz
- sh -c "cd mongo-1.2.7 && phpize && ./configure --enable-mongo && make && sudo make install"
- echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
- - git submodule update --init
+ - wget -nc http://getcomposer.org/composer.phar
+ - php composer.phar install
Submodule doctrine-common deleted from fc26d1
View
@@ -1,14 +1,13 @@
<?php
-require_once __DIR__ . '/../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
+$file = __DIR__.'/../vendor/autoload.php';
+if (!file_exists($file)) {
+ throw new RuntimeException('Install dependencies to run test suite.');
+}
+
+require_once $file;
use Doctrine\Common\ClassLoader;
$classLoader = new ClassLoader('Doctrine\MongoDB\Tests', __DIR__ . '/../tests');
$classLoader->register();
-
-$classLoader = new ClassLoader('Doctrine\MongoDB', __DIR__ . '/../lib');
-$classLoader->register();
-
-$classLoader = new ClassLoader('Doctrine\Common', __DIR__ . '/../lib/vendor/doctrine-common/lib');
-$classLoader->register();

0 comments on commit 9114efe

Please sign in to comment.