function ComposerIntegrationTest::testEnvironmentVariableOverride

Same name and namespace in other branches
  1. main core/tests/Drupal/Tests/Composer/ComposerIntegrationTest.php \Drupal\Tests\Composer\ComposerIntegrationTest::testEnvironmentVariableOverride()

Tests that the COMPOSER_BIN_DIR environment variable takes precedence.

File

core/tests/Drupal/Tests/Composer/ComposerIntegrationTest.php, line 142

Class

ComposerIntegrationTest
Tests Composer integration.

Namespace

Drupal\Tests\Composer

Code

public function testEnvironmentVariableOverride() : void {
  $root = $this->createProjectRoot([
    'config' => [
      'bin-dir' => 'tools',
    ],
  ]);
  putenv('COMPOSER_BIN_DIR=env-bin');
  $this->assertSame($root . '/env-bin', self::binDir($root));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.