function ComposerValidatorTest::testLinkToOnlineHelp

Tests that invalid configuration links to online help, if available.

Attributes

#[DataProvider('providerLinkToOnlineHelp')]

Parameters

array $config: The Composer configuration to set.

\Drupal\Core\StringTranslation\TranslatableMarkup[] $expected_messages: The expected validation error messages.

File

core/modules/package_manager/tests/src/Kernel/ComposerValidatorTest.php, line 162

Class

ComposerValidatorTest
Tests Composer Validator.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testLinkToOnlineHelp(array $config, array $expected_messages) : void {
  $this->enableModules([
    'help',
  ]);
  (new ActiveFixtureManipulator())->addConfig($config)
    ->commitChanges();
  $result = ValidationResult::createError($expected_messages, $this->t("Composer settings don't satisfy Package Manager's requirements."));
  $this->assertStatusCheckResults([
    $result,
  ]);
}

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