function ComposerIntegrationTest::testBinDir

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

Tests bin dir resolution against composer.json contents.

Attributes

#[DataProvider('providerBinDir')]

Parameters

array|null $composer: The decoded composer.json contents, or NULL to omit the file.

string $expected: The expected bin dir, relative to the project root.

File

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

Class

ComposerIntegrationTest
Tests Composer integration.

Namespace

Drupal\Tests\Composer

Code

public function testBinDir(?array $composer, string $expected) : void {
  $root = $this->createProjectRoot($composer);
  $this->assertSame($root . '/' . $expected, self::binDir($root));
}

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