From 7e75964e699292a35d9da9eb508fededa7fbb0d9 Mon Sep 17 00:00:00 2001 From: Dave Long <dave@longwaveconsulting.com> Date: Sat, 11 Nov 2023 11:16:34 +0000 Subject: [PATCH] Issue #3395891 by quietone: Fix spelling for words in test modules --- core/misc/cspell/dictionary.txt | 17 ----------- .../modules/block_test/block_test.routing.yml | 2 +- .../block_content_test.module | 2 +- .../install/config_schema_test.no_schema.yml | 4 +-- ...ema.some_module.section_one.subsection.yml | 4 +-- ...ema.some_module.section_two.subsection.yml | 4 +-- ...g_schema_test.some_schema.with_parents.yml | 6 ++-- .../config_schema_test.some_schema.yml | 4 +-- .../schema/config_schema_test.schema.yml | 19 ++++++------ .../file/tests/file_test/file_test.module | 6 ++-- .../modules/locale_test/locale_test.module | 4 +-- .../src/Kernel/LocaleStringIsSafeTest.php | 4 +-- .../config/install/media.type.test.yml | 2 +- .../tests/src/Kernel/MediaCreationTest.php | 2 +- .../migrations/sample_stubbing_migration.yml | 12 ++++---- ...ing_migration_with_multiple_source_ids.yml | 12 ++++---- .../src/ConfigOverrider.php | 2 +- .../OverriddenConfigurationTest.php | 6 ++-- .../ajax_forms_test/ajax_forms_test.module | 2 +- .../http_kernel_test.info.yml} | 2 +- .../http_kernel_test.routing.yml | 6 ++++ .../http_kernel_test.services.yml | 10 +++++++ .../src/Controller/TestController.php | 2 +- .../src/HttpKernel/TestMiddleware.php | 2 +- .../httpkernel_test.routing.yml | 6 ---- .../httpkernel_test.services.yml | 10 ------- .../path_encoded_test.routing.yml | 2 +- .../RenderAttachedTestController.php | 2 +- .../system_module_test.module | 2 +- .../Render/HtmlResponseAttachmentsTest.php | 4 +-- .../test_views/views.view.test_tokens.yml | 4 +-- .../tests/src/Kernel/TokenReplaceTest.php | 2 +- .../Ajax/CommandsTest.php | 2 +- .../Routing/PathEncodedTest.php | 4 +-- .../Core/Config/ConfigSchemaTest.php | 30 +++++++++---------- .../Core/Config/Storage/FileStorageTest.php | 2 +- .../KernelTests/Core/File/MimeTypeTest.php | 6 ++-- .../HttpKernel/StackKernelIntegrationTest.php | 4 +-- .../Tests/Component/Annotation/PluginTest.php | 4 +-- 39 files changed, 101 insertions(+), 119 deletions(-) rename core/modules/system/tests/modules/{httpkernel_test/httpkernel_test.info.yml => http_kernel_test/http_kernel_test.info.yml} (57%) create mode 100644 core/modules/system/tests/modules/http_kernel_test/http_kernel_test.routing.yml create mode 100644 core/modules/system/tests/modules/http_kernel_test/http_kernel_test.services.yml rename core/modules/system/tests/modules/{httpkernel_test => http_kernel_test}/src/Controller/TestController.php (82%) rename core/modules/system/tests/modules/{httpkernel_test => http_kernel_test}/src/HttpKernel/TestMiddleware.php (96%) delete mode 100644 core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml delete mode 100644 core/modules/system/tests/modules/httpkernel_test/httpkernel_test.services.yml diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index f21ed4fb7dde..ffd89e9c0b22 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -100,9 +100,7 @@ blockquotes blockrecipe blockrelated blocktest -bodyformat bodyless -bodyvalue boing bomofo bovigo @@ -165,7 +163,6 @@ classname classtype cldr clearfix -cleartype clicksorter clist closethick @@ -416,7 +413,6 @@ hrefs htkey htmlcorrector httpheader -httpkernel httplug httponly hustlin @@ -456,7 +452,6 @@ jsonlint jssdk jumplinks justinrainbow -kakec kangarookitten kerneltest kernighan @@ -474,7 +469,6 @@ kristiaan kspread kthxbai kword -labely lamoids languageswitcher libc @@ -510,7 +504,6 @@ lundi lzma lzop macbinary -madeup mainpage mank maryjane @@ -540,7 +533,6 @@ mikey milli mimetypes minifyzombies -minipager minusthick missingkey missingkeys @@ -554,7 +546,6 @@ modernizr modulenarrow mojito montag -mooooh msgctxt msgid msgstr @@ -569,7 +560,6 @@ multifield multilanguage multipage multipass -multipleforms multisite multistar multistep @@ -657,7 +647,6 @@ pagecache pagetop pagina paramconverter -parens parseable parsererror pastafazoul @@ -953,7 +942,6 @@ testcase testcases testcontent testcontextawareblock -testdescription testdialog testen testfield @@ -962,11 +950,8 @@ testfilter testfunc testfunction testgroups -testid -testitem testk testkey -testlist testload testlogger testname @@ -974,7 +959,6 @@ testproject teststring testsuite testsuites -testvalue textareas textboxes texte @@ -1156,7 +1140,6 @@ yokotsoko yottabyte yottabytes yourmodule -yowser yygroup zartan zettabyte diff --git a/core/modules/block/tests/modules/block_test/block_test.routing.yml b/core/modules/block/tests/modules/block_test/block_test.routing.yml index 58af6fc12127..993c2de0de07 100644 --- a/core/modules/block/tests/modules/block_test/block_test.routing.yml +++ b/core/modules/block/tests/modules/block_test/block_test.routing.yml @@ -1,4 +1,4 @@ -block_test.test_multipleforms: +block_test.test_multiple_forms: path: '/test-multiple-forms' defaults: _controller: '\Drupal\block_test\Controller\TestMultipleFormController::testMultipleForms' diff --git a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module index 2531509605eb..8d10f1af3930 100644 --- a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module +++ b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module @@ -16,7 +16,7 @@ function block_content_test_block_content_view(array &$build, BlockContent $block_content, $view_mode) { // Add extra content. $build['extra_content'] = [ - '#markup' => '<blink>Yowser</blink>', + '#markup' => '<blink>Wow</blink>', ]; } diff --git a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.no_schema.yml b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.no_schema.yml index 378530a26aa4..82e6c64fe01a 100644 --- a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.no_schema.yml +++ b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.no_schema.yml @@ -1,4 +1,4 @@ -testitem: "Whatever structure there is in this file" -testlist: +test_item: "Whatever structure there is in this file" +test_list: - "the main file has no schema, so individual items" - "will not have any schema information." diff --git a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_one.subsection.yml b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_one.subsection.yml index 521ffd854517..e6fae1ad0cbc 100644 --- a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_one.subsection.yml +++ b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_one.subsection.yml @@ -1,2 +1,2 @@ -testid: 'Test id' -testdescription: 'Test description' +test_id: 'Test id' +test_description: 'Test description' diff --git a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_two.subsection.yml b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_two.subsection.yml index 521ffd854517..e6fae1ad0cbc 100644 --- a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_two.subsection.yml +++ b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.some_module.section_two.subsection.yml @@ -1,2 +1,2 @@ -testid: 'Test id' -testdescription: 'Test description' +test_id: 'Test id' +test_description: 'Test description' diff --git a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.with_parents.yml b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.with_parents.yml index 3f0b32457382..41f8a929c9ca 100644 --- a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.with_parents.yml +++ b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.with_parents.yml @@ -1,12 +1,12 @@ one_level: target_key: key_1 - testitem: 'text for entry_1' + test_item: 'text for entry_1' two_levels: target_key: key_2 wrapper: - testitem: 'text for entry_2' + test_item: 'text for entry_2' three_levels: target_key: key_3 wrapper_1: wrapper_2: - testitem: 'text for entry_3' + test_item: 'text for entry_3' diff --git a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.yml b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.yml index 3a18da2cf776..3dfc27509a99 100644 --- a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.yml +++ b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.some_schema.yml @@ -1,5 +1,5 @@ -testitem: 'Since this file at least has top level schema in config_test.schema.yml' -testlist: +test_item: 'Since this file at least has top level schema in config_test.schema.yml' +test_list: - 'Direct string items are identified and other items are' - 'recognized as undefined types.' test_no_schema: 12 diff --git a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml index 9623ca39ef5d..def6d8d02940 100644 --- a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml +++ b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml @@ -4,9 +4,9 @@ config_schema_test.some_schema: type: config_object label: 'Schema test data' mapping: - testitem: + test_item: label: 'Test item' - testlist: + test_list: label: 'Test list' config_schema_test.some_schema.with_parents: @@ -20,7 +20,7 @@ config_schema_test.some_schema.with_parents: target_key: label: 'Key used in parent relation' type: string - testitem: + test_item: type: config_schema_test.some_schema.with_parents.[%parent.target_key] two_levels: label: 'Parenting two levels up' @@ -33,7 +33,7 @@ config_schema_test.some_schema.with_parents: label: 'Wrapper' type: mapping mapping: - testitem: + test_item: type: config_schema_test.some_schema.with_parents.[%parent.%parent.target_key] three_levels: label: 'Parenting three levels up' @@ -50,9 +50,8 @@ config_schema_test.some_schema.with_parents: label: 'Wrapper 2' type: mapping mapping: - testitem: + test_item: type: config_schema_test.some_schema.with_parents.[%parent.%parent.%parent.target_key] - config_schema_test.some_schema.with_parents.key_1: label: 'Test item nested one level' type: string @@ -67,10 +66,10 @@ config_schema_test.some_schema.some_module.*.*: type: config_object label: 'Schema multiple filesystem marker test' mapping: - testid: + test_id: type: string label: 'ID' - testdescription: + test_description: type: text label: 'Description' @@ -78,10 +77,10 @@ config_schema_test.wildcard_fallback.*: type: config_object label: 'Schema wildcard fallback test' mapping: - testid: + test_id: type: string label: 'ID' - testdescription: + test_description: type: text label: 'Description' diff --git a/core/modules/file/tests/file_test/file_test.module b/core/modules/file/tests/file_test/file_test.module index e76470ebd12f..275292163438 100644 --- a/core/modules/file/tests/file_test/file_test.module +++ b/core/modules/file/tests/file_test/file_test.module @@ -289,9 +289,9 @@ function file_test_file_url_alter(&$uri) { */ function file_test_file_mimetype_mapping_alter(&$mapping) { // Add new mappings. - $mapping['mimetypes']['file_test_mimetype_1'] = 'madeup/file_test_1'; - $mapping['mimetypes']['file_test_mimetype_2'] = 'madeup/file_test_2'; - $mapping['mimetypes']['file_test_mimetype_3'] = 'madeup/doc'; + $mapping['mimetypes']['file_test_mimetype_1'] = 'made_up/file_test_1'; + $mapping['mimetypes']['file_test_mimetype_2'] = 'made_up/file_test_2'; + $mapping['mimetypes']['file_test_mimetype_3'] = 'made_up/doc'; $mapping['extensions']['file_test_1'] = 'file_test_mimetype_1'; $mapping['extensions']['file_test_2'] = 'file_test_mimetype_2'; $mapping['extensions']['file_test_3'] = 'file_test_mimetype_2'; diff --git a/core/modules/locale/tests/modules/locale_test/locale_test.module b/core/modules/locale/tests/modules/locale_test/locale_test.module index d3e7d66b3b23..7e6320dfdb76 100644 --- a/core/modules/locale/tests/modules/locale_test/locale_test.module +++ b/core/modules/locale/tests/modules/locale_test/locale_test.module @@ -202,11 +202,11 @@ function locale_test_tokens($type, $tokens, array $data = [], array $options = [ foreach ($tokens as $name => $original) { switch ($name) { case 'security_test1': - $return[$original] = "javascript:alert('Mooooh!');"; + $return[$original] = "javascript:alert('Hello!');"; break; case 'security_test2': - $return[$original] = "<script>alert('Mooooh!');</script>"; + $return[$original] = "<script>alert('Hello!');</script>"; break; } } diff --git a/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php b/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php index c36a154435b5..75a3734e200f 100644 --- a/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php +++ b/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php @@ -54,11 +54,11 @@ public function testLocalizedTokenizedString() { $tests_to_do = [ 1 => [ 'original' => 'Go to the <a href="[locale_test:security_test1]">frontpage</a>', - 'replaced' => 'Go to the <a href="javascript:alert(&#039;Mooooh!&#039;);">frontpage</a>', + 'replaced' => 'Go to the <a href="javascript:alert(&#039;Hello!&#039;);">frontpage</a>', ], 2 => [ 'original' => 'Hello <strong>[locale_test:security_test2]</strong>!', - 'replaced' => 'Hello <strong>&lt;script&gt;alert(&#039;Mooooh!&#039;);&lt;/script&gt;</strong>!', + 'replaced' => 'Hello <strong>&lt;script&gt;alert(&#039;Hello!&#039;);&lt;/script&gt;</strong>!', ], ]; diff --git a/core/modules/media/tests/modules/media_test_type/config/install/media.type.test.yml b/core/modules/media/tests/modules/media_test_type/config/install/media.type.test.yml index fed2c14ce74f..a3e68e278659 100644 --- a/core/modules/media/tests/modules/media_test_type/config/install/media.type.test.yml +++ b/core/modules/media/tests/modules/media_test_type/config/install/media.type.test.yml @@ -6,6 +6,6 @@ label: 'Test type' description: 'Test type.' source: test source_configuration: - test_config_value: Kakec + test_config_value: Foo field_map: metadata_attribute: field_attribute_config_test diff --git a/core/modules/media/tests/src/Kernel/MediaCreationTest.php b/core/modules/media/tests/src/Kernel/MediaCreationTest.php index 1255f766d91a..a4b64a6177d2 100644 --- a/core/modules/media/tests/src/Kernel/MediaCreationTest.php +++ b/core/modules/media/tests/src/Kernel/MediaCreationTest.php @@ -33,7 +33,7 @@ public function testMediaTypeCreation() { $this->assertSame('test', $test_media_type->get('source'), 'Could not assure the correct media source.'); // Source field is not set on the media source, but it should never // be created automatically when a config is being imported. - $this->assertSame(['source_field' => '', 'test_config_value' => 'Kakec'], $test_media_type->get('source_configuration'), 'Could not assure the correct media source configuration.'); + $this->assertSame(['source_field' => '', 'test_config_value' => 'Foo'], $test_media_type->get('source_configuration'), 'Could not assure the correct media source configuration.'); $this->assertSame(['metadata_attribute' => 'field_attribute_config_test'], $test_media_type->get('field_map'), 'Could not assure the correct field map.'); // Check the Media Type access handler behavior. // We grant access to the 'view label' operation to all users having diff --git a/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration.yml b/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration.yml index f3e693ba3db9..d7de23b447ce 100644 --- a/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration.yml +++ b/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration.yml @@ -5,12 +5,12 @@ source: data_rows: - id: 17 title: "Sample 1" - bodyvalue: "This is the body for ID 17" - bodyformat: "plain_text" + body_value: "This is the body for ID 17" + body_format: "plain_text" - id: 25 title: "Sample 2" - bodyvalue: "This is the body for ID 25" - bodyformat: "plain_text" + body_value: "This is the body for ID 25" + body_format: "plain_text" - id: 33 title: "Sample 3" ids: @@ -18,8 +18,8 @@ source: type: integer process: title: title - body/0/value: bodyvalue - body/0/format: bodyformat + body/0/value: body_value + body/0/format: body_format destination: default_bundle: node_stub plugin: entity:node diff --git a/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration_with_multiple_source_ids.yml b/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration_with_multiple_source_ids.yml index 1192e0180e9b..a90e64c6b021 100644 --- a/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration_with_multiple_source_ids.yml +++ b/core/modules/migrate/tests/modules/migrate_stub_test/migrations/sample_stubbing_migration_with_multiple_source_ids.yml @@ -6,13 +6,13 @@ source: - id: 17 version_id: 17 title: "Sample 1" - bodyvalue: "This is the body for ID 17" - bodyformat: "plain_text" + body_value: "This is the body for ID 17" + body_format: "plain_text" - id: 25 version_id: 25 title: "Sample 2" - bodyvalue: "This is the body for ID 25" - bodyformat: "plain_text" + body_value: "This is the body for ID 25" + body_format: "plain_text" ids: id: type: integer @@ -20,8 +20,8 @@ source: type: integer process: title: title - body/0/value: bodyvalue - body/0/format: bodyformat + body/0/value: body_value + body/0/format: body_format destination: default_bundle: node_stub plugin: entity:node diff --git a/core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php b/core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php index 6921fa8e0d3e..56b16338ca60 100644 --- a/core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php +++ b/core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php @@ -30,7 +30,7 @@ public function loadOverrides($names) { } if (in_array('system.menu.main', $names)) { if (\Drupal::state()->get('settings_tray_override_test.menu')) { - $overrides = $overrides + ['system.menu.main' => ['label' => 'Labely label']]; + $overrides = $overrides + ['system.menu.main' => ['label' => 'Foo label']]; } } return $overrides; diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php index 8d17f3a65270..820070eeb759 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php @@ -98,7 +98,7 @@ public function testOverriddenConfigurationRemoved() { $this->assertElementVisibleAfterWait('css', 'div:contains(The block configuration has been saved)'); $web_assert->assertWaitOnAjaxRequest(); // Confirm we did not save changes to the configuration. - $this->assertEquals('Labely label', \Drupal::configFactory()->get('system.menu.main')->get('label')); + $this->assertEquals('Foo label', \Drupal::configFactory()->get('system.menu.main')->get('label')); $this->assertEquals('Main navigation', \Drupal::configFactory()->getEditable('system.menu.main')->get('label')); $this->assertEquals($menu_with_overrides, \Drupal::configFactory()->get('system.menu.main')->get()); $this->assertEquals($menu_without_overrides, \Drupal::configFactory()->getEditable('system.menu.main')->get()); @@ -138,14 +138,14 @@ public function testOverriddenBlock() { // Test a non-overridden block does show the form in the off-canvas dialog. $block = $this->placeBlock('system_powered_by_block', [ 'label_display' => 1, - 'label' => 'Labely label', + 'label' => 'Foo label', ]); $this->drupalGet('user'); $block_selector = $this->getBlockSelector($block); // Confirm the block is marked as Settings Tray editable. $this->assertEquals('editable', $page->find('css', $block_selector)->getAttribute('data-drupal-settingstray')); // Confirm the label is not overridden. - $web_assert->elementContains('css', $block_selector, 'Labely label'); + $web_assert->elementContains('css', $block_selector, 'Foo label'); $this->openBlockForm($block_selector); } 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 30ca6bb834c0..8313a9bb593d 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', 'testvalue')); + $response->addCommand(new DataCommand($selector, 'testkey', 'test_value')); return $response; } diff --git a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.info.yml b/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.info.yml similarity index 57% rename from core/modules/system/tests/modules/httpkernel_test/httpkernel_test.info.yml rename to core/modules/system/tests/modules/http_kernel_test/http_kernel_test.info.yml index c556396b2fbb..e627f0981a2b 100644 --- a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.info.yml +++ b/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.info.yml @@ -1,5 +1,5 @@ name: 'HttpKernel test' type: module -description: 'Support module for httpkernel tests.' +description: 'Support module for HttpKernel tests.' package: Testing version: VERSION diff --git a/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.routing.yml b/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.routing.yml new file mode 100644 index 000000000000..53d906ffa65b --- /dev/null +++ b/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.routing.yml @@ -0,0 +1,6 @@ +http_kernel_test.empty: + path: '/http-kernel-test' + defaults: + _controller: '\Drupal\http_kernel_test\Controller\TestController::get' + requirements: + _access: 'TRUE' diff --git a/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.services.yml b/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.services.yml new file mode 100644 index 000000000000..16b9ecd0a1db --- /dev/null +++ b/core/modules/system/tests/modules/http_kernel_test/http_kernel_test.services.yml @@ -0,0 +1,10 @@ +services: + http_kernel_test.test_middleware: + class: Drupal\http_kernel_test\HttpKernel\TestMiddleware + tags: + - { name: http_middleware } + http_kernel_test.test_middleware2: + class: Drupal\http_kernel_test\HttpKernel\TestMiddleware + arguments: ['test_argument'] + tags: + - { name: http_middleware, priority: 20 } diff --git a/core/modules/system/tests/modules/httpkernel_test/src/Controller/TestController.php b/core/modules/system/tests/modules/http_kernel_test/src/Controller/TestController.php similarity index 82% rename from core/modules/system/tests/modules/httpkernel_test/src/Controller/TestController.php rename to core/modules/system/tests/modules/http_kernel_test/src/Controller/TestController.php index 48a0cad00497..4387285e20e8 100644 --- a/core/modules/system/tests/modules/httpkernel_test/src/Controller/TestController.php +++ b/core/modules/system/tests/modules/http_kernel_test/src/Controller/TestController.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\httpkernel_test\Controller; +namespace Drupal\http_kernel_test\Controller; use Symfony\Component\HttpFoundation\Response; diff --git a/core/modules/system/tests/modules/httpkernel_test/src/HttpKernel/TestMiddleware.php b/core/modules/system/tests/modules/http_kernel_test/src/HttpKernel/TestMiddleware.php similarity index 96% rename from core/modules/system/tests/modules/httpkernel_test/src/HttpKernel/TestMiddleware.php rename to core/modules/system/tests/modules/http_kernel_test/src/HttpKernel/TestMiddleware.php index 8cab8452f5c3..0287b93e0241 100644 --- a/core/modules/system/tests/modules/httpkernel_test/src/HttpKernel/TestMiddleware.php +++ b/core/modules/system/tests/modules/http_kernel_test/src/HttpKernel/TestMiddleware.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\httpkernel_test\HttpKernel; +namespace Drupal\http_kernel_test\HttpKernel; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml b/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml deleted file mode 100644 index 7de4338c755c..000000000000 --- a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml +++ /dev/null @@ -1,6 +0,0 @@ -httpkernel_test.empty: - path: '/httpkernel-test' - defaults: - _controller: '\Drupal\httpkernel_test\Controller\TestController::get' - requirements: - _access: 'TRUE' diff --git a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.services.yml b/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.services.yml deleted file mode 100644 index c4784de32b6a..000000000000 --- a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.services.yml +++ /dev/null @@ -1,10 +0,0 @@ -services: - httpkernel_test.test_middleware: - class: Drupal\httpkernel_test\HttpKernel\TestMiddleware - tags: - - { name: http_middleware } - httpkernel_test.test_middleware2: - class: Drupal\httpkernel_test\HttpKernel\TestMiddleware - arguments: ['test_argument'] - tags: - - { name: http_middleware, priority: 20 } diff --git a/core/modules/system/tests/modules/path_encoded_test/path_encoded_test.routing.yml b/core/modules/system/tests/modules/path_encoded_test/path_encoded_test.routing.yml index 4450c96ec406..abdde646c023 100644 --- a/core/modules/system/tests/modules/path_encoded_test/path_encoded_test.routing.yml +++ b/core/modules/system/tests/modules/path_encoded_test/path_encoded_test.routing.yml @@ -14,7 +14,7 @@ path_encoded_test.at_sign: requirements: _access: 'TRUE' -path_encoded_test.parens: +path_encoded_test.parentheses: path: '/cat(box)' defaults: _title: 'At sign' diff --git a/core/modules/system/tests/modules/render_attached_test/src/Controller/RenderAttachedTestController.php b/core/modules/system/tests/modules/render_attached_test/src/Controller/RenderAttachedTestController.php index 955e3daa221d..eae1cbff5e54 100644 --- a/core/modules/system/tests/modules/render_attached_test/src/Controller/RenderAttachedTestController.php +++ b/core/modules/system/tests/modules/render_attached_test/src/Controller/RenderAttachedTestController.php @@ -46,7 +46,7 @@ public function head() { [ '#tag' => 'meta', '#attributes' => [ - 'test-attribute' => 'testvalue', + 'test-attribute' => 'test_value', ], ], 'test_head_attribute', diff --git a/core/modules/system/tests/modules/system_module_test/system_module_test.module b/core/modules/system/tests/modules/system_module_test/system_module_test.module index 69c92949f1f9..a16c344d0d54 100644 --- a/core/modules/system/tests/modules/system_module_test/system_module_test.module +++ b/core/modules/system/tests/modules/system_module_test/system_module_test.module @@ -10,7 +10,7 @@ */ function system_module_test_page_attachments_alter(&$page) { // Remove the HTML5 mobile meta-tags. - $meta_tags_to_remove = ['MobileOptimized', 'HandheldFriendly', 'viewport', 'cleartype']; + $meta_tags_to_remove = ['MobileOptimized', 'HandheldFriendly', 'viewport', 'ClearType']; foreach ($page['#attached']['html_head'] as $index => $parts) { if (in_array($parts[1], $meta_tags_to_remove)) { unset($page['#attached']['html_head'][$index]); diff --git a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php index 885443ec15fd..8b46404bba4c 100644 --- a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php +++ b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php @@ -144,7 +144,7 @@ protected function assertFeed(): void { */ protected function assertHead(): void { // Discover the DOM element for the meta link. - $test_meta = $this->xpath('//head/meta[@test-attribute="testvalue"]'); + $test_meta = $this->xpath('//head/meta[@test-attribute="test_value"]'); $this->assertCount(1, $test_meta, 'There\'s only one test attribute.'); // Grab the only DOM element. $test_meta = reset($test_meta); @@ -152,7 +152,7 @@ protected function assertHead(): void { $this->fail('Unable to find the head meta.'); } else { - $this->assertEquals('testvalue', $test_meta->getAttribute('test-attribute')); + $this->assertEquals('test_value', $test_meta->getAttribute('test-attribute')); } } diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tokens.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tokens.yml index 0aa830838c81..7dc33c342b0f 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tokens.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tokens.yml @@ -90,8 +90,8 @@ display: type: mini options: items_per_page: 2 - title: 'Test token page with minipager' - path: test_tokens_minipager + title: 'Test token page with mini pager' + path: test_tokens_mini_pager display_extenders: { } header: area: diff --git a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php index ecbd549cbfe1..0c46533b58a1 100644 --- a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php +++ b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php @@ -85,7 +85,7 @@ public function testTokenReplacementWithMiniPager() { '[view:label]' => 'Test tokens', '[view:description]' => 'Test view to token replacement tests.', '[view:id]' => 'test_tokens', - '[view:title]' => 'Test token page with minipager', + '[view:title]' => 'Test token page with mini pager', '[view:url]' => $view->getUrl(NULL, 'page_3') ->setAbsolute(TRUE) ->toString(), diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php index 6c4621431d00..bf4324966ec7 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php @@ -98,7 +98,7 @@ public function testAjaxCommands() { // Tests the 'data' command. $page->pressButton("AJAX data command: Issue command."); $this->assertTrue($page->waitFor(10, function () use ($session) { - return 'testvalue' === $session->evaluateScript('window.jQuery("#data_div").data("testkey")'); + return 'test_value' === $session->evaluateScript('window.jQuery("#data_div").data("testkey")'); })); // Tests the 'html' command. diff --git a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php index 54eb045f85d3..35f01979d309 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php @@ -30,7 +30,7 @@ public function testGetEncoded() { $route_paths = [ 'path_encoded_test.colon' => '/hi/llama:party', 'path_encoded_test.at_sign' => '/blog/@Dries', - 'path_encoded_test.parens' => '/cat(box)', + 'path_encoded_test.parentheses' => '/cat(box)', ]; foreach ($route_paths as $route_name => $path) { $this->drupalGet(Url::fromRoute($route_name)); @@ -42,7 +42,7 @@ public function testAliasToEncoded() { $route_paths = [ 'path_encoded_test.colon' => '/hi/llama:party', 'path_encoded_test.at_sign' => '/blog/@Dries', - 'path_encoded_test.parens' => '/cat(box)', + 'path_encoded_test.parentheses' => '/cat(box)', ]; $aliases = []; foreach ($route_paths as $route_name => $path) { diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php index 852a6f6d3d7b..adf5099d902d 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php @@ -70,8 +70,8 @@ public function testSchemaMapping() { $expected['class'] = Mapping::class; $expected['mapping']['langcode']['type'] = 'langcode'; $expected['mapping']['_core']['type'] = '_core_config_info'; - $expected['mapping']['testitem'] = ['label' => 'Test item']; - $expected['mapping']['testlist'] = ['label' => 'Test list']; + $expected['mapping']['test_item'] = ['label' => 'Test item']; + $expected['mapping']['test_list'] = ['label' => 'Test list']; $expected['type'] = 'config_schema_test.some_schema'; $expected['definition_class'] = '\Drupal\Core\TypedData\MapDataDefinition'; $expected['unwrap_for_canonical_representation'] = TRUE; @@ -80,7 +80,7 @@ public function testSchemaMapping() { // Check type detection on elements with undefined types. $config = \Drupal::service('config.typed')->get('config_schema_test.some_schema'); - $definition = $config->get('testitem')->getDataDefinition()->toArray(); + $definition = $config->get('test_item')->getDataDefinition()->toArray(); $expected = []; $expected['label'] = 'Test item'; $expected['class'] = Undefined::class; @@ -88,7 +88,7 @@ public function testSchemaMapping() { $expected['definition_class'] = '\Drupal\Core\TypedData\DataDefinition'; $expected['unwrap_for_canonical_representation'] = TRUE; $this->assertEquals($expected, $definition, 'Automatic type detected for a scalar is undefined.'); - $definition = $config->get('testlist')->getDataDefinition()->toArray(); + $definition = $config->get('test_list')->getDataDefinition()->toArray(); $expected = []; $expected['label'] = 'Test list'; $expected['class'] = Undefined::class; @@ -251,10 +251,10 @@ public function testSchemaMapping() { $expected['class'] = Mapping::class; $expected['mapping']['langcode']['type'] = 'langcode'; $expected['mapping']['_core']['type'] = '_core_config_info'; - $expected['mapping']['testid']['type'] = 'string'; - $expected['mapping']['testid']['label'] = 'ID'; - $expected['mapping']['testdescription']['type'] = 'text'; - $expected['mapping']['testdescription']['label'] = 'Description'; + $expected['mapping']['test_id']['type'] = 'string'; + $expected['mapping']['test_id']['label'] = 'ID'; + $expected['mapping']['test_description']['type'] = 'text'; + $expected['mapping']['test_description']['label'] = 'Description'; $expected['type'] = 'config_schema_test.some_schema.some_module.*.*'; $expected['definition_class'] = '\Drupal\Core\TypedData\MapDataDefinition'; $expected['unwrap_for_canonical_representation'] = TRUE; @@ -275,7 +275,7 @@ public function testSchemaMappingWithParents() { // Test fetching parent one level up. $entry = $config_data->get('one_level'); - $definition = $entry->get('testitem')->getDataDefinition()->toArray(); + $definition = $entry->get('test_item')->getDataDefinition()->toArray(); $expected = [ 'type' => 'config_schema_test.some_schema.with_parents.key_1', 'label' => 'Test item nested one level', @@ -287,7 +287,7 @@ public function testSchemaMappingWithParents() { // Test fetching parent two levels up. $entry = $config_data->get('two_levels'); - $definition = $entry->get('wrapper')->get('testitem')->getDataDefinition()->toArray(); + $definition = $entry->get('wrapper')->get('test_item')->getDataDefinition()->toArray(); $expected = [ 'type' => 'config_schema_test.some_schema.with_parents.key_2', 'label' => 'Test item nested two levels', @@ -299,7 +299,7 @@ public function testSchemaMappingWithParents() { // Test fetching parent three levels up. $entry = $config_data->get('three_levels'); - $definition = $entry->get('wrapper_1')->get('wrapper_2')->get('testitem')->getDataDefinition()->toArray(); + $definition = $entry->get('wrapper_1')->get('wrapper_2')->get('test_item')->getDataDefinition()->toArray(); $expected = [ 'type' => 'config_schema_test.some_schema.with_parents.key_3', 'label' => 'Test item nested three levels', @@ -525,10 +525,10 @@ public function testSchemaFallback() { $expected['unwrap_for_canonical_representation'] = TRUE; $expected['mapping']['langcode']['type'] = 'langcode'; $expected['mapping']['_core']['type'] = '_core_config_info'; - $expected['mapping']['testid']['type'] = 'string'; - $expected['mapping']['testid']['label'] = 'ID'; - $expected['mapping']['testdescription']['type'] = 'text'; - $expected['mapping']['testdescription']['label'] = 'Description'; + $expected['mapping']['test_id']['type'] = 'string'; + $expected['mapping']['test_id']['label'] = 'ID'; + $expected['mapping']['test_description']['type'] = 'text'; + $expected['mapping']['test_description']['label'] = 'Description'; $expected['type'] = 'config_schema_test.wildcard_fallback.*'; $expected['constraints'] = ['ValidKeys' => '<infer>']; diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php index fa93d56e79fc..e14dc736a86b 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php @@ -56,7 +56,7 @@ protected function delete($name) { /** * Tests the FileStorage::listAll method with a relative and absolute path. */ - public function testlistAll() { + public function testListAll() { $expected_files = [ 'core.extension', 'system.performance', diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php index f59293260a00..409cd67164cd 100644 --- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php @@ -33,9 +33,9 @@ public function testFileMimeTypeDetection() { 'pcf.z' => 'application/octet-stream', 'jar' => 'application/octet-stream', 'some.junk' => 'application/octet-stream', - 'foo.file_test_1' => 'madeup/file_test_1', - 'foo.file_test_2' => 'madeup/file_test_2', - 'foo.doc' => 'madeup/doc', + 'foo.file_test_1' => 'made_up/file_test_1', + 'foo.file_test_2' => 'made_up/file_test_2', + 'foo.doc' => 'made_up/doc', 'test.ogg' => 'audio/ogg', ]; diff --git a/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php index 6dee2fabcc3f..840c59a1fc0a 100644 --- a/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php +++ b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php @@ -19,13 +19,13 @@ class StackKernelIntegrationTest extends KernelTestBase { * * @var array */ - protected static $modules = ['httpkernel_test', 'system']; + protected static $modules = ['http_kernel_test', 'system']; /** * Tests a request. */ public function testRequest() { - $request = Request::create((new Url('httpkernel_test.empty'))->toString()); + $request = Request::create((new Url('http_kernel_test.empty'))->toString()); /** @var \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel */ $http_kernel = \Drupal::service('http_kernel'); $http_kernel->handle($request, HttpKernelInterface::MAIN_REQUEST, FALSE); diff --git a/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php b/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php index 554ed8dbeccd..54655e722c10 100644 --- a/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php +++ b/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php @@ -32,7 +32,7 @@ public function testGet() { $this->assertEquals([ // This property wasn't in our definition but is defined as a property on // our plugin class. - 'defaultProperty' => 'testvalue', + 'defaultProperty' => 'test_value', 1 => 'oak', 'foo' => 'bar', 'biz' => [ @@ -95,6 +95,6 @@ public function testSetClass() { * {@inheritdoc} */ class PluginStub extends Plugin { - protected $defaultProperty = 'testvalue'; + protected $defaultProperty = 'test_value'; } -- GitLab