You are here

public function BuilderTest::testBuilder in Drupal 9

Same name and namespace in other branches
  1. 8 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 89

Class

BuilderTest
Test DrupalCoreRecommendedBuilder.

Namespace

Drupal\Tests\Composer\Generator

Code

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