From 8b368d712d8390076574425370b327e2355c553c Mon Sep 17 00:00:00 2001 From: catch <6915-catch@users.noreply.drupalcode.org> Date: Tue, 13 Aug 2024 18:01:16 +0900 Subject: [PATCH] Issue #3466813 by quietone: Fix 6 spelling words in tests --- .../Test/SimpletestTestRunResultsStorage.php | 4 +- core/misc/cspell/dictionary.txt | 6 -- core/misc/cspell/drupal-dictionary.txt | 1 + .../JsonApiFilterRegressionTest.php | 4 +- .../Functional/JsonApiPatchRegressionTest.php | 4 +- .../src/Functional/JsonApiRegressionTest.php | 4 +- ...y_form_display.node.basic_page.default.yml | 4 +- ...y_view_display.node.basic_page.default.yml | 4 +- ...ld.node.basic_page.field_no_add_media.yml} | 6 +- ...field.storage.node.field_no_add_media.yml} | 4 +- .../common_test/common_test.libraries.yml | 2 +- .../Connection.php | 4 +- .../Install/Tasks.php | 2 +- .../Connection.php | 4 +- .../Install/Tasks.php | 2 +- .../Connection.php | 4 +- .../Install/Tasks.php | 2 +- .../DatabaseDriverProvidedByModuleTest.php | 6 +- ...llerExistingBrokenDatabaseSettingsTest.php | 4 +- .../InstallerNonDefaultDatabaseDriverTest.php | 2 +- .../Core/Asset/AttachedAssetsTest.php | 2 +- ...KernelTestBaseDatabaseDriverModuleTest.php | 4 +- .../Tests/Core/Database/UrlConversionTest.php | 72 +++++++++---------- .../Compiler/BackendCompilerPassTest.php | 26 +++---- .../Core/Extension/DatabaseDriverListTest.php | 6 +- 25 files changed, 89 insertions(+), 94 deletions(-) rename core/modules/media_library/tests/modules/media_library_test/config/install/{field.field.node.basic_page.field_noadd_media.yml => field.field.node.basic_page.field_no_add_media.yml} (82%) rename core/modules/media_library/tests/modules/media_library_test/config/install/{field.storage.node.field_noadd_media.yml => field.storage.node.field_no_add_media.yml} (82%) rename core/modules/system/tests/modules/driver_test/src/Driver/Database/{DrivertestMysql => DriverTestMysql}/Connection.php (74%) rename core/modules/system/tests/modules/driver_test/src/Driver/Database/{DrivertestMysql => DriverTestMysql}/Install/Tasks.php (82%) rename core/modules/system/tests/modules/driver_test/src/Driver/Database/{DrivertestMysqlDeprecatedVersion => DriverTestMysqlDeprecatedVersion}/Connection.php (87%) rename core/modules/system/tests/modules/driver_test/src/Driver/Database/{DrivertestMysqlDeprecatedVersion => DriverTestMysqlDeprecatedVersion}/Install/Tasks.php (83%) rename core/modules/system/tests/modules/driver_test/src/Driver/Database/{DrivertestPgsql => DriverTestPgsql}/Connection.php (74%) rename core/modules/system/tests/modules/driver_test/src/Driver/Database/{DrivertestPgsql => DriverTestPgsql}/Install/Tasks.php (82%) diff --git a/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php b/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php index 80514a8ac4dc..6addc207a776 100644 --- a/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php +++ b/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php @@ -133,8 +133,8 @@ public function getCurrentTestRunState(TestRun $test_run): array { // 'test_class' from {simpletest}. $select = $this->connection->select($max_message_id_subquery, 'st_sub'); $select->join('simpletest', 'st', '[st].[message_id] = [st_sub].[max_message_id]'); - $select->join('simpletest_test_id', 'sttid', '[st].[test_id] = [sttid].[test_id]'); - $select->addField('sttid', 'last_prefix', 'db_prefix'); + $select->join('simpletest_test_id', 'st_tid', '[st].[test_id] = [st_tid].[test_id]'); + $select->addField('st_tid', 'last_prefix', 'db_prefix'); $select->addField('st', 'test_class'); return $select->execute()->fetchAssoc(); diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 6480a51bbec5..c75d254d9627 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -175,7 +175,6 @@ dotenv downcasting dragtable drillable -drivertest dropbutton dropbuttons drupaldevdays @@ -184,7 +183,6 @@ drupalelementstylecommand drupalelementstyleediting drupalelementstyleui drupalhtmlbuilder -drupalimage drupalism drupalisms drupallink @@ -386,8 +384,6 @@ nightwatch nightwatchjs nikic nntp -noadd -nocache nocase nodir nofields @@ -566,7 +562,6 @@ streamwrappers strikethrough striptags strs -sttid styleguide stylelint stylelintcache @@ -621,7 +616,6 @@ tablesorts tabset tabwidth taskless -tcomment testbot testbots testgroups diff --git a/core/misc/cspell/drupal-dictionary.txt b/core/misc/cspell/drupal-dictionary.txt index 0f2405c2ea2f..0f0185307590 100644 --- a/core/misc/cspell/drupal-dictionary.txt +++ b/core/misc/cspell/drupal-dictionary.txt @@ -6,6 +6,7 @@ dependee's dependees drupalci druplicon +drupalimage drush langcode langcodes diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php index 4b6af8d4d6a6..4879aac46708 100644 --- a/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php +++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php @@ -48,7 +48,7 @@ class JsonApiFilterRegressionTest extends JsonApiFunctionalTestBase { public function testBundleSpecificTargetEntityTypeFromIssue2953207(): void { // Set up data model. $this->assertTrue($this->container->get('module_installer')->install(['comment'], TRUE), 'Installed modules.'); - $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'tcomment'); + $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'test_comment_type'); $this->rebuildAll(); // Create data. @@ -67,7 +67,7 @@ public function testBundleSpecificTargetEntityTypeFromIssue2953207(): void { $user = $this->drupalCreateUser([ 'access comments', ]); - $response = $this->request('GET', Url::fromUri('internal:/jsonapi/comment/tcomment?include=entity_id&filter[entity_id.name]=foobar'), [ + $response = $this->request('GET', Url::fromUri('internal:/jsonapi/comment/test_comment_type?include=entity_id&filter[entity_id.name]=foobar'), [ RequestOptions::AUTH => [ $user->getAccountName(), $user->pass_raw, diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php index b36cb8ce8aef..800d514e1c31 100644 --- a/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php +++ b/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php @@ -51,7 +51,7 @@ class JsonApiPatchRegressionTest extends JsonApiFunctionalTestBase { public function testBundleSpecificTargetEntityTypeFromIssue2953207(): void { // Set up data model. $this->assertTrue($this->container->get('module_installer')->install(['comment'], TRUE), 'Installed modules.'); - $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'tcomment'); + $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'test_comment_type'); $this->rebuildAll(); // Create data. @@ -70,7 +70,7 @@ public function testBundleSpecificTargetEntityTypeFromIssue2953207(): void { $user = $this->drupalCreateUser([ 'access comments', ]); - $response = $this->request('GET', Url::fromUri('internal:/jsonapi/comment/tcomment?include=entity_id&filter[entity_id.name]=foobar'), [ + $response = $this->request('GET', Url::fromUri('internal:/jsonapi/comment/test_comment_type?include=entity_id&filter[entity_id.name]=foobar'), [ RequestOptions::AUTH => [ $user->getAccountName(), $user->pass_raw, diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php index 81bbf299067c..1aa7e87987ab 100644 --- a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php +++ b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php @@ -56,7 +56,7 @@ public function testDeepNestedIncludeMultiTargetEntityTypeFieldFromIssue2973681( // Set up data model. $this->assertTrue($this->container->get('module_installer')->install(['comment'], TRUE), 'Installed modules.'); $this->addDefaultCommentField('node', 'article'); - $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'tcomment'); + $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'test_comment_type'); $this->drupalCreateContentType(['type' => 'page']); $this->createEntityReferenceField( 'node', @@ -68,7 +68,7 @@ public function testDeepNestedIncludeMultiTargetEntityTypeFieldFromIssue2973681( [ 'target_bundles' => [ 'comment' => 'comment', - 'tcomment' => 'tcomment', + 'test_comment_type' => 'test_comment_type', ], ], FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED diff --git a/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_form_display.node.basic_page.default.yml b/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_form_display.node.basic_page.default.yml index 7536145f9021..90fbbae8cf3c 100644 --- a/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_form_display.node.basic_page.default.yml +++ b/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_form_display.node.basic_page.default.yml @@ -5,7 +5,7 @@ dependencies: - field.field.node.basic_page.field_twin_media - field.field.node.basic_page.field_single_media_type - field.field.node.basic_page.field_unlimited_media - - field.field.node.basic_page.field_noadd_media + - field.field.node.basic_page.field_no_add_media - node.type.basic_page module: - media_library @@ -43,7 +43,7 @@ content: region: content settings: { } third_party_settings: { } - field_noadd_media: + field_no_add_media: type: media_library_widget weight: 123 region: content diff --git a/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_view_display.node.basic_page.default.yml b/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_view_display.node.basic_page.default.yml index 8533d1669a02..f17ce0c831dc 100644 --- a/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_view_display.node.basic_page.default.yml +++ b/core/modules/media_library/tests/modules/media_library_test/config/install/core.entity_view_display.node.basic_page.default.yml @@ -4,7 +4,7 @@ dependencies: config: - field.field.node.basic_page.field_twin_media - field.field.node.basic_page.field_unlimited_media - - field.field.node.basic_page.field_noadd_media + - field.field.node.basic_page.field_no_add_media - node.type.basic_page module: - user @@ -40,7 +40,7 @@ content: third_party_settings: { } weight: 101 region: content - field_noadd_media: + field_no_add_media: type: entity_reference_entity_view label: above settings: diff --git a/core/modules/media_library/tests/modules/media_library_test/config/install/field.field.node.basic_page.field_noadd_media.yml b/core/modules/media_library/tests/modules/media_library_test/config/install/field.field.node.basic_page.field_no_add_media.yml similarity index 82% rename from core/modules/media_library/tests/modules/media_library_test/config/install/field.field.node.basic_page.field_noadd_media.yml rename to core/modules/media_library/tests/modules/media_library_test/config/install/field.field.node.basic_page.field_no_add_media.yml index 327e0fb5847b..4415b9d02591 100644 --- a/core/modules/media_library/tests/modules/media_library_test/config/install/field.field.node.basic_page.field_noadd_media.yml +++ b/core/modules/media_library/tests/modules/media_library_test/config/install/field.field.node.basic_page.field_no_add_media.yml @@ -2,12 +2,12 @@ langcode: en status: true dependencies: config: - - field.storage.node.field_noadd_media + - field.storage.node.field_no_add_media - media.type.type_one - media.type.type_two - node.type.basic_page -id: node.basic_page.field_noadd_media -field_name: field_noadd_media +id: node.basic_page.field_no_add_media +field_name: field_no_add_media entity_type: node bundle: basic_page label: 'No add media' diff --git a/core/modules/media_library/tests/modules/media_library_test/config/install/field.storage.node.field_noadd_media.yml b/core/modules/media_library/tests/modules/media_library_test/config/install/field.storage.node.field_no_add_media.yml similarity index 82% rename from core/modules/media_library/tests/modules/media_library_test/config/install/field.storage.node.field_noadd_media.yml rename to core/modules/media_library/tests/modules/media_library_test/config/install/field.storage.node.field_no_add_media.yml index 80bb78a4dc97..42163f5f8f37 100644 --- a/core/modules/media_library/tests/modules/media_library_test/config/install/field.storage.node.field_noadd_media.yml +++ b/core/modules/media_library/tests/modules/media_library_test/config/install/field.storage.node.field_no_add_media.yml @@ -4,8 +4,8 @@ dependencies: module: - media - node -id: node.field_noadd_media -field_name: field_noadd_media +id: node.field_no_add_media +field_name: field_no_add_media entity_type: node type: entity_reference settings: diff --git a/core/modules/system/tests/modules/common_test/common_test.libraries.yml b/core/modules/system/tests/modules/common_test/common_test.libraries.yml index 093049e781dc..bd7fe58aa8db 100644 --- a/core/modules/system/tests/modules/common_test/common_test.libraries.yml +++ b/core/modules/system/tests/modules/common_test/common_test.libraries.yml @@ -41,7 +41,7 @@ js-header: # Library to test setting cache = FALSE, to prevent aggregation. no-cache: js: - nocache.js: { cache: false } + no_cache.js: { cache: false } order: js: diff --git a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Connection.php similarity index 74% rename from core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php rename to core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Connection.php index 9de6eda72cb3..3fdb7999c4cd 100644 --- a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php +++ b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Connection.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\driver_test\Driver\Database\DrivertestMysql; +namespace Drupal\driver_test\Driver\Database\DriverTestMysql; use Drupal\mysql\Driver\Database\mysql\Connection as CoreConnection; @@ -13,7 +13,7 @@ class Connection extends CoreConnection { * {@inheritdoc} */ public function driver() { - return 'DrivertestMysql'; + return 'DriverTestMysql'; } } diff --git a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Install/Tasks.php b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Install/Tasks.php similarity index 82% rename from core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Install/Tasks.php rename to core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Install/Tasks.php index 4a6f247bb9a1..85a8268392f9 100644 --- a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Install/Tasks.php +++ b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Install/Tasks.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\driver_test\Driver\Database\DrivertestMysql\Install; +namespace Drupal\driver_test\Driver\Database\DriverTestMysql\Install; use Drupal\mysql\Driver\Database\mysql\Install\Tasks as CoreTasks; diff --git a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Connection.php similarity index 87% rename from core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php rename to core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Connection.php index 447c3acd481d..7990f6b36907 100644 --- a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php +++ b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Connection.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion; +namespace Drupal\driver_test\Driver\Database\DriverTestMysqlDeprecatedVersion; use Drupal\mysql\Driver\Database\mysql\Connection as CoreConnection; @@ -22,7 +22,7 @@ class Connection extends CoreConnection { * {@inheritdoc} */ public function driver() { - return 'DrivertestMysqlDeprecatedVersion'; + return 'DriverTestMysqlDeprecatedVersion'; } /** diff --git a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Install/Tasks.php b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Install/Tasks.php similarity index 83% rename from core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Install/Tasks.php rename to core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Install/Tasks.php index 42a7c52d7e29..8a01b7499357 100644 --- a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Install/Tasks.php +++ b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Install/Tasks.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Install; +namespace Drupal\driver_test\Driver\Database\DriverTestMysqlDeprecatedVersion\Install; use Drupal\mysql\Driver\Database\mysql\Install\Tasks as CoreTasks; diff --git a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Connection.php similarity index 74% rename from core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php rename to core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Connection.php index f9f15f091d31..6df286dabd67 100644 --- a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php +++ b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Connection.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\driver_test\Driver\Database\DrivertestPgsql; +namespace Drupal\driver_test\Driver\Database\DriverTestPgsql; use Drupal\pgsql\Driver\Database\pgsql\Connection as CoreConnection; @@ -13,7 +13,7 @@ class Connection extends CoreConnection { * {@inheritdoc} */ public function driver() { - return 'DrivertestPgsql'; + return 'DriverTestPgsql'; } } diff --git a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Install/Tasks.php b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Install/Tasks.php similarity index 82% rename from core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Install/Tasks.php rename to core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Install/Tasks.php index 51fcd2796721..a66e0df62983 100644 --- a/core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Install/Tasks.php +++ b/core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Install/Tasks.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\driver_test\Driver\Database\DrivertestPgsql\Install; +namespace Drupal\driver_test\Driver\Database\DriverTestPgsql\Install; use Drupal\pgsql\Driver\Database\pgsql\Install\Tasks as CoreTasks; diff --git a/core/modules/system/tests/src/Functional/System/DatabaseDriverProvidedByModuleTest.php b/core/modules/system/tests/src/Functional/System/DatabaseDriverProvidedByModuleTest.php index 3c39819d6646..4e17c7288ff6 100644 --- a/core/modules/system/tests/src/Functional/System/DatabaseDriverProvidedByModuleTest.php +++ b/core/modules/system/tests/src/Functional/System/DatabaseDriverProvidedByModuleTest.php @@ -49,9 +49,9 @@ public function testDatabaseDriverIsProvidedByModuleButTheModuleIsNotEnabled(): 'password' => $connection_info['default']['password'], 'prefix' => $connection_info['default']['prefix'], 'host' => $connection_info['default']['host'], - 'driver' => 'Drivertest' . ucfirst($driver), - 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\Drivertest' . ucfirst($driver), - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/Drivertest' . ucfirst($driver), + 'driver' => 'DriverTest' . ucfirst($driver), + 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DriverTest' . ucfirst($driver), + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTest' . ucfirst($driver), 'dependencies' => [ $driver => [ 'namespace' => "Drupal\\{$driver}", diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php index 636300b14482..2c5931922933 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php @@ -34,8 +34,8 @@ protected function prepareEnvironment() { // not meet requirements. unset($connection_info['default']['pdo']); unset($connection_info['default']['init_commands']); - $connection_info['default']['driver'] = 'DrivertestMysqlDeprecatedVersion'; - $namespace = 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysqlDeprecatedVersion'; + $connection_info['default']['driver'] = 'DriverTestMysqlDeprecatedVersion'; + $namespace = 'Drupal\\driver_test\\Driver\\Database\\DriverTestMysqlDeprecatedVersion'; $connection_info['default']['namespace'] = $namespace; $connection_info['default']['autoload'] = \Drupal::service('extension.list.database_driver') ->get($namespace) diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php index d15135cdbd06..0eada97303bd 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php @@ -38,7 +38,7 @@ protected function setUpSettings() { $this->markTestSkipped("This test does not support the {$driver} database driver."); } $driverNamespace = Database::getConnection()->getConnectionOptions()['namespace']; - $this->testDriverName = 'Drivertest' . ucfirst($driver); + $this->testDriverName = 'DriverTest' . ucfirst($driver); $testDriverNamespace = "Drupal\\driver_test\\Driver\\Database\\{$this->testDriverName}"; // Assert that we are using the database drivers from the driver_test module. diff --git a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php index 60f18afa57c7..0f2235a85a71 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php @@ -255,7 +255,7 @@ public function testNoCache(): void { $assets = AttachedAssets::createFromRenderArray($build); $js = $this->assetResolver->getJsAssets($assets, FALSE, \Drupal::languageManager()->getCurrentLanguage())[1]; - $this->assertFalse($js['core/modules/system/tests/modules/common_test/nocache.js']['preprocess'], 'Setting cache to FALSE sets preprocess to FALSE when adding JavaScript.'); + $this->assertFalse($js['core/modules/system/tests/modules/common_test/no_cache.js']['preprocess'], 'Setting cache to FALSE sets preprocess to FALSE when adding JavaScript.'); } /** diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseDatabaseDriverModuleTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseDatabaseDriverModuleTest.php index b26046d290ea..e8dfc3be6f45 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBaseDatabaseDriverModuleTest.php +++ b/core/tests/Drupal/KernelTests/KernelTestBaseDatabaseDriverModuleTest.php @@ -30,7 +30,7 @@ protected function getDatabaseConnectionInfo() { if (in_array($database['driver'], ['mysql', 'pgsql'])) { // Change the used database driver to the one provided by the module // "driver_test". - $driver = 'Drivertest' . ucfirst($database['driver']); + $driver = 'DriverTest' . ucfirst($database['driver']); $database['driver'] = $driver; $database['namespace'] = 'Drupal\\driver_test\\Driver\\Database\\' . $driver; $database['autoload'] = "core/modules/system/tests/modules/driver_test/src/Driver/Database/$driver/"; @@ -57,7 +57,7 @@ protected function getDatabaseConnectionInfo() { */ public function testDatabaseDriverModuleEnabled(): void { $driver = Database::getConnection()->driver(); - if (!in_array($driver, ['DrivertestMysql', 'DrivertestPgsql'])) { + if (!in_array($driver, ['DriverTestMysql', 'DriverTestPgsql'])) { $this->markTestSkipped("This test does not support the {$driver} database driver."); } diff --git a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php index 4548ed42c3d9..39d4433abbc9 100644 --- a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php @@ -108,16 +108,16 @@ public static function providerConvertDbUrlToConnectionInfo() { FALSE, ], 'MySQL contrib test driver without prefix' => [ - 'DrivertestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test', + 'DriverTestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test', [ - 'driver' => 'DrivertestMysql', + 'driver' => 'DriverTestMysql', 'username' => 'test_user', 'password' => 'test_pass', 'host' => 'test_host', 'database' => 'test_database', 'port' => 3306, - 'namespace' => 'Drupal\driver_test\Driver\Database\DrivertestMysql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/', + 'namespace' => 'Drupal\driver_test\Driver\Database\DriverTestMysql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/', 'dependencies' => [ 'mysql' => [ 'namespace' => 'Drupal\mysql', @@ -132,17 +132,17 @@ public static function providerConvertDbUrlToConnectionInfo() { TRUE, ], 'MySQL contrib test driver with prefix' => [ - 'DrivertestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test#bar', + 'DriverTestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test#bar', [ - 'driver' => 'DrivertestMysql', + 'driver' => 'DriverTestMysql', 'username' => 'test_user', 'password' => 'test_pass', 'host' => 'test_host', 'database' => 'test_database', 'prefix' => 'bar', 'port' => 3306, - 'namespace' => 'Drupal\driver_test\Driver\Database\DrivertestMysql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/', + 'namespace' => 'Drupal\driver_test\Driver\Database\DriverTestMysql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/', 'dependencies' => [ 'mysql' => [ 'namespace' => 'Drupal\mysql', @@ -157,16 +157,16 @@ public static function providerConvertDbUrlToConnectionInfo() { TRUE, ], 'PostgreSQL contrib test driver without prefix' => [ - 'DrivertestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test', + 'DriverTestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test', [ - 'driver' => 'DrivertestPgsql', + 'driver' => 'DriverTestPgsql', 'username' => 'test_user', 'password' => 'test_pass', 'host' => 'test_host', 'database' => 'test_database', 'port' => 5432, - 'namespace' => 'Drupal\driver_test\Driver\Database\DrivertestPgsql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/', + 'namespace' => 'Drupal\driver_test\Driver\Database\DriverTestPgsql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/', 'dependencies' => [ 'mysql' => [ 'namespace' => 'Drupal\mysql', @@ -181,17 +181,17 @@ public static function providerConvertDbUrlToConnectionInfo() { TRUE, ], 'PostgreSQL contrib test driver with prefix' => [ - 'DrivertestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test#bar', + 'DriverTestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test#bar', [ - 'driver' => 'DrivertestPgsql', + 'driver' => 'DriverTestPgsql', 'username' => 'test_user', 'password' => 'test_pass', 'host' => 'test_host', 'database' => 'test_database', 'prefix' => 'bar', 'port' => 5432, - 'namespace' => 'Drupal\driver_test\Driver\Database\DrivertestPgsql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/', + 'namespace' => 'Drupal\driver_test\Driver\Database\DriverTestPgsql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/', 'dependencies' => [ 'mysql' => [ 'namespace' => 'Drupal\mysql', @@ -368,11 +368,11 @@ public static function providerGetConnectionInfoAsUrl() { 'prefix' => '', 'host' => 'test_host', 'port' => '3306', - 'driver' => 'DrivertestMysql', - 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/', + 'driver' => 'DriverTestMysql', + 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DriverTestMysql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/', ]; - $expected_url5 = 'DrivertestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test'; + $expected_url5 = 'DriverTestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test'; $info6 = [ 'database' => 'test_database', @@ -381,11 +381,11 @@ public static function providerGetConnectionInfoAsUrl() { 'prefix' => 'pre', 'host' => 'test_host', 'port' => '3306', - 'driver' => 'DrivertestMysql', - 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/', + 'driver' => 'DriverTestMysql', + 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DriverTestMysql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/', ]; - $expected_url6 = 'DrivertestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test#pre'; + $expected_url6 = 'DriverTestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test#pre'; $info7 = [ 'database' => 'test_database', @@ -394,11 +394,11 @@ public static function providerGetConnectionInfoAsUrl() { 'prefix' => '', 'host' => 'test_host', 'port' => '5432', - 'driver' => 'DrivertestPgsql', - 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DrivertestPgsql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/', + 'driver' => 'DriverTestPgsql', + 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DriverTestPgsql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/', ]; - $expected_url7 = 'DrivertestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test'; + $expected_url7 = 'DriverTestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test'; $info8 = [ 'database' => 'test_database', @@ -407,11 +407,11 @@ public static function providerGetConnectionInfoAsUrl() { 'prefix' => 'pre', 'host' => 'test_host', 'port' => '5432', - 'driver' => 'DrivertestPgsql', - 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DrivertestPgsql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/', + 'driver' => 'DriverTestPgsql', + 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DriverTestPgsql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/', ]; - $expected_url8 = 'DrivertestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test#pre'; + $expected_url8 = 'DriverTestPgsql://test_user:test_pass@test_host:5432/test_database?module=driver_test#pre'; $info9 = [ 'database' => 'test_database', @@ -420,9 +420,9 @@ public static function providerGetConnectionInfoAsUrl() { 'prefix' => '', 'host' => 'test_host', 'port' => '3306', - 'driver' => 'DrivertestMysql', - 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysql', - 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/', + 'driver' => 'DriverTestMysql', + 'namespace' => 'Drupal\\driver_test\\Driver\\Database\\DriverTestMysql', + 'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/', 'dependencies' => [ 'mysql' => [ 'namespace' => 'Drupal\mysql', @@ -434,7 +434,7 @@ public static function providerGetConnectionInfoAsUrl() { ], ], ]; - $expected_url9 = 'DrivertestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test'; + $expected_url9 = 'DriverTestMysql://test_user:test_pass@test_host:3306/test_database?module=driver_test'; return [ [$info1, $expected_url1], diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php index 1edc10dbe649..c89943346579 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php @@ -71,27 +71,27 @@ public function testProcess(): void { $this->backendPass->process($container); $this->assertEquals($prefix . 'Default', get_class($container->get('service'))); - // Set the mysql and the DrivertestMysql service, now the DrivertestMysql + // Set the mysql and the DriverTestMysql service, now the DriverTestMysql // service, as it is the driver override, should be used. - $container = $this->getDrivertestMysqlContainer($service); + $container = $this->getDriverTestMysqlContainer($service); $container->setDefinition('mysql.service', new Definition(__NAMESPACE__ . '\\ServiceClassMysql')); - $container->setDefinition('DrivertestMysql.service', new Definition(__NAMESPACE__ . '\\ServiceClassDrivertestMysql')); + $container->setDefinition('DriverTestMysql.service', new Definition(__NAMESPACE__ . '\\ServiceClassDriverTestMysql')); $this->backendPass->process($container); - $this->assertEquals($prefix . 'DrivertestMysql', get_class($container->get('service'))); + $this->assertEquals($prefix . 'DriverTestMysql', get_class($container->get('service'))); // Set the mysql service, now the mysql service, as it is the database_type // override, should be used. - $container = $this->getDrivertestMysqlContainer($service); + $container = $this->getDriverTestMysqlContainer($service); $container->setDefinition('mysql.service', new Definition(__NAMESPACE__ . '\\ServiceClassMysql')); $this->backendPass->process($container); $this->assertEquals($prefix . 'Mysql', get_class($container->get('service'))); - // Set the DrivertestMysql service, now the DrivertestMysql service, as it + // Set the DriverTestMysql service, now the DriverTestMysql service, as it // is the driver override, should be used. - $container = $this->getDrivertestMysqlContainer($service); - $container->setDefinition('DrivertestMysql.service', new Definition(__NAMESPACE__ . '\\ServiceClassDrivertestMysql')); + $container = $this->getDriverTestMysqlContainer($service); + $container->setDefinition('DriverTestMysql.service', new Definition(__NAMESPACE__ . '\\ServiceClassDriverTestMysql')); $this->backendPass->process($container); - $this->assertEquals($prefix . 'DrivertestMysql', get_class($container->get('service'))); + $this->assertEquals($prefix . 'DriverTestMysql', get_class($container->get('service'))); } /** @@ -133,7 +133,7 @@ protected function getMysqlContainer($service) { } /** - * Creates a container with a DrivertestMysql database mock definition in it. + * Creates a container with a DriverTestMysql database mock definition in it. * * This is necessary because the container clone does not clone the parameter * bag so the setParameter() call effects the parent container as well. @@ -143,10 +143,10 @@ protected function getMysqlContainer($service) { * * @return \Symfony\Component\DependencyInjection\ContainerBuilder */ - protected function getDrivertestMysqlContainer($service) { + protected function getDriverTestMysqlContainer($service) { $container = new ContainerBuilder(); $container->setDefinition('service', $service); - $mock = $this->getMockBuilder('Drupal\driver_test\Driver\Database\DrivertestMysql\Connection')->onlyMethods([])->disableOriginalConstructor()->getMock(); + $mock = $this->getMockBuilder('Drupal\driver_test\Driver\Database\DriverTestMysql\Connection')->onlyMethods([])->disableOriginalConstructor()->getMock(); $container->set('database', $mock); return $container; } @@ -165,5 +165,5 @@ class ServiceClassMariaDb extends ServiceClassMysql { class ServiceClassSqlite extends ServiceClassDefault { } -class ServiceClassDrivertestMysql extends ServiceClassDefault { +class ServiceClassDriverTestMysql extends ServiceClassDefault { } diff --git a/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php b/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php index 3d46565e0427..5c48fd026d59 100644 --- a/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php @@ -35,9 +35,9 @@ public static function providerDatabaseDrivers(): array { ['mysql', 'mysql', 'Drupal\\mysql\\Driver\\Database\\mysql'], ['pgsql', 'pgsql', 'Drupal\\pgsql\\Driver\\Database\\pgsql'], ['sqlite', 'sqlite', 'Drupal\\sqlite\\Driver\\Database\\sqlite'], - ['DrivertestMysql', 'driver_test', 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysql'], - ['DrivertestPgsql', 'driver_test', 'Drupal\\driver_test\\Driver\\Database\\DrivertestPgsql'], - ['DrivertestMysqlDeprecatedVersion', 'driver_test', 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysqlDeprecatedVersion'], + ['DriverTestMysql', 'driver_test', 'Drupal\\driver_test\\Driver\\Database\\DriverTestMysql'], + ['DriverTestPgsql', 'driver_test', 'Drupal\\driver_test\\Driver\\Database\\DriverTestPgsql'], + ['DriverTestMysqlDeprecatedVersion', 'driver_test', 'Drupal\\driver_test\\Driver\\Database\\DriverTestMysqlDeprecatedVersion'], ]; } -- GitLab