diff --git a/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php b/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php index a535137..2b92971 100644 --- a/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php +++ b/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php @@ -56,7 +56,7 @@ public function providerValidate() { $data[] = ['https://www.drupal.org', TRUE]; $data[] = ['magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C', TRUE]; - // Not valid protocols. + // Invalid protocols. $data[] = ['ftp://ftp.funet.fi/pub/standards/RFC/rfc959.txt', FALSE]; foreach ($data as &$single_data) { @@ -73,8 +73,10 @@ public function providerValidate() { /** * @covers ::validate + * + * @see \Drupal\Core\Url::fromUri */ - public function testValidateWithInvalidUrl() { + public function testValidateWithMalformedUri() { $link = $this->getMock('Drupal\link\LinkItemInterface'); $link->expects($this->any()) ->method('getUrl') @@ -94,7 +96,7 @@ public function testValidateWithInvalidUrl() { /** * @covers ::validate */ - public function testValidateForInternalUrl() { + public function testValidateIgnoresInternalUrls() { $link = $this->getMock('Drupal\link\LinkItemInterface'); $link->expects($this->any()) ->method('getUrl') diff --git a/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php b/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php index 7ee34aa..545437c 100644 --- a/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php +++ b/core/modules/link/tests/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php @@ -64,6 +64,7 @@ public function providerValidate() { $url->setUrlGenerator($url_generator); $data[] = [$url, TRUE]; + // Not existing routed URL. $url = Url::fromRoute('example.not_existing_route'); @@ -85,14 +86,15 @@ public function providerValidate() { $single_data[0] = $link; } - return $data; } /** * @covers ::validate + * + * @see \Drupal\Core\Url::fromUri */ - public function testValidateWithInvalidUrl() { + public function testValidateWithMalformedUri() { $link = $this->getMock('Drupal\link\LinkItemInterface'); $link->expects($this->any()) ->method('getUrl')