We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d47958 commit dbc451eCopy full SHA for dbc451e
phpunit
@@ -35,16 +35,21 @@
35
* POSSIBILITY OF SUCH DAMAGE.
36
*/
37
38
-if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
+foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
39
+ if (file_exists($file)) {
40
+ define('PHPUNIT_COMPOSER_INSTALL', $file);
41
+ break;
42
+ }
43
+}
44
+
45
+if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
46
die(
47
'You need to set up the project dependencies using the following commands:' . PHP_EOL .
48
'wget http://getcomposer.org/composer.phar' . PHP_EOL .
49
'php composer.phar install' . PHP_EOL
50
);
51
}
52
-define('PHPUNIT_COMPOSER_INSTALL', __DIR__ . '/vendor/autoload.php');
-
53
require PHPUNIT_COMPOSER_INSTALL;
54
55
PHPUnit_TextUI_Command::main();
0 commit comments