function BuilderTest::testBuilder

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php \Drupal\Tests\Composer\Generator\BuilderTest::testBuilder()
  2. 8.9.x core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php \Drupal\Tests\Composer\Generator\BuilderTest::testBuilder()
  3. 11.x core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php \Drupal\Tests\Composer\Generator\BuilderTest::testBuilder()

Tests all of the various kinds of builders.

@dataProvider builderTestData

File

core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php, line 91

Class

BuilderTest
Test DrupalCoreRecommendedBuilder.

Namespace

Drupal\Tests\Composer\Generator

Code

public function testBuilder($builderClass, $expected) : void {
    $fixtures = new Fixtures();
    $drupalCoreInfo = $fixtures->drupalCoreComposerFixture();
    $builder = new $builderClass($drupalCoreInfo);
    $generatedJson = $builder->getPackage();
    $this->assertEquals($expected, $generatedJson);
}

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