diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php index dff67204df9d0a1e60338140a659b6f3587efff4..12ce29ed78951d1243580a105e44a2806f6b80ca 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -375,16 +375,16 @@ function (ConstraintViolation $v) { // Wrap the existing drupal-media tag with a div and an a that include // attributes allowed via GHS. $original_value = $this->host->body->value; - $this->host->body->value = '<div data-bar="baz"><a href="https://drupal.org" data-foo="bar">' . $original_value . '</a></div>'; + $this->host->body->value = '<div data-bar="baz"><a href="https://example.com" data-foo="bar">' . $original_value . '</a></div>'; $this->host->save(); $this->drupalGet($this->host->toUrl('edit-form')); // Confirm data-foo is present in the editing view. - $this->assertNotEmpty($link = $assert_session->waitForElementVisible('css', 'a[href="https://drupal.org"]')); + $this->assertNotEmpty($link = $assert_session->waitForElementVisible('css', 'a[href="https://example.com"]')); $this->assertEquals('bar', $link->getAttribute('data-foo')); // Confirm that the media is wrapped by the div on the editing view. - $assert_session->elementExists('css', 'div[data-bar="baz"] > .drupal-media > a[href="https://drupal.org"] > div[data-drupal-media-preview]'); + $assert_session->elementExists('css', 'div[data-bar="baz"] > .drupal-media > a[href="https://example.com"] > div[data-drupal-media-preview]'); // Confirm that drupal-media is wrapped by the div and a, and that GHS has // retained arbitrary HTML allowed by source editing. @@ -638,12 +638,12 @@ public function testEditableCaption() { $this->pressEditorButton('Link'); $this->assertVisibleBalloon('.ck-link-form'); $link_input = $page->find('css', '.ck-balloon-panel .ck-link-form input[type=text]'); - $link_input->setValue('https://drupal.org'); + $link_input->setValue('https://example.com'); $page->find('css', '.ck-balloon-panel .ck-link-form button[type=submit]')->click(); $this->assertNotEmpty($assert_session->waitForElement('css', '.drupal-media figcaption > a')); - $this->assertEquals('<a class="ck-link_selected" href="https://drupal.org">Llamas are the most awesome ever</a>', $figcaption->getHtml()); + $this->assertEquals('<a class="ck-link_selected" href="https://example.com">Llamas are the most awesome ever</a>', $figcaption->getHtml()); $editor_dom = $this->getEditorDataAsDom(); - $this->assertEquals('<a href="https://drupal.org">Llamas are the most awesome ever</a>', $editor_dom->getElementsByTagName('drupal-media')->item(0)->getAttribute('data-caption')); + $this->assertEquals('<a href="https://example.com">Llamas are the most awesome ever</a>', $editor_dom->getElementsByTagName('drupal-media')->item(0)->getAttribute('data-caption')); } /** diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php index e6f4713a653f859d1bc87ce9e6dc0018cfb4b12f..23e22105d579d0ed1f77ce005f1e7a05d83da2a6 100644 --- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php +++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php @@ -327,7 +327,7 @@ protected function createDefaultContent($num_articles, $num_tags, $article_has_i // Make sure that there is at least 1 https link for ::testRead() #19. $this->nodes[0]->field_link = [ 'title' => 'Drupal', - 'uri' => 'https://drupal.org', + 'uri' => 'https://example.com', ]; $this->nodes[0]->save(); } diff --git a/core/modules/link/tests/src/Functional/LinkFieldUITest.php b/core/modules/link/tests/src/Functional/LinkFieldUITest.php index 151204adab034ef35da525fc457323aaab3f5f03..2c40adac32ca8544105dea4b0bbf3fbf25516026 100644 --- a/core/modules/link/tests/src/Functional/LinkFieldUITest.php +++ b/core/modules/link/tests/src/Functional/LinkFieldUITest.php @@ -94,7 +94,7 @@ protected function providerTestFieldUI() { DRUPAL_OPTIONAL, ]; $link_types = [ - LinkItemInterface::LINK_EXTERNAL => 'http://drupal.org', + LinkItemInterface::LINK_EXTERNAL => 'http://example.com', LinkItemInterface::LINK_GENERIC => '', LinkItemInterface::LINK_INTERNAL => '<front>', ]; diff --git a/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php b/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php index 8c1f5be9d1cb96bc497809258f00e1d2eb5d7393..96e00da72942eff20dfe056d0674fcae09a22c13 100644 --- a/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php +++ b/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php @@ -70,7 +70,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['link_test_views public function testLinkViewsTokens() { // Array of URI's to test. $uris = [ - 'http://www.drupal.org' => 'Drupal.org', + 'http://www.example.com' => 'example.com', ]; // Add nodes with the URI's and titles. diff --git a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php index a7e99f06f7c34d1864ff50db4ae39649492ba489..2a6d9ca6b6437f2a692ae21bdb81b8f3ee8bca88 100644 --- a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php +++ b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php @@ -67,12 +67,12 @@ public function testLinkFieldFormStates(string $uri, string $title) { public function linkFieldFormStatesData() { return [ 'Fill uri, keep title empty' => [ - 'https://drupal.org', + 'https://example.com', '', ], 'Fill title, keep uri empty' => [ '', - 'https://drupal.org', + 'https://example.com', ], ]; } diff --git a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php index 506a49de8d4f5bb581639324d87493beac708da8..cc975309b4d19671f34992ac885d82fa193bc739 100644 --- a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php +++ b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php @@ -53,8 +53,8 @@ public function providerValidate() { $data = []; // Test allowed protocols. - $data[] = ['http://www.drupal.org', TRUE]; - $data[] = ['https://www.drupal.org', TRUE]; + $data[] = ['http://www.example.com', TRUE]; + $data[] = ['https://www.example.com', TRUE]; // cSpell:disable-next-line $data[] = ['magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C', TRUE]; diff --git a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php index 427500f57590c2d3907765735dde30bbb77b4f6e..08f9712d71e82ebde9c42bddcd827880b100ea2a 100644 --- a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php @@ -103,7 +103,7 @@ public function providerTransformException() { // The parent ID does not for the following tests. return [ 'parent link external and could not be loaded' => [ - 'source_value' => [1, 'admin', 'http://drupal.org'], + 'source_value' => [1, 'admin', 'http://example.com'], ], 'parent link path/menu name not passed' => [ 'source_value' => [1, NULL, NULL], diff --git a/core/modules/migrate_drupal/tests/src/Traits/CreateTestContentEntitiesTrait.php b/core/modules/migrate_drupal/tests/src/Traits/CreateTestContentEntitiesTrait.php index 191f5c402142757cb3aab0e37bbe752266e983be..05da0215f9ecf943bf1119820356352f13cf3da1 100644 --- a/core/modules/migrate_drupal/tests/src/Traits/CreateTestContentEntitiesTrait.php +++ b/core/modules/migrate_drupal/tests/src/Traits/CreateTestContentEntitiesTrait.php @@ -163,7 +163,7 @@ protected function createContentPostUpgrade() { if ($entity_type_manager->hasDefinition('menu_link_content')) { $menu_link = $entity_type_manager->getStorage('menu_link_content')->create([ 'title' => 'post upgrade menu link', - 'link' => ['uri' => 'http://www.drupal.org'], + 'link' => ['uri' => 'http://www.example.com'], 'menu_name' => 'tools', ]); $menu_link->save(); diff --git a/core/modules/update/tests/src/Unit/ProjectReleaseTest.php b/core/modules/update/tests/src/Unit/ProjectReleaseTest.php index 8e69006eb13a20c392dbde3829197e4dd6ad0481..4e38599ca9cc49bf3ade87df5d7b4a52e09e747f 100644 --- a/core/modules/update/tests/src/Unit/ProjectReleaseTest.php +++ b/core/modules/update/tests/src/Unit/ProjectReleaseTest.php @@ -245,9 +245,9 @@ public function providerCreateFromArrayInvalidField(): array { protected function getValidData(): array { return [ 'status' => 'published', - 'release_link' => 'https://drupal.org/release-link', + 'release_link' => 'https://example.com/release-link', 'version' => '8.0.0', - 'download_link' => 'https://drupal.org/download-link', + 'download_link' => 'https://example.com/download-link', 'core_compatibility_message' => 'This is compatible', 'date' => 1452229200, 'terms' => [ diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php index bd589fe96003d472456f294256c1b8cba53c75bc..cfc3ff397e4837d9eee519da011b1a7e5118b840 100644 --- a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php +++ b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php @@ -317,19 +317,19 @@ public function testAlterUrl() { // Tests the external flag. // Switch on the external flag should output an external URL as well. $id_field->options['alter']['external'] = TRUE; - $id_field->options['alter']['path'] = $path = 'www.drupal.org'; + $id_field->options['alter']['path'] = $path = 'www.example.com'; $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($id_field, $row) { return $id_field->theme($row); }); - $this->assertSubString($output, 'http://www.drupal.org'); + $this->assertSubString($output, 'http://www.example.com'); // Setup a not external URL, which shouldn't lead to an external URL. $id_field->options['alter']['external'] = FALSE; - $id_field->options['alter']['path'] = $path = 'www.drupal.org'; + $id_field->options['alter']['path'] = $path = 'www.example.com'; $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($id_field, $row) { return $id_field->theme($row); }); - $this->assertNotSubString($output, 'http://www.drupal.org'); + $this->assertNotSubString($output, 'http://www.example.com'); // Tests the transforming of the case setting. $id_field->options['alter']['path'] = $path = $this->randomMachineName(); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php index b136be632565344cf1f7da20eaf1482ed90d2998..97d2ffc2c91b824d100f22600878a1e07e0ea0a5 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php @@ -231,11 +231,11 @@ public function testReadMoreCustomURL() { // Test more link with absolute URL. $view->display_handler->setOption('link_display', 'custom_url'); - $view->display_handler->setOption('link_url', 'http://drupal.org'); + $view->display_handler->setOption('link_url', 'http://example.com'); $this->executeView($view); $output = $view->preview(); $output = $renderer->renderRoot($output); - $this->assertStringContainsString('http://drupal.org', $output, 'The read more link with href "http://drupal.org" was found.'); + $this->assertStringContainsString('http://example.com', $output, 'The read more link with href "http://example.com" was found.'); // Test more link with query parameters in the URL. $view->display_handler->setOption('link_display', 'custom_url'); diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php index fe159703984e2dfe933b9f352b16282582ac8a33..8e50cc08f19096ae414e4c05b0df1e50bb57d105 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php @@ -288,9 +288,9 @@ public function providerTestRenderTrimmedWithMoreLinkAndPath() { $data[] = ['<front>', '/%3Cfront%3E']; // External URL. - $data[] = ['https://www.drupal.org', 'https://www.drupal.org']; - $data[] = ['http://www.drupal.org', 'http://www.drupal.org']; - $data[] = ['www.drupal.org', '/www.drupal.org']; + $data[] = ['https://www.example.com', 'https://www.example.com']; + $data[] = ['http://www.example.com', 'http://www.example.com']; + $data[] = ['www.example.com', '/www.example.com']; return $data; } @@ -379,8 +379,8 @@ public function providerTestRenderAsLinkWithPathAndOptions() { $data[] = ['test-path', ['suffix' => 'test_suffix'], '<a href="/test-path">value</a>', '<a href="/test-path">value</a>test_suffix']; // External URL. - $data[] = ['https://www.drupal.org', [], [], '<a href="https://www.drupal.org">value</a>']; - $data[] = ['www.drupal.org', ['external' => TRUE], [], '<a href="http://www.drupal.org">value</a>']; + $data[] = ['https://www.example.com', [], [], '<a href="https://www.example.com">value</a>']; + $data[] = ['www.example.com', ['external' => TRUE], [], '<a href="http://www.example.com">value</a>']; $data[] = ['', ['external' => TRUE], [], 'value']; return $data; @@ -636,7 +636,7 @@ public function testRenderAsExternalLinkWithPathAndTokens($path, $tokens, $link_ public function providerTestRenderAsExternalLinkWithPathAndTokens() { $data = []; - $data[] = ['{{ foo }}', ['{{ foo }}' => 'http://www.drupal.org'], '<a href="http://www.drupal.org">value</a>', ['context_path' => 'http://www.drupal.org']]; + $data[] = ['{{ foo }}', ['{{ foo }}' => 'http://www.example.com'], '<a href="http://www.example.com">value</a>', ['context_path' => 'http://www.example.com']]; $data[] = ['{{ foo }}', ['{{ foo }}' => ''], 'value', ['context_path' => '']]; $data[] = ['{{ foo }}', ['{{ foo }}' => ''], 'value', ['context_path' => '', 'alter' => ['external' => TRUE]]]; $data[] = ['{{ foo }}', ['{{ foo }}' => '/test-path/123'], '<a href="/test-path/123">value</a>', ['context_path' => '/test-path/123']]; @@ -777,7 +777,7 @@ public function setLinkGenerator(LinkGeneratorInterface $link_generator) { } -// @todo Remove as part of https://www.drupal.org/node/2529170. +// @todo Remove as part of https://www.example.com/node/2529170. namespace Drupal\views\Plugin\views\field; if (!function_exists('base_path')) { diff --git a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php index 23ca0d012d79e877857e152d33944feff74cbffb..900de71396e130b1f4e756eadc8cb02856a7459d 100644 --- a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php @@ -430,14 +430,14 @@ public static function providerTestIsExternal() { ['https://example.com/external/path', TRUE], ['javascript://fake-external-path', FALSE], // External URL without an explicit protocol. - ['//www.drupal.org/foo/bar?foo=bar&bar=baz&baz#foo', TRUE], + ['//www.example.com/foo/bar?foo=bar&bar=baz&baz#foo', TRUE], // Internal URL starting with a slash. - ['/www.drupal.org', FALSE], + ['/www.example.com', FALSE], // Simple external URLs. ['http://example.com', TRUE], ['https://example.com', TRUE], - ['http://drupal.org/foo/bar?foo=bar&bar=baz&baz#foo', TRUE], - ['//drupal.org', TRUE], + ['http://example.com/foo/bar?foo=bar&bar=baz&baz#foo', TRUE], + ['//example.com', TRUE], // Some browsers ignore or strip leading control characters. ["\x00//www.example.com", TRUE], ["\x08//www.example.com", TRUE], @@ -455,7 +455,7 @@ public static function providerTestIsExternal() { ['/system/ajax', FALSE], ['?q=foo:bar', FALSE], ['node/edit:me', FALSE], - ['/drupal.org', FALSE], + ['/example.com', FALSE], ['<front>', FALSE], ]; } diff --git a/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php b/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php index 8d1347bc57fb4d22218bad0423ff6c4539519ad2..088a26e01eb6d9954ba33cfc80a523c3bb0a97be 100644 --- a/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php +++ b/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php @@ -67,8 +67,8 @@ public function providerTestParseMessagePlaceholders() { // Test removal of unexpected placeholders like ! while allowed // placeholders beginning with @, % and : are preserved. [ - ['message' => 'Test placeholder with :url and old !bang parameter', 'context' => [':url' => 'https://drupal.org', '!bang' => 'foo bar']], - ['message' => 'Test placeholder with :url and old !bang parameter', 'context' => [':url' => 'https://drupal.org']], + ['message' => 'Test placeholder with :url and old !bang parameter', 'context' => [':url' => 'https://example.com', '!bang' => 'foo bar']], + ['message' => 'Test placeholder with :url and old !bang parameter', 'context' => [':url' => 'https://example.com']], ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php b/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php index 323601e0742cbd448d273fc1219aae9911dd6822..eefca1c96cd1d75b61390986bb2a3e0e54c38093 100644 --- a/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php +++ b/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php @@ -64,8 +64,8 @@ public function provideTestValidate() { // It is odd that 1 is a valid string. // $data[] = [$this->createMock('Drupal\Core\TypedData\Type\StringInterface'), 1, FALSE]; $data[] = [new StringData(DataDefinition::create('string')), [], FALSE]; - $data[] = [new Uri(DataDefinition::create('uri')), 'http://www.drupal.org', TRUE]; - $data[] = [new Uri(DataDefinition::create('uri')), 'https://www.drupal.org', TRUE]; + $data[] = [new Uri(DataDefinition::create('uri')), 'http://www.example.com', TRUE]; + $data[] = [new Uri(DataDefinition::create('uri')), 'https://www.example.com', TRUE]; $data[] = [new Uri(DataDefinition::create('uri')), 'Invalid', FALSE]; $data[] = [new Uri(DataDefinition::create('uri')), 'entity:node/1', TRUE]; $data[] = [new Uri(DataDefinition::create('uri')), 'base:', TRUE]; @@ -75,7 +75,7 @@ public function provideTestValidate() { $data[] = [new Uri(DataDefinition::create('uri')), 'public://foo.png', TRUE]; $data[] = [new Uri(DataDefinition::create('uri')), 'private://', FALSE]; $data[] = [new Uri(DataDefinition::create('uri')), 'private://foo.png', TRUE]; - $data[] = [new Uri(DataDefinition::create('uri')), 'drupal.org', FALSE]; + $data[] = [new Uri(DataDefinition::create('uri')), 'example.com', FALSE]; return $data; }