Permalink
Browse files

Merge pull request #56 from tedivm/test_change

Test Bootstrapper Updates
  • Loading branch information...
2 parents 7f47019 + 3d6f5c7 commit ef4b784d933ccc3c84aaccc066cb7d4f433ee6fd @tedivm tedivm committed Dec 28, 2012
Showing with 13 additions and 3 deletions.
  1. +8 −1 autoload.php
  2. +5 −2 tests/bootstrap.php
View
@@ -11,7 +11,14 @@
spl_autoload_register(function($class)
{
- $file = __DIR__.'/src/'.strtr($class, '\\', '/').'.php';
+ $base = '/src/';
+
+ if(strpos($class, 'Stash\Test') === 0)
+ {
+ $base = '/tests/';
+ }
+
+ $file = __DIR__.$base.strtr($class, '\\', '/').'.php';
if (file_exists($file)) {
require $file;
return true;
View
@@ -17,8 +17,11 @@
$filename = __DIR__ .'/../vendor/autoload.php';
if (!file_exists($filename)) {
- throw new Exception("You need to execute `composer install` before running the tests. (vendors are required for test execution)");
+ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" . PHP_EOL;
+ echo "You need to execute `composer install` before running the tests." . PHP_EOL;
+ echo "(vendors are required for test execution)" . PHP_EOL;
+ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" . PHP_EOL . PHP_EOL;
+ $filename = __DIR__ .'/../autoload.php';
}
require_once $filename;
-

0 comments on commit ef4b784

Please sign in to comment.