Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated test suite to use composer loader

closes #81
  • Loading branch information...
commit d572ab53fece8287592d8599e8439d5771f10649 1 parent 5c7d052
@kriswallsmith authored
Showing with 16 additions and 10 deletions.
  1. +3 −0  .gitignore
  2. +13 −10 test/bootstrap.php
View
3  .gitignore
@@ -1 +1,4 @@
+composer.lock
+composer.phar
phpunit.xml
+vendor
View
23 test/bootstrap.php
@@ -1,12 +1,15 @@
<?php
-spl_autoload_register(function($class)
-{
- if (0 === strpos($class, 'Buzz\\')) {
- $file = __DIR__ . '/../lib/' . str_replace('\\', '/', $class) . '.php';
- if (file_exists($file)) {
- require_once $file;
- return true;
- }
- }
-});
+if (!$loader = @include __DIR__.'/../vendor/autoload.php') {
+ echo <<<EOM
+You must set up the project dependencies by running the following commands:
+
+ curl -s http://getcomposer.org/installer | php
+ php composer.phar install
+
+EOM;
+
+ exit(1);
+}
+
+$loader->add('Buzz\Test', __DIR__);
Please sign in to comment.
Something went wrong with that request. Please try again.