Skip to content

Commit

Permalink
Tests bootstrap - require InstalledVersions only if it's not declared…
Browse files Browse the repository at this point in the history
… yet
  • Loading branch information
ondrejmirtes committed Aug 22, 2022
1 parent cd71cf4 commit 54aff8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* file that was distributed with this source code.
*/

use Composer\InstalledVersions;
use Composer\Util\Platform;

error_reporting(E_ALL);
Expand All @@ -19,7 +20,11 @@
}

require __DIR__.'/../src/bootstrap.php';
require __DIR__.'/../src/Composer/InstalledVersions.php';

if (!class_exists(InstalledVersions::class, false)) {
require __DIR__.'/../src/Composer/InstalledVersions.php';
}

require __DIR__.'/Composer/Test/TestCase.php';

Platform::putEnv('COMPOSER_TESTS_ARE_RUNNING', '1');
Expand Down

0 comments on commit 54aff8f

Please sign in to comment.