Skip to content

Commit dbc451e

Browse files
Fix
1 parent 2d47958 commit dbc451e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

phpunit

+8-3
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,21 @@
3535
* POSSIBILITY OF SUCH DAMAGE.
3636
*/
3737

38-
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
38+
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')) {
3946
die(
4047
'You need to set up the project dependencies using the following commands:' . PHP_EOL .
4148
'wget http://getcomposer.org/composer.phar' . PHP_EOL .
4249
'php composer.phar install' . PHP_EOL
4350
);
4451
}
4552

46-
define('PHPUNIT_COMPOSER_INSTALL', __DIR__ . '/vendor/autoload.php');
47-
4853
require PHPUNIT_COMPOSER_INSTALL;
4954

5055
PHPUnit_TextUI_Command::main();

0 commit comments

Comments
 (0)