function ComposerIntegrationTest::testEmptyEnvironmentVariableIgnored

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

Tests that an empty COMPOSER_BIN_DIR environment variable is ignored.

File

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

Class

ComposerIntegrationTest
Tests Composer integration.

Namespace

Drupal\Tests\Composer

Code

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

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