From 38d02d6e4b52416e7648849559603dc49addcae8 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Fri, 17 Jul 2020 08:38:05 +0100
Subject: [PATCH] Issue #3159528 by jameszhang023, jungle, longwave: Fix typos:
 "exeption|gaurd|ouptut|withut|defintion" in core

---
 core/lib/Drupal/Core/Test/PhpUnitTestRunner.php              | 2 +-
 core/misc/cspell/dictionary.txt                              | 5 -----
 .../tests/config_schema_test/config_schema_test.module       | 2 +-
 .../Traits/CommonCollectionFilterAccessTestPatternsTrait.php | 2 +-
 .../Drupal/KernelTests/Core/Config/ConfigSchemaTest.php      | 4 ++--
 .../Tests/Component/Annotation/Doctrine/DocParserTest.php    | 2 +-
 .../Plugin/Discovery/StaticDiscoveryDecoratorTest.php        | 4 ++--
 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php       | 4 ++--
 .../Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php    | 2 +-
 9 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php
index 9b300dd61a6f..3705c8ef8f51 100644
--- a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php
+++ b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php
@@ -205,7 +205,7 @@ public function runCommand(array $unescaped_test_classnames, $phpunit_file, &$st
    */
   public function runTests($test_id, array $unescaped_test_classnames, &$status = NULL) {
     $phpunit_file = $this->xmlLogFilePath($test_id);
-    // Store ouptut from our test run.
+    // Store output from our test run.
     $output = [];
     $this->runCommand($unescaped_test_classnames, $phpunit_file, $status, $output);
 
diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt
index 0b81ef38f2b4..3c75df511ced 100644
--- a/core/misc/cspell/dictionary.txt
+++ b/core/misc/cspell/dictionary.txt
@@ -415,7 +415,6 @@ deduplicates
 defalt
 defaultable
 defgroup
-defintion
 deletable
 deletedline
 deletee
@@ -583,7 +582,6 @@ evenodd
 eventhandler
 exampleurl
 exdep
-exeption
 existant
 exitcode
 expirable
@@ -696,7 +694,6 @@ funic
 furchtbar
 gabilondo
 gato
-gaurd
 gbmb
 getcode
 getfile
@@ -1252,7 +1249,6 @@ othername
 otherpage
 otherprofile
 otsikko
-ouptut
 outdata
 outdent
 outdir
@@ -2078,7 +2074,6 @@ wiget
 wimoids
 windir
 winnt
-withut
 wmlscript
 woff
 wonkiness
diff --git a/core/modules/config/tests/config_schema_test/config_schema_test.module b/core/modules/config/tests/config_schema_test/config_schema_test.module
index 3ce1170222e1..1db8f8d13fe7 100644
--- a/core/modules/config/tests/config_schema_test/config_schema_test.module
+++ b/core/modules/config/tests/config_schema_test/config_schema_test.module
@@ -10,7 +10,7 @@
  */
 function config_schema_test_config_schema_info_alter(&$definitions) {
   if (\Drupal::state()->get('config_schema_test_exception_add')) {
-    $definitions['config_schema_test.hook_added_defintion'] = $definitions['config_schema_test.hook'];
+    $definitions['config_schema_test.hook_added_definition'] = $definitions['config_schema_test.hook'];
   }
   if (\Drupal::state()->get('config_schema_test_exception_remove')) {
     unset($definitions['config_schema_test.hook']);
diff --git a/core/modules/jsonapi/tests/src/Traits/CommonCollectionFilterAccessTestPatternsTrait.php b/core/modules/jsonapi/tests/src/Traits/CommonCollectionFilterAccessTestPatternsTrait.php
index 8ac8a39ec64e..7dfb97067ea4 100644
--- a/core/modules/jsonapi/tests/src/Traits/CommonCollectionFilterAccessTestPatternsTrait.php
+++ b/core/modules/jsonapi/tests/src/Traits/CommonCollectionFilterAccessTestPatternsTrait.php
@@ -63,7 +63,7 @@ public function doTestCollectionFilterAccessBasedOnPermissions($label_field_name
 
     // Test.
     $collection_url = Url::fromRoute('jsonapi.entity_test--bar.collection');
-    // Specifying a delta exercises TemporaryQueryGaurd more thoroughly.
+    // Specifying a delta exercises TemporaryQueryGuard more thoroughly.
     $filter_path = "spotlight.0.$label_field_name";
     $collection_filter_url = $collection_url->setOption('query', ["filter[$filter_path]" => $this->entity->label()]);
     $request_options = [];
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
index 08bdceb16008..c37ac7888dd5 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
@@ -574,7 +574,7 @@ public function testConfigSchemaInfoAlter() {
       $this->fail('Expected ConfigSchemaAlterException thrown.');
     }
     catch (ConfigSchemaAlterException $e) {
-      $this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_defintion) and removed (config_schema_test.hook) schema definitions');
+      $this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_definition) and removed (config_schema_test.hook) schema definitions');
     }
 
     \Drupal::state()->set('config_schema_test_exception_remove', FALSE);
@@ -583,7 +583,7 @@ public function testConfigSchemaInfoAlter() {
       $this->fail('Expected ConfigSchemaAlterException thrown.');
     }
     catch (ConfigSchemaAlterException $e) {
-      $this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_defintion) schema definitions');
+      $this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_definition) schema definitions');
     }
 
     // Tests that hook_config_schema_info_alter() can add additional metadata to
diff --git a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
index d98f8340338d..5d145269311b 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
@@ -1214,7 +1214,7 @@ public function testReservedKeywordsInAnnotations()
         $this->assertInstanceOf(Null::class, $result[0]);
     }
 
-    public function testSetValuesExeption()
+    public function testSetValuesException()
     {
         $this->expectException('\Doctrine\Common\Annotations\AnnotationException');
         $this->expectExceptionMessage('[Creation Error] The annotation @SomeAnnotationClassNameWithoutConstructor declared on some class does not have a property named "invalidaProperty". Available properties: data, name');
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php
index 69daab46dd18..4961ee118a8a 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php
@@ -62,7 +62,7 @@ public function testGetDefinition($expected, $has_register_definitions, $excepti
     // Mock our StaticDiscoveryDecorator.
     $mock_decorator = $this->getMockBuilder('Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator')
       ->disableOriginalConstructor()
-      ->setMethods(['registeredDefintionCallback'])
+      ->setMethods(['registeredDefinitionCallback'])
       ->getMock();
 
     // Set up the ::$registerDefinitions property.
@@ -132,7 +132,7 @@ public function testGetDefinitions($has_register_definitions, $definitions) {
     // Mock our StaticDiscoveryDecorator.
     $mock_decorator = $this->getMockBuilder('Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator')
       ->disableOriginalConstructor()
-      ->setMethods(['registeredDefintionCallback'])
+      ->setMethods(['registeredDefinitionCallback'])
       ->getMock();
 
     // Set up the ::$registerDefinitions property.
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
index 3d2aa05767f7..21252104277e 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
@@ -36,8 +36,8 @@ protected function setUpEntityType($definition) {
    *
    * @dataProvider providerTestGet
    */
-  public function testGet(array $defintion, $key, $expected) {
-    $entity_type = $this->setUpEntityType($defintion);
+  public function testGet(array $definition, $key, $expected) {
+    $entity_type = $this->setUpEntityType($definition);
     $this->assertSame($expected, $entity_type->get($key));
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
index 7066f786dc32..2a78baca9fb3 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
@@ -42,7 +42,7 @@ public function providerGetFormClass() {
     return [
       'block plugin without forms, "configure" operation' => [$block_plugin_without_forms, 'configure', TestClass::class],
       'block plugin without forms, "tickle" operation'    => [$block_plugin_without_forms, 'tickle', NULL],
-      'block plugin withut forms, "poke" operation'       => [$block_plugin_without_forms, 'poke', NULL],
+      'block plugin without forms, "poke" operation'      => [$block_plugin_without_forms, 'poke', NULL],
       'block plugin with forms, "configure" operation' => [$block_plugin_with_forms, 'configure', TestClass::class],
       'block plugin with forms, "tickle" operation'    => [$block_plugin_with_forms, 'tickle', NULL],
       'block plugin with forms, "poke" operation'      => [$block_plugin_with_forms, 'poke', static::class],
-- 
GitLab