From 203adbb7e024c31734c09c293fb932cf924c36d9 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Fri, 28 Jun 2024 13:42:30 +0300
Subject: [PATCH] Issue #3455912 by quietone: Fix spelling for 10 words used in
 tests

(cherry picked from commit 5a9e57dc683ef932911a08a47c07b159a8b9e689)
---
 core/misc/cspell/dictionary.txt                        | 10 ----------
 .../modules/block/tests/src/Functional/BlockUiTest.php |  1 +
 .../tests/src/Functional/BlockContentCreationTest.php  |  2 ++
 .../src/Functional/ConfigTranslationUiModulesTest.php  |  2 +-
 .../src/Plugin/Block/TestAjaxBlock.php                 |  2 +-
 .../tests/src/Functional/LayoutBuilderBlocksTest.php   |  2 ++
 .../tests/src/FunctionalJavascript/AjaxBlockTest.php   |  4 ++--
 .../FunctionalJavascript/ContentPreviewToggleTest.php  |  2 ++
 .../src/FunctionalJavascript/ContextualLinksTest.php   |  2 ++
 .../LayoutBuilderDisableInteractionsTest.php           |  2 ++
 .../src/FunctionalJavascript/LayoutBuilderUiTest.php   |  2 ++
 .../src/FunctionalJavascript/MoveBlockFormTest.php     |  2 ++
 .../modules/ajax_forms_test/ajax_forms_test.module     |  2 +-
 .../UpdateSystem/UpdatePathTestBaseFilledTest.php      |  2 +-
 core/modules/system/tests/src/Kernel/Mail/MailTest.php |  4 ++--
 .../FunctionalJavascriptTests/Ajax/CommandsTest.php    |  2 +-
 .../FunctionalJavascriptTests/Ajax/DialogTest.php      |  2 ++
 core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php  |  6 +++---
 18 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt
index 060d32d62c74..1b354d501ac6 100644
--- a/core/misc/cspell/dictionary.txt
+++ b/core/misc/cspell/dictionary.txt
@@ -77,7 +77,6 @@ blockpromoted
 blockquotes
 blockrecipe
 blockrelated
-blocktest
 bodyless
 boing
 bovigo
@@ -254,11 +253,9 @@ fdiv
 fieldable
 fieldapi
 fieldblock
-fieldbody
 fieldgroup
 fieldgroups
 fieldlayout
-fieldlinks
 fieldnames
 fieldsets
 filemime
@@ -703,17 +700,10 @@ tappable
 taskless
 tcomment
 templating
-testajax
-testblock
-testbody
 testbot
 testbots
 testcase
-testcontent
-testcontextawareblock
-testdialog
 testgroups
-testkey
 testlogger
 testsuite
 testsuites
diff --git a/core/modules/block/tests/src/Functional/BlockUiTest.php b/core/modules/block/tests/src/Functional/BlockUiTest.php
index d555b20cdd30..715a798bea8f 100644
--- a/core/modules/block/tests/src/Functional/BlockUiTest.php
+++ b/core/modules/block/tests/src/Functional/BlockUiTest.php
@@ -10,6 +10,7 @@
 use Drupal\Tests\BrowserTestBase;
 
 // cspell:ignore displaymessage scriptalertxsssubjectscript
+// cspell:ignore testcontextawareblock
 
 /**
  * Tests that the block configuration UI exists and stores data correctly.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
index 36cf12e2a9bb..f0602f0b5ce6 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
@@ -8,6 +8,8 @@
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\Core\Database\Database;
 
+// cspell:ignore testblock
+
 /**
  * Create a block and test saving it.
  *
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php
index b27453b8fb3a..a2838a404d37 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php
@@ -10,7 +10,7 @@
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\node\Entity\NodeType;
 
-// cspell:ignore tuvan
+// cspell:ignore testcontent tuvan
 
 /**
  * Translate settings and entities to various languages.
diff --git a/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/TestAjaxBlock.php b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/TestAjaxBlock.php
index 71ac45c6afb5..78d36401b078 100644
--- a/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/TestAjaxBlock.php
+++ b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/TestAjaxBlock.php
@@ -11,7 +11,7 @@
  * Provides a 'TestAjax' block.
  */
 #[Block(
-  id: "layout_builder_test_testajax",
+  id: "layout_builder_test_ajax",
   admin_label: new TranslatableMarkup("TestAjax"),
   category: new TranslatableMarkup("Test")
 )]
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php
index 89395413a821..6c5d9c90bbd4 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php
@@ -7,6 +7,8 @@
 use Drupal\node\Entity\Node;
 use Drupal\views\Entity\View;
 
+// cspell:ignore blocktest
+
 /**
  * Tests the Layout Builder UI with blocks.
  *
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
index 6e72c8b572cc..220a61ad1d2e 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
@@ -104,8 +104,8 @@ public function testAddAjaxBlock(): void {
     // Then add the block.
     $assert_session->waitForElementVisible('named', ['button', 'Add block'])->press();
     $assert_session->assertWaitOnAjaxRequest();
-    $assert_session->waitForElementVisible('css', '.block-layout-builder-test-testajax');
-    $block_elements = $this->cssSelect('.block-layout-builder-test-testajax');
+    $assert_session->waitForElementVisible('css', '.block-layout-builder-test-ajax');
+    $block_elements = $this->cssSelect('.block-layout-builder-test-ajax');
     // Should be exactly one of these in there.
     $this->assertCount(1, $block_elements);
     $assert_session->pageTextContains('Every word is like an unnecessary stain on silence and nothingness.');
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
index b1bb5c8706eb..e19cc16bcadb 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
@@ -9,6 +9,8 @@
 use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait;
 use Drupal\Tests\system\Traits\OffCanvasTestTrait;
 
+// cspell:ignore testbody
+
 /**
  * Tests toggling of content preview.
  *
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php
index 3c6619b7480a..6003c0c11d14 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php
@@ -8,6 +8,8 @@
 use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
 use Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait;
 
+// cspell:ignore blocktest
+
 /**
  * Test contextual links compatibility with the Layout Builder.
  *
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php
index 2ed6f0f2a1f8..8e7395796fed 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php
@@ -13,6 +13,8 @@
 use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait;
 use Drupal\Tests\system\Traits\OffCanvasTestTrait;
 
+// cspell:ignore fieldbody
+
 /**
  * Tests the Layout Builder disables interactions of rendered blocks.
  *
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
index 5a11de6bdbdb..3383fbea8f54 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
@@ -8,6 +8,8 @@
 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
 use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait;
 
+// cspell:ignore fieldbody
+
 /**
  * Tests the Layout Builder UI.
  *
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php
index 716ac3fa0668..528b863a1b5b 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php
@@ -8,6 +8,8 @@
 use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
 use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait;
 
+// cspell:ignore fieldbody fieldlinks
+
 /**
  * Tests moving blocks via the form.
  *
diff --git a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
index 232c40485341..c418eb05af78 100644
--- a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
+++ b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
@@ -129,7 +129,7 @@ function ajax_forms_test_advanced_commands_css_callback($form, FormStateInterfac
 function ajax_forms_test_advanced_commands_data_callback($form, FormStateInterface $form_state) {
   $selector = '#data_div';
   $response = new AjaxResponse();
-  $response->addCommand(new DataCommand($selector, 'testkey', 'test_value'));
+  $response->addCommand(new DataCommand($selector, 'test_key', 'test_value'));
   return $response;
 }
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
index 4f35107353da..40e2461dd475 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
@@ -9,7 +9,7 @@
 use Drupal\node\Entity\NodeType;
 use Drupal\user\Entity\User;
 
-// cspell:ignore hola usuario
+// cspell:ignore hola testblock usuario
 
 /**
  * Runs UpdatePathTestBase with a dump filled with content.
diff --git a/core/modules/system/tests/src/Kernel/Mail/MailTest.php b/core/modules/system/tests/src/Kernel/Mail/MailTest.php
index 5e6f1d2f519e..444075a26551 100644
--- a/core/modules/system/tests/src/Kernel/Mail/MailTest.php
+++ b/core/modules/system/tests/src/Kernel/Mail/MailTest.php
@@ -69,10 +69,10 @@ public function testPluggableFramework(): void {
     $this->assertInstanceOf(TestPhpMailFailure::class, $mail_backend);
 
     // Add a module-specific mail backend.
-    $this->config('system.mail')->set('interface.my_module_testkey', 'test_mail_collector')->save();
+    $this->config('system.mail')->set('interface.my_module_test_key', 'test_mail_collector')->save();
 
     // Get the added MailInterface class instance.
-    $mail_backend = \Drupal::service('plugin.manager.mail')->getInstance(['module' => 'my_module', 'key' => 'testkey']);
+    $mail_backend = \Drupal::service('plugin.manager.mail')->getInstance(['module' => 'my_module', 'key' => 'test_key']);
 
     // Assert whether the added mail backend is an instance of the expected
     // class.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
index 48a7f9e76324..7073946f8eb0 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
@@ -102,7 +102,7 @@ public function testAjaxCommands(): void {
     // Tests the 'data' command.
     $page->pressButton("AJAX data command: Issue command.");
     $this->assertTrue($page->waitFor(10, function () use ($session) {
-      return 'test_value' === $session->evaluateScript('window.jQuery("#data_div").data("testkey")');
+      return 'test_value' === $session->evaluateScript('window.jQuery("#data_div").data("test_key")');
     }));
 
     // Tests the 'html' command.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php
index c42255d5404e..7cb0ba26eadd 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php
@@ -8,6 +8,8 @@
 use Drupal\Core\Ajax\OpenModalDialogWithUrl;
 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
 
+// cspell:ignore testdialog
+
 /**
  * Performs tests on opening and manipulating dialogs via AJAX commands.
  *
diff --git a/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php b/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php
index bbb7efb12065..4184a022d696 100644
--- a/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php
@@ -157,7 +157,7 @@ protected function setUpMailManager($interface = []) {
   public function testGetInstance(): void {
     $interface = [
       'default' => 'php_mail',
-      'example_testkey' => 'test_mail_collector',
+      'example_test_key' => 'test_mail_collector',
     ];
     $this->setUpMailManager($interface);
 
@@ -167,7 +167,7 @@ public function testGetInstance(): void {
     $this->assertInstanceOf('Drupal\Core\Mail\Plugin\Mail\PhpMail', $instance);
 
     // Test that a matching message_id returns the specified plugin instance.
-    $options = ['module' => 'example', 'key' => 'testkey'];
+    $options = ['module' => 'example', 'key' => 'test_key'];
     $instance = $this->mailManager->getInstance($options);
     $this->assertInstanceOf('Drupal\Core\Mail\Plugin\Mail\TestMailCollector', $instance);
   }
@@ -180,7 +180,7 @@ public function testGetInstance(): void {
   public function testMailInRenderContext(): void {
     $interface = [
       'default' => 'php_mail',
-      'example_testkey' => 'test_mail_collector',
+      'example_test_key' => 'test_mail_collector',
     ];
     $this->setUpMailManager($interface);
 
-- 
GitLab