Skip to content
Browse files

require composer autoload if it's there

  • Loading branch information...
1 parent 906b281 commit f75f6c60a9600c169aaeaca35c6a4c0755b3f556 Kevin Burke committed
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/Bootstrap.php
View
9 tests/Bootstrap.php
@@ -10,7 +10,14 @@
$path = array($library, $tests, get_include_path());
set_include_path(implode(PATH_SEPARATOR, $path));
-require_once 'Mockery/Loader.php';
+$vendorFilename = dirname(__FILE__) . '/../vendor/autoload.php';
+if (file_exists($vendorFilename)) {
+ /* composer install */
+ require $vendorFilename;
+} else {
+ /* hope you have it installed somewhere. */
+ require_once 'Mockery/Loader.php';
+}
$loader = new \Mockery\Loader;
$loader->register();

0 comments on commit f75f6c6

Please sign in to comment.
Something went wrong with that request. Please try again.