function EnvironmentSupportValidatorTest::testValidUrl
Tests that the validation message links to the provided URL.
File
-
core/
modules/ package_manager/ tests/ src/ Kernel/ EnvironmentSupportValidatorTest.php, line 55
Class
- EnvironmentSupportValidatorTest
- @covers \Drupal\package_manager\Validator\EnvironmentSupportValidator @group package_manager @internal
Namespace
Drupal\Tests\package_manager\KernelCode
public function testValidUrl() : void {
$url = 'http://www.example.com';
putenv(EnvironmentSupportValidator::VARIABLE_NAME . '=' . $url);
$result = ValidationResult::createError([
t('<a href=":url">Package Manager is not supported by your environment.</a>', [
':url' => $url,
]),
]);
$this->assertStatusCheckResults([
$result,
]);
$this->assertResults([
$result,
], PreCreateEvent::class);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.