From 0eec7fe50df897d20b21f6bead9783b76c85cfec Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Mon, 9 Nov 2020 11:14:31 +0000 Subject: [PATCH] Issue #3138746 by jungle, rajandro, sja112, longwave, jameszhang023, quietone, dww: Fix 45 "shouldBeCamelCased" and related typos in core --- .../scaffold/files/default.settings.php | 6 +-- core/core.api.php | 10 ++-- core/includes/form.inc | 2 +- core/lib/Drupal/Core/Cache/PhpBackend.php | 6 +-- .../lib/Drupal/Core/Database/database.api.php | 2 +- core/lib/Drupal/Core/Extension/module.api.php | 50 +++++++++---------- .../EntityReferenceFormatterBase.php | 2 +- core/lib/Drupal/Core/Render/theme.api.php | 2 +- core/lib/Drupal/Core/Routing/routing.api.php | 2 +- .../Core/Template/Loader/FilesystemLoader.php | 2 +- core/misc/ajax.es6.js | 2 +- core/misc/cspell/dictionary.txt | 45 +---------------- .../Kernel/BlockContentAccessHandlerTest.php | 2 +- .../src/Unit/Access/DependentAccessTest.php | 2 +- .../install/config_schema_test.someschema.yml | 2 +- core/modules/editor/editor.api.php | 2 +- core/modules/editor/src/Annotation/Editor.php | 2 +- core/modules/field/field.api.php | 12 ++--- .../src/Kernel/FieldAttachStorageTest.php | 2 +- core/modules/field_ui/field_ui.api.php | 4 +- .../src/Functional/LayoutBuilderTest.php | 12 ++--- .../Kernel/LayoutEntityHelperTraitTest.php | 4 +- .../Unit/BlockComponentRenderArrayTest.php | 2 +- .../src/Unit/LayoutEntityHelperTraitTest.php | 2 +- core/modules/locale/locale.compare.inc | 4 +- .../src/Functional/NodeQueryAlterTest.php | 20 ++++---- .../Layout/LayoutTestDependenciesPlugin.php | 2 +- .../OffCanvasTestBase.php | 2 +- .../tests/src/Functional/UpdateCoreTest.php | 2 +- .../tests/src/Kernel/QueryGroupByTest.php | 4 +- core/scripts/password-hash.sh | 6 +-- ...istributionProfileExistingSettingsTest.php | 10 ++-- .../Installer/DistributionProfileTest.php | 14 +++--- ...istributionProfileTranslationQueryTest.php | 4 +- .../DistributionProfileTranslationTest.php | 4 +- .../Core/Config/ConfigSchemaTest.php | 2 +- .../Core/Database/RegressionTest.php | 6 +-- .../Core/Database/SelectComplexTest.php | 8 +-- .../Core/Entity/EntityQueryAggregateTest.php | 2 +- .../Core/Extension/ModuleInstallerTest.php | 2 +- .../ZfExtensionManagerSfContainerTest.php | 8 +-- .../Drupal/Tests/Component/Uuid/UuidTest.php | 4 +- .../Core/Assert/AssertLegacyTraitTest.php | 8 +-- .../Tests/Core/Asset/LibraryDiscoveryTest.php | 4 +- .../Tests/Core/Database/ConnectionTest.php | 14 +++--- .../Core/Database/InstallerObjectTest.php | 2 +- .../Tests/Core/Database/UrlConversionTest.php | 10 ++-- .../ActiveLinkResponseFilterTest.php | 34 ++++++------- .../Core/Extension/ExtensionDiscoveryTest.php | 12 ++--- .../Core/Extension/InfoParserUnitTest.php | 6 +-- .../Core/Form/FormStateDecoratorBaseTest.php | 20 ++++---- sites/default/default.settings.php | 6 +-- 52 files changed, 178 insertions(+), 221 deletions(-) diff --git a/core/assets/scaffold/files/default.settings.php b/core/assets/scaffold/files/default.settings.php index 800024129ec..0bb18b0da80 100644 --- a/core/assets/scaffold/files/default.settings.php +++ b/core/assets/scaffold/files/default.settings.php @@ -230,9 +230,9 @@ $databases = []; * Sample Database configuration format for a driver in a contributed module: * @code * $databases['default']['default'] = [ - * 'driver' => 'mydriver', - * 'namespace' => 'Drupal\mymodule\Driver\Database\mydriver', - * 'autoload' => 'modules/mymodule/src/Driver/Database/mydriver/', + * 'driver' => 'my_driver', + * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', + * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', * 'database' => 'databasename', * 'username' => 'sqlusername', * 'password' => 'sqlpassword', diff --git a/core/core.api.php b/core/core.api.php index 999ee3d9737..9df4ed87526 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -382,10 +382,10 @@ * be an admin path). Here's an example using the configurable_language config * entity: * @code - * mymodule.myroute: - * path: '/admin/mypath/{configurable_language}' + * my_module.my_route: + * path: '/admin/my-path/{configurable_language}' * defaults: - * _controller: '\Drupal\mymodule\MyController::myMethod' + * _controller: '\Drupal\my_module\MyController::myMethod' * options: * parameters: * configurable_language: @@ -809,7 +809,7 @@ * arguments, but they all include an argument $container of type * \Symfony\Component\DependencyInjection\ContainerInterface. * If you are defining one of these classes, in the create() or - * createInstance() method, call $container->get('myservice.name') to + * createInstance() method, call $container->get('my_service.name') to * instantiate a service. The results of these calls are generally passed to * the class constructor and saved as member variables in the class. * - For functions and class methods that do not have access to either of @@ -837,7 +837,7 @@ * @section sec_define Defining a service * If your module needs to define a new service, here are the steps: * - Choose a unique machine name for your service. Typically, this should - * start with your module name. Example: mymodule.myservice. + * start with your module name. Example: my_module.my_service. * - Create a PHP interface to define what your service does. * - Create a default class implementing your interface that provides your * service. If your class needs to use existing services (such as database diff --git a/core/includes/form.inc b/core/includes/form.inc index 4d69fa4c4f7..cb60be8f185 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -577,7 +577,7 @@ function template_preprocess_form_element_label(&$variables) { * array('my_function_2', array()), * ), * 'finished' => 'my_finished_callback', - * 'file' => 'path_to_file_containing_myfunctions', + * 'file' => 'path_to_file_containing_my_functions', * ); * batch_set($batch); * // Only needed if not inside a form _submit handler. diff --git a/core/lib/Drupal/Core/Cache/PhpBackend.php b/core/lib/Drupal/Core/Cache/PhpBackend.php index e4628781b21..96a2b834bda 100644 --- a/core/lib/Drupal/Core/Cache/PhpBackend.php +++ b/core/lib/Drupal/Core/Cache/PhpBackend.php @@ -184,7 +184,7 @@ class PhpBackend implements CacheBackendInterface { * {@inheritdoc} */ public function invalidate($cid) { - $this->invalidatebyHash($this->normalizeCid($cid)); + $this->invalidateByHash($this->normalizeCid($cid)); } /** @@ -193,7 +193,7 @@ class PhpBackend implements CacheBackendInterface { * @param string $cidhash * The hashed version of the original cache ID after being normalized. */ - protected function invalidatebyHash($cidhash) { + protected function invalidateByHash($cidhash) { if ($item = $this->getByHash($cidhash)) { $item->expire = REQUEST_TIME - 1; $this->writeItem($cidhash, $item); @@ -214,7 +214,7 @@ class PhpBackend implements CacheBackendInterface { */ public function invalidateAll() { foreach ($this->storage()->listAll() as $cidhash) { - $this->invalidatebyHash($cidhash); + $this->invalidateByHash($cidhash); } } diff --git a/core/lib/Drupal/Core/Database/database.api.php b/core/lib/Drupal/Core/Database/database.api.php index a7ccdc32a08..9ee436bb014 100644 --- a/core/lib/Drupal/Core/Database/database.api.php +++ b/core/lib/Drupal/Core/Database/database.api.php @@ -175,7 +175,7 @@ use Drupal\Core\Database\Query\SelectInterface; * try { * $id = $connection->insert('example') * ->fields(array( - * 'field1' => 'mystring', + * 'field1' => 'string', * 'field2' => 5, * )) * ->execute(); diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index cdfcca2ec08..935c5389d86 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -421,51 +421,51 @@ function hook_install_tasks(&$install_state) { // Here, we define a variable to allow tasks to indicate that a particular, // processor-intensive batch process needs to be triggered later on in the // installation. - $myprofile_needs_batch_processing = \Drupal::state()->get('myprofile.needs_batch_processing', FALSE); + $my_profile_needs_batch_processing = \Drupal::state()->get('my_profile.needs_batch_processing', FALSE); $tasks = [ // This is an example of a task that defines a form which the user who is // installing the site will be asked to fill out. To implement this task, - // your profile would define a function named myprofile_data_import_form() + // your profile would define a function named my_profile_data_import_form() // as a normal form API callback function, with associated validation and // submit handlers. In the submit handler, in addition to saving whatever // other data you have collected from the user, you might also call - // \Drupal::state()->set('myprofile.needs_batch_processing', TRUE) if the + // \Drupal::state()->set('my_profile.needs_batch_processing', TRUE) if the // user has entered data which requires that batch processing will need to // occur later on. - 'myprofile_data_import_form' => [ + 'my_profile_data_import_form' => [ 'display_name' => t('Data import options'), 'type' => 'form', ], // Similarly, to implement this task, your profile would define a function - // named myprofile_settings_form() with associated validation and submit + // named my_profile_settings_form() with associated validation and submit // handlers. This form might be used to collect and save additional // information from the user that your profile needs. There are no extra // steps required for your profile to act as an "installation wizard"; you // can simply define as many tasks of type 'form' as you wish to execute, // and the forms will be presented to the user, one after another. - 'myprofile_settings_form' => [ + 'my_profile_settings_form' => [ 'display_name' => t('Additional options'), 'type' => 'form', ], // This is an example of a task that performs batch operations. To // implement this task, your profile would define a function named - // myprofile_batch_processing() which returns a batch API array definition + // my_profile_batch_processing() which returns a batch API array definition // that the installer will use to execute your batch operations. Due to the - // 'myprofile.needs_batch_processing' variable used here, this task will be + // 'my_profile.needs_batch_processing' variable used here, this task will be // hidden and skipped unless your profile set it to TRUE in one of the // previous tasks. - 'myprofile_batch_processing' => [ + 'my_profile_batch_processing' => [ 'display_name' => t('Import additional data'), - 'display' => $myprofile_needs_batch_processing, + 'display' => $my_profile_needs_batch_processing, 'type' => 'batch', - 'run' => $myprofile_needs_batch_processing ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP, + 'run' => $my_profile_needs_batch_processing ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP, ], // This is an example of a task that will not be displayed in the list that // the user sees. To implement this task, your profile would define a - // function named myprofile_final_site_setup(), in which additional, + // function named my_profile_final_site_setup(), in which additional, // automated site setup operations would be performed. Since this is the // last task defined by your profile, you should also use this function to - // call \Drupal::state()->delete('myprofile.needs_batch_processing') and + // call \Drupal::state()->delete('my_profile.needs_batch_processing') and // clean up the state that was used above. If you want the user to pass // to the final Drupal installation tasks uninterrupted, return no output // from this function. Otherwise, return themed output that the user will @@ -473,7 +473,7 @@ function hook_install_tasks(&$install_state) { // tasks are complete, with a link to reload the current page and therefore // pass on to the final Drupal installation tasks when the user is ready to // do so). - 'myprofile_final_site_setup' => [], + 'my_profile_final_site_setup' => [], ]; return $tasks; } @@ -499,7 +499,7 @@ function hook_install_tasks(&$install_state) { function hook_install_tasks_alter(&$tasks, $install_state) { // Replace the entire site configuration form provided by Drupal core // with a custom callback function defined by this installation profile. - $tasks['install_configure_form']['function'] = 'myprofile_install_configure_form'; + $tasks['install_configure_form']['function'] = 'my_profile_install_configure_form'; } /** @@ -647,7 +647,7 @@ function hook_update_N(&$sandbox) { 'not null' => FALSE, ]; $schema = Database::getConnection()->schema(); - $schema->addField('mytable1', 'newcol', $spec); + $schema->addField('my_table', 'newcol', $spec); // Example of what to do if there is an error during your update. if ($some_error_condition_met) { @@ -660,26 +660,26 @@ function hook_update_N(&$sandbox) { // This must be the first run. Initialize the sandbox. $sandbox['progress'] = 0; $sandbox['current_pk'] = 0; - $sandbox['max'] = Database::getConnection()->query('SELECT COUNT([myprimarykey]) FROM {mytable1}')->fetchField(); + $sandbox['max'] = Database::getConnection()->query('SELECT COUNT([my_primary_key]) FROM {my_table}')->fetchField(); } // Update in chunks of 20. - $records = Database::getConnection()->select('mytable1', 'm') - ->fields('m', ['myprimarykey', 'otherfield']) - ->condition('myprimarykey', $sandbox['current_pk'], '>') + $records = Database::getConnection()->select('my_table', 'm') + ->fields('m', ['my_primary_key', 'other_field']) + ->condition('my_primary_key', $sandbox['current_pk'], '>') ->range(0, 20) - ->orderBy('myprimarykey', 'ASC') + ->orderBy('my_primary_key', 'ASC') ->execute(); foreach ($records as $record) { // Here, you would make an update something related to this record. In this // example, some text is added to the other field. - Database::getConnection()->update('mytable1') - ->fields(['otherfield' => $record->otherfield . '-suffix']) - ->condition('myprimarykey', $record->myprimarykey) + Database::getConnection()->update('my_table') + ->fields(['other_field' => $record->other_field . '-suffix']) + ->condition('my_primary_key', $record->my_primary_key) ->execute(); $sandbox['progress']++; - $sandbox['current_pk'] = $record->myprimarykey; + $sandbox['current_pk'] = $record->my_primary_key; } $sandbox['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php index 1db3f0ed9af..32bb0c0c4cb 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php @@ -70,7 +70,7 @@ abstract class EntityReferenceFormatterBase extends FormatterBase { * {@inheritdoc} * * @see ::prepareView() - * @see ::getEntitiestoView() + * @see ::getEntitiesToView() */ public function view(FieldItemListInterface $items, $langcode = NULL) { $elements = parent::view($items, $langcode); diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php index 12f485394c5..413449bef13 100644 --- a/core/lib/Drupal/Core/Render/theme.api.php +++ b/core/lib/Drupal/Core/Render/theme.api.php @@ -186,7 +186,7 @@ * @code * function THEME_page_attachments_alter(array &$page) { * if ($some_condition) { - * $page['#attached']['library'][] = 'mytheme/something'; + * $page['#attached']['library'][] = 'my_theme/something'; * } * } * @endcode diff --git a/core/lib/Drupal/Core/Routing/routing.api.php b/core/lib/Drupal/Core/Routing/routing.api.php index b505465cd6a..19d36f21386 100644 --- a/core/lib/Drupal/Core/Routing/routing.api.php +++ b/core/lib/Drupal/Core/Routing/routing.api.php @@ -111,7 +111,7 @@ * * If the route has placeholders (see @ref sec_placeholders above) the * placeholders will be passed to the method (using reflection) by name. - * For example, the placeholder '{myvar}' in a route will become the $myvar + * For example, the placeholder '{my_var}' in a route will become the $my_var * parameter to the method. * * Additionally, if a parameter is typed to one of the following special classes diff --git a/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php b/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php index 4edb6e2d8d7..1864b3e128c 100644 --- a/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php +++ b/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php @@ -11,7 +11,7 @@ use Twig\Loader\FilesystemLoader as TwigFilesystemLoader; * * This loader adds module and theme template paths as namespaces to the Twig * filesystem loader so that templates can be referenced by namespace, like - * @block/block.html.twig or @mytheme/page.html.twig. + * @block/block.html.twig or @my_theme/page.html.twig. */ class FilesystemLoader extends TwigFilesystemLoader { diff --git a/core/misc/ajax.es6.js b/core/misc/ajax.es6.js index b5285936ee5..ce7407eaf0b 100644 --- a/core/misc/ajax.es6.js +++ b/core/misc/ajax.es6.js @@ -462,7 +462,7 @@ // 1. /nojs/ // 2. /nojs$ - The end of a URL string. // 3. /nojs? - Followed by a query (e.g. path/nojs?destination=foobar). - // 4. /nojs# - Followed by a fragment (e.g.: path/nojs#myfragment). + // 4. /nojs# - Followed by a fragment (e.g.: path/nojs#my-fragment). const originalUrl = this.url; /** diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index cccdc84e975..81dedf574f7 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -144,7 +144,6 @@ bazinga bazqux bazs beatle -becalled beforeclose beforecreate beforeend @@ -355,7 +354,6 @@ data's databasefilename databasename datapoint -dataprovider datas datatypes datefield @@ -438,6 +436,7 @@ discoverability displaymessage displayname distincted +distro ditka divs dnumber @@ -528,7 +527,6 @@ enim enoki enregistrer entit -entitiesto entitynodeedit entityreference entitytype @@ -580,7 +578,6 @@ fieldable fieldapi fieldblock fieldbody -fieldby fieldgroups fielditem fieldlinks @@ -778,7 +775,6 @@ installable instantiator internal's introspectable -invalidateby invalidators invalididentifier invokable @@ -788,7 +784,6 @@ isam isdst isid isinstallable -isnew items's itoa itok @@ -862,7 +857,6 @@ libc libellé libicu libmysqlclient -librariesby libyaml licious lified @@ -1021,37 +1015,10 @@ muuh muun muuuh myclabs -myclass -mydistro -mydriver -myeditor -myeditoroverride -myfragment -myfrontpage -myfunctions -mymenu mymodule -mynewpassword -myothermenu -mypath -myprimarykey -myprofile -myproject -myrootuser -myroute -myselect -myservice -mysetting mysite mysqladmin mysqldump -mystring -mytab -mytable -mytheme -mytype -myvalue -myvar myverylongurl myverylongurlexample műveletek @@ -1120,9 +1087,6 @@ noschema noslash nosniff nostart -nosuchcolumn -nosuchindex -nosuchtable notag notawordenglish notawordgerman @@ -1175,11 +1139,6 @@ orgchart origdir oring ossp -otherfield -otherjob -othername -otherpage -otherprofile otsikko outdata outdent @@ -1694,7 +1653,6 @@ testkey testlist testload testname -testnoschema testproject testproperty testservice @@ -1906,7 +1864,6 @@ uri's url's urlalias urldecoding -urlto usecase userid userinfo diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php index 0f7e66c5c63..d8a1f9a53f5 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php @@ -156,7 +156,7 @@ class BlockContentAccessHandlerTest extends KernelTestBase { } /** - * Dataprovider for testAccess(). + * Data provider for testAccess(). */ public function providerTestAccess() { $cases = [ diff --git a/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php b/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php index 4e0074526e6..6fe62198686 100644 --- a/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php +++ b/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php @@ -134,7 +134,7 @@ class DependentAccessTest extends UnitTestCase { } /** - * Dataprovider for all test methods. + * Data provider for all test methods. * * Provides test cases for calling setAccessDependency() or * mergeAccessDependency() first. A call to either should behave the same on a diff --git a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.someschema.yml b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.someschema.yml index 26446d4390c..f783c1370ef 100644 --- a/core/modules/config/tests/config_schema_test/config/install/config_schema_test.someschema.yml +++ b/core/modules/config/tests/config_schema_test/config/install/config_schema_test.someschema.yml @@ -2,4 +2,4 @@ testitem: 'Since this file at least has top level schema in config_test.schema.y testlist: - 'Direct string items are identified and other items are' - 'recognized as undefined types.' -testnoschema: 12 +test_no_schema: 12 diff --git a/core/modules/editor/editor.api.php b/core/modules/editor/editor.api.php index 1d44a9f8d8c..8a55c3149ac 100644 --- a/core/modules/editor/editor.api.php +++ b/core/modules/editor/editor.api.php @@ -23,7 +23,7 @@ use Drupal\filter\FilterFormatInterface; */ function hook_editor_info_alter(array &$editors) { $editors['some_other_editor']['label'] = t('A different name'); - $editors['some_other_editor']['library']['module'] = 'myeditoroverride'; + $editors['some_other_editor']['library']['module'] = 'my_editor_override'; } /** diff --git a/core/modules/editor/src/Annotation/Editor.php b/core/modules/editor/src/Annotation/Editor.php index 83405d65f21..e90d2a15e2d 100644 --- a/core/modules/editor/src/Annotation/Editor.php +++ b/core/modules/editor/src/Annotation/Editor.php @@ -28,7 +28,7 @@ use Drupal\Component\Annotation\Plugin; * * @code * @Editor( - * id = "myeditor", + * id = "my_editor", * label = @Translation("My Editor"), * supports_content_filtering = FALSE, * supports_inline_editing = FALSE, diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php index 557ff58057f..0003e255afa 100644 --- a/core/modules/field/field.api.php +++ b/core/modules/field/field.api.php @@ -190,11 +190,11 @@ function hook_field_widget_info_alter(array &$info) { * @see hook_field_widget_multivalue_form_alter() */ function hook_field_widget_form_alter(&$element, \Drupal\Core\Form\FormStateInterface $form_state, $context) { - // Add a css class to widget form elements for all fields of type mytype. + // Add a css class to widget form elements for all fields of type my_type. $field_definition = $context['items']->getFieldDefinition(); - if ($field_definition->getType() == 'mytype') { + if ($field_definition->getType() == 'my_type') { // Be sure not to overwrite existing attributes. - $element['#attributes']['class'][] = 'myclass'; + $element['#attributes']['class'][] = 'my-class'; } } @@ -257,11 +257,11 @@ function hook_field_widget_WIDGET_TYPE_form_alter(&$element, \Drupal\Core\Form\F * @see hook_field_widget_multivalue_WIDGET_TYPE_form_alter() */ function hook_field_widget_multivalue_form_alter(array &$elements, \Drupal\Core\Form\FormStateInterface $form_state, array $context) { - // Add a css class to widget form elements for all fields of type mytype. + // Add a css class to widget form elements for all fields of type my_type. $field_definition = $context['items']->getFieldDefinition(); - if ($field_definition->getType() == 'mytype') { + if ($field_definition->getType() == 'my_type') { // Be sure not to overwrite existing attributes. - $elements['#attributes']['class'][] = 'myclass'; + $elements['#attributes']['class'][] = 'my-class'; } } diff --git a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php index a07bb73ac88..c175ae56d63 100644 --- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php +++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php @@ -122,7 +122,7 @@ class FieldAttachStorageTest extends FieldKernelTestBase { $values[$index][$field_name] = mt_rand(1, 127); $entity->$field_name->setValue(['value' => $values[$index][$field_name]]); } - $entity->enforceIsnew(); + $entity->enforceIsNew(); $entity->save(); } diff --git a/core/modules/field_ui/field_ui.api.php b/core/modules/field_ui/field_ui.api.php index 4d764ad8542..87f55ae6e1a 100644 --- a/core/modules/field_ui/field_ui.api.php +++ b/core/modules/field_ui/field_ui.api.php @@ -91,7 +91,7 @@ function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetIn */ function hook_field_formatter_settings_summary_alter(array &$summary, array $context) { // Append a message to the summary when an instance of foo_formatter has - // mysetting set to TRUE for the current view mode. + // my_setting set to TRUE for the current view mode. if ($context['formatter']->getPluginId() == 'foo_formatter') { if ($context['formatter']->getThirdPartySetting('my_module', 'my_setting')) { $summary[] = t('My setting enabled.'); @@ -114,7 +114,7 @@ function hook_field_formatter_settings_summary_alter(array &$summary, array $con */ function hook_field_widget_settings_summary_alter(array &$summary, array $context) { // Append a message to the summary when an instance of foo_widget has - // mysetting set to TRUE for the current view mode. + // my_setting set to TRUE for the current view mode. if ($context['widget']->getPluginId() == 'foo_widget') { if ($context['widget']->getThirdPartySetting('my_module', 'my_setting')) { $summary[] = t('My setting enabled.'); diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php index 3039e580776..271fc757949 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php @@ -572,11 +572,11 @@ class LayoutBuilderTest extends BrowserTestBase { // Create a new menu. $this->drupalGet('admin/structure/menu/add'); $page->fillField('label', 'My Menu'); - $page->fillField('id', 'mymenu'); + $page->fillField('id', 'my-menu'); $page->pressButton('Save'); $this->drupalGet('admin/structure/menu/add'); $page->fillField('label', 'My Menu'); - $page->fillField('id', 'myothermenu'); + $page->fillField('id', 'my-other-menu'); $page->pressButton('Save'); $page->clickLink('Add link'); @@ -595,7 +595,7 @@ class LayoutBuilderTest extends BrowserTestBase { $assert_session->elementExists('css', '.layout--layout-test-dependencies-plugin'); $assert_session->elementExists('css', '.field--name-body'); $page->pressButton('Save layout'); - $this->drupalPostForm('admin/structure/menu/manage/myothermenu/delete', [], 'Delete'); + $this->drupalPostForm('admin/structure/menu/manage/my-other-menu/delete', [], 'Delete'); $this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display/default/layout'); $assert_session->elementNotExists('css', '.layout--layout-test-dependencies-plugin'); $assert_session->elementExists('css', '.field--name-body'); @@ -617,17 +617,17 @@ class LayoutBuilderTest extends BrowserTestBase { // Assert that the blocks are visible, and save the layout. $assert_session->pageTextContains('Powered by Drupal'); $assert_session->pageTextContains('My Menu'); - $assert_session->elementExists('css', '.block.menu--mymenu'); + $assert_session->elementExists('css', '.block.menu--my-menu'); $page->pressButton('Save layout'); // Delete the menu. - $this->drupalPostForm('admin/structure/menu/manage/mymenu/delete', [], 'Delete'); + $this->drupalPostForm('admin/structure/menu/manage/my-menu/delete', [], 'Delete'); // Ensure that the menu block is gone, but that the other block remains. $this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display/default/layout'); $assert_session->pageTextContains('Powered by Drupal'); $assert_session->pageTextNotContains('My Menu'); - $assert_session->elementNotExists('css', '.block.menu--mymenu'); + $assert_session->elementNotExists('css', '.block.menu--my-menu'); } /** diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php index c1d4c30a66a..df528c00628 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php @@ -46,7 +46,7 @@ class LayoutEntityHelperTraitTest extends KernelTestBase { } /** - * Dataprovider for testGetSectionStorageForEntity(). + * Data provider for testGetSectionStorageForEntity(). */ public function providerTestGetSectionStorageForEntity() { $data = []; @@ -119,7 +119,7 @@ class LayoutEntityHelperTraitTest extends KernelTestBase { } /** - * Dataprovider for testOriginalEntityUsesDefaultStorage(). + * Data provider for testOriginalEntityUsesDefaultStorage(). */ public function providerTestOriginalEntityUsesDefaultStorage() { return [ diff --git a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php index 18890aaa078..cbd92bf2795 100644 --- a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php +++ b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php @@ -43,7 +43,7 @@ class BlockComponentRenderArrayTest extends UnitTestCase { protected $blockManager; /** - * Dataprovider for test functions that should test block types. + * Data provider for test functions that should test block types. */ public function providerBlockTypes() { return [ diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php index 71900e3dd8c..2f43967eb98 100644 --- a/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php +++ b/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php @@ -18,7 +18,7 @@ use Drupal\Tests\UnitTestCase; class LayoutEntityHelperTraitTest extends UnitTestCase { /** - * Dataprovider method for tests that need sections with inline blocks. + * Data provider method for tests that need sections with inline blocks. */ public function providerSectionsWithInlineComponents() { $components = []; diff --git a/core/modules/locale/locale.compare.inc b/core/modules/locale/locale.compare.inc index 317b45adb53..6100473ec3d 100644 --- a/core/modules/locale/locale.compare.inc +++ b/core/modules/locale/locale.compare.inc @@ -125,8 +125,8 @@ function locale_translation_project_list() { * * Custom modules or themes can bring their own gettext translation file. To * enable import of this file the module or theme defines "interface translation - * project = myproject" in its .info.yml file. This function will add a project - * "myproject" to the info data. + * project = my_project" in its .info.yml file. This function will add a project + * "my_project" to the info data. * * @param \Drupal\Core\Extension\Extension[] $data * Array of .info.yml file data. diff --git a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php index 319a83e52d4..ad9324244cb 100644 --- a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php +++ b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php @@ -70,8 +70,8 @@ class NodeQueryAlterTest extends NodeTestBase { public function testNodeQueryAlterLowLevelWithAccess() { // User with access should be able to view 4 nodes. try { - $query = Database::getConnection()->select('node', 'mytab') - ->fields('mytab'); + $query = Database::getConnection()->select('node', 'n') + ->fields('n'); $query->addTag('node_access'); $query->addMetaData('op', 'view'); $query->addMetaData('account', $this->accessUser); @@ -111,8 +111,8 @@ class NodeQueryAlterTest extends NodeTestBase { public function testNodeQueryAlterLowLevelNoAccess() { // User without access should be able to view 0 nodes. try { - $query = Database::getConnection()->select('node', 'mytab') - ->fields('mytab'); + $query = Database::getConnection()->select('node', 'n') + ->fields('n'); $query->addTag('node_access'); $query->addMetaData('op', 'view'); $query->addMetaData('account', $this->noAccessUser); @@ -134,8 +134,8 @@ class NodeQueryAlterTest extends NodeTestBase { public function testNodeQueryAlterLowLevelEditAccess() { // User with view-only access should not be able to edit nodes. try { - $query = Database::getConnection()->select('node', 'mytab') - ->fields('mytab'); + $query = Database::getConnection()->select('node', 'n') + ->fields('n'); $query->addTag('node_access'); $query->addMetaData('op', 'update'); $query->addMetaData('account', $this->accessUser); @@ -175,8 +175,8 @@ class NodeQueryAlterTest extends NodeTestBase { // privilege after adding the node_access record. drupal_static_reset('node_access_view_all_nodes'); try { - $query = $connection->select('node', 'mytab') - ->fields('mytab'); + $query = $connection->select('node', 'n') + ->fields('n'); $query->addTag('node_access'); $query->addMetaData('op', 'view'); $query->addMetaData('account', $this->noAccessUser); @@ -197,8 +197,8 @@ class NodeQueryAlterTest extends NodeTestBase { \Drupal::state()->set('node_access_test.no_access_uid', $this->noAccessUser->id()); drupal_static_reset('node_access_view_all_nodes'); try { - $query = $connection->select('node', 'mytab') - ->fields('mytab'); + $query = $connection->select('node', 'n') + ->fields('n'); $query->addTag('node_access'); $query->addMetaData('op', 'view'); $query->addMetaData('account', $this->noAccessUser); diff --git a/core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php b/core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php index 0aad55a36c2..6ad62101dd9 100644 --- a/core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php +++ b/core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php @@ -27,7 +27,7 @@ class LayoutTestDependenciesPlugin extends LayoutDefault implements DependentPlu */ public function calculateDependencies() { $dependencies = []; - $dependencies['config'][] = 'system.menu.myothermenu'; + $dependencies['config'][] = 'system.menu.my-other-menu'; return $dependencies; } diff --git a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php index 94ec6cc8e37..6836a500e58 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php +++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php @@ -122,7 +122,7 @@ abstract class OffCanvasTestBase extends WebDriverTestBase { } /** - * Dataprovider that returns theme name as the sole argument. + * Data provider that returns theme name as the sole argument. */ public function themeDataProvider() { $themes = $this->getTestThemes(); diff --git a/core/modules/update/tests/src/Functional/UpdateCoreTest.php b/core/modules/update/tests/src/Functional/UpdateCoreTest.php index 7cab37d0679..25263603a50 100644 --- a/core/modules/update/tests/src/Functional/UpdateCoreTest.php +++ b/core/modules/update/tests/src/Functional/UpdateCoreTest.php @@ -445,7 +445,7 @@ class UpdateCoreTest extends UpdateTestBase { } /** - * Dataprovider for testSecurityCoverageMessage(). + * Data provider for testSecurityCoverageMessage(). * * These test cases rely on the following fixtures containing the following * releases: diff --git a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php index 831514805b3..83d819f8ea6 100644 --- a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php +++ b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php @@ -75,8 +75,8 @@ class QueryGroupByTest extends ViewsKernelTestBase { $types[$item->entity_test_name] = $item->num_records; } - $this->assertEqual($types['name1'], 4, 'Groupby the name: name1 returned the expected amount of results.'); - $this->assertEqual($types['name2'], 3, 'Groupby the name: name2 returned the expected amount of results.'); + $this->assertEquals(4, $types['name1']); + $this->assertEquals(3, $types['name2']); } /** diff --git a/core/scripts/password-hash.sh b/core/scripts/password-hash.sh index 767e9489f82..336928a6cf1 100755 --- a/core/scripts/password-hash.sh +++ b/core/scripts/password-hash.sh @@ -36,8 +36,8 @@ if (in_array('--help', $_SERVER['argv']) || empty($_SERVER['argv'])) { Generate Drupal password hashes from the shell. -Usage: {$script} [OPTIONS] "" -Example: {$script} "mynewpassword" +Usage: {$script} [OPTIONS] "" +Example: {$script} "my-new-password" All arguments are long options. @@ -45,7 +45,7 @@ All arguments are long options. "<password1>" ["<password2>" ["<password3>" ...]] - One or more plan-text passwords enclosed by double quotes. The + One or more plaintext passwords enclosed by double quotes. The output hash may be manually entered into the {users_field_data}.pass field to change a password via SQL to a known value. diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php index 5764fc07dff..d1da6257529 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php @@ -43,9 +43,9 @@ class DistributionProfileExistingSettingsTest extends InstallerTestBase { ], ]; // File API functions are not available yet. - $path = $this->siteDirectory . '/profiles/mydistro'; + $path = $this->siteDirectory . '/profiles/my_distro'; mkdir($path, 0777, TRUE); - file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info)); + file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info)); // Pre-configure hash salt. // Any string is valid, so simply use the class name of this test. @@ -120,11 +120,11 @@ class DistributionProfileExistingSettingsTest extends InstallerTestBase { $this->assertText($this->rootUser->getAccountName()); // Confirm that Drupal recognizes this distribution as the current profile. - $this->assertEqual(\Drupal::installProfile(), 'mydistro'); - $this->assertEqual($this->config('core.extension')->get('profile'), 'mydistro', 'The install profile has been written to core.extension configuration.'); + $this->assertEqual(\Drupal::installProfile(), 'my_distro'); + $this->assertEqual($this->config('core.extension')->get('profile'), 'my_distro', 'The install profile has been written to core.extension configuration.'); $this->rebuildContainer(); - $this->assertEqual(\Drupal::installProfile(), 'mydistro'); + $this->assertEqual(\Drupal::installProfile(), 'my_distro'); } } diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php index b3c57af2d77..1e7b0bbc97a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php @@ -33,15 +33,15 @@ class DistributionProfileTest extends InstallerTestBase { 'name' => 'My Distribution', 'install' => [ 'theme' => 'bartik', - 'finish_url' => '/myrootuser', + 'finish_url' => '/root-user', ], ], ]; // File API functions are not available yet. - $path = $this->siteDirectory . '/profiles/mydistro'; + $path = $this->siteDirectory . '/profiles/my_distro'; mkdir($path, 0777, TRUE); - file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info)); - file_put_contents("$path/mydistro.install", "<?php function mydistro_install() {\Drupal::entityTypeManager()->getStorage('path_alias')->create(['path' => '/user/1', 'alias' => '/myrootuser'])->save();}"); + file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info)); + file_put_contents("$path/my_distro.install", "<?php function my_distro_install() {\Drupal::entityTypeManager()->getStorage('path_alias')->create(['path' => '/user/1', 'alias' => '/root-user'])->save();}"); } /** @@ -71,14 +71,14 @@ class DistributionProfileTest extends InstallerTestBase { * Confirms that the installation succeeded. */ public function testInstalled() { - $this->assertSession()->addressEquals('myrootuser'); + $this->assertSession()->addressEquals('root-user'); $this->assertSession()->statusCodeEquals(200); // Confirm that we are logged-in after installation. $this->assertText($this->rootUser->getAccountName()); // Confirm that Drupal recognizes this distribution as the current profile. - $this->assertEqual(\Drupal::installProfile(), 'mydistro'); - $this->assertEqual($this->config('core.extension')->get('profile'), 'mydistro', 'The install profile has been written to core.extension configuration.'); + $this->assertEqual(\Drupal::installProfile(), 'my_distro'); + $this->assertEqual($this->config('core.extension')->get('profile'), 'my_distro', 'The install profile has been written to core.extension configuration.'); } } diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php index 80844498af7..249b4b0e81c 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php @@ -48,9 +48,9 @@ class DistributionProfileTranslationQueryTest extends InstallerTestBase { ], ]; // File API functions are not available yet. - $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/mydistro'; + $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/my_distro'; mkdir($path, 0777, TRUE); - file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info)); + file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info)); // Place a custom local translation in the translations directory. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php index a037b4dd722..1c0fd51b9e9 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php @@ -50,9 +50,9 @@ class DistributionProfileTranslationTest extends InstallerTestBase { ], ]; // File API functions are not available yet. - $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/mydistro'; + $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/my_distro'; mkdir($path, 0777, TRUE); - file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info)); + file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info)); // Place a custom local translation in the translations directory. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php index 62be0c56eb5..59b7af3338d 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php @@ -96,7 +96,7 @@ class ConfigSchemaTest extends KernelTestBase { $expected['definition_class'] = '\Drupal\Core\TypedData\DataDefinition'; $expected['unwrap_for_canonical_representation'] = TRUE; $this->assertEqual($definition, $expected, 'Automatic type detected for a list is undefined.'); - $definition = $config->get('testnoschema')->getDataDefinition()->toArray(); + $definition = $config->get('test_no_schema')->getDataDefinition()->toArray(); $expected = []; $expected['label'] = 'Undefined'; $expected['class'] = Undefined::class; diff --git a/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php b/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php index 844e366c574..4e9bc574c61 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php @@ -39,7 +39,7 @@ class RegressionTest extends DatabaseTestBase { */ public function testDBTableExists() { $this->assertTrue($this->connection->schema()->tableExists('test'), 'Returns true for existent table.'); - $this->assertFalse($this->connection->schema()->tableExists('nosuchtable'), 'Returns false for nonexistent table.'); + $this->assertFalse($this->connection->schema()->tableExists('no_such_table'), 'Returns false for nonexistent table.'); } /** @@ -48,7 +48,7 @@ class RegressionTest extends DatabaseTestBase { public function testDBFieldExists() { $schema = $this->connection->schema(); $this->assertTrue($schema->fieldExists('test', 'name'), 'Returns true for existent column.'); - $this->assertFalse($schema->fieldExists('test', 'nosuchcolumn'), 'Returns false for nonexistent column.'); + $this->assertFalse($schema->fieldExists('test', 'no_such_column'), 'Returns false for nonexistent column.'); } /** @@ -56,7 +56,7 @@ class RegressionTest extends DatabaseTestBase { */ public function testDBIndexExists() { $this->assertTrue($this->connection->schema()->indexExists('test', 'ages'), 'Returns true for existent index.'); - $this->assertFalse($this->connection->schema()->indexExists('test', 'nosuchindex'), 'Returns false for nonexistent index.'); + $this->assertFalse($this->connection->schema()->indexExists('test', 'no_such_index'), 'Returns false for nonexistent index.'); } } diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php index c2d311953ff..ddf22985c30 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php @@ -324,12 +324,12 @@ class SelectComplexTest extends DatabaseTestBase { public function testJoinTwice() { $query = $this->connection->select('test')->fields('test'); $alias = $query->join('test', 'test', 'test.job = %alias.job'); - $query->addField($alias, 'name', 'othername'); - $query->addField($alias, 'job', 'otherjob'); + $query->addField($alias, 'name', 'other_name'); + $query->addField($alias, 'job', 'other_job'); $query->where("$alias.name <> test.name"); $crowded_job = $query->execute()->fetch(); - $this->assertEqual($crowded_job->job, $crowded_job->otherjob, 'Correctly joined same table twice.'); - $this->assertNotEqual($crowded_job->name, $crowded_job->othername, 'Correctly joined same table twice.'); + $this->assertEqual($crowded_job->job, $crowded_job->other_job, 'Correctly joined same table twice.'); + $this->assertNotEqual($crowded_job->name, $crowded_job->other_name, 'Correctly joined same table twice.'); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php index 6b88d40af08..02448d6cee7 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php @@ -517,7 +517,7 @@ class EntityQueryAggregateTest extends EntityKernelTestBase { ['field_test_1' => 1, 'field_test_2_count' => 2], ]); - // Groupby and aggregate by fieldapi field, and sort by the aggregated + // Group by and aggregate by Field API field, and sort by the aggregated // field. $this->queryResult = $this->entityStorage->getAggregateQuery() ->groupBy('field_test_1') diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php index 696a4f798b8..ed00b6bca34 100644 --- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php @@ -99,7 +99,7 @@ class ModuleInstallerTest extends KernelTestBase { } /** - * Dataprovider for testInvalidCoreInstall(). + * Data provider for testInvalidCoreInstall(). */ public function providerTestInvalidCoreInstall() { return [ diff --git a/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php b/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php index 88cac103dd8..89603f95af3 100644 --- a/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php +++ b/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php @@ -22,7 +22,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase { */ public function testGet() { $service = new \stdClass(); - $service->value = 'myvalue'; + $service->value = 'my_value'; $container = new ContainerBuilder(); $container->set('foo', $service); $bridge = new ZfExtensionManagerSfContainer(); @@ -42,7 +42,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase { */ public function testHas() { $service = new \stdClass(); - $service->value = 'myvalue'; + $service->value = 'my_value'; $container = new ContainerBuilder(); $container->set('foo', $service); $bridge = new ZfExtensionManagerSfContainer(); @@ -84,7 +84,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase { */ public function testPrefix() { $service = new \stdClass(); - $service->value = 'myvalue'; + $service->value = 'my_value'; $container = new ContainerBuilder(); $container->set('foo.bar', $service); $bridge = new ZfExtensionManagerSfContainer('foo.'); @@ -100,7 +100,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase { */ public function testCanonicalizeName($name, $canonical_name) { $service = new \stdClass(); - $service->value = 'myvalue'; + $service->value = 'my_value'; $container = new ContainerBuilder(); $container->set($canonical_name, $service); $bridge = new ZfExtensionManagerSfContainer(); diff --git a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php index e40da71387b..1253803155c 100644 --- a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php +++ b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php @@ -35,7 +35,7 @@ class UuidTest extends TestCase { } /** - * Dataprovider for UUID instance tests. + * Data provider for UUID instance tests. * * @return array */ @@ -74,7 +74,7 @@ class UuidTest extends TestCase { } /** - * Dataprovider for UUID instance tests. + * Data provider for UUID instance tests. * * @return array * An array of arrays containing diff --git a/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php b/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php index 66917051cae..5ca2024e86c 100644 --- a/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php @@ -170,10 +170,10 @@ class AssertLegacyTraitTest extends UnitTestCase { $option_field->hasAttribute('selected')->willReturn(TRUE); $this->webAssert - ->optionExists('myselect', 'two') + ->optionExists('my_select', 'two') ->willReturn($option_field->reveal()); - $this->assertOptionSelected('myselect', 'two'); + $this->assertOptionSelected('my_select', 'two'); } /** @@ -185,11 +185,11 @@ class AssertLegacyTraitTest extends UnitTestCase { $option_field->hasAttribute('selected')->willReturn(FALSE); $this->webAssert - ->optionExists('myselect', 'two') + ->optionExists('my_select', 'two') ->willReturn($option_field->reveal()); $this->expectException(ExpectationFailedException::class); - $this->assertOptionSelected('myselect', 'two'); + $this->assertOptionSelected('my_select', 'two'); } /** diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php index dcb3b0f1966..fd2f4189fe2 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php @@ -80,14 +80,14 @@ class LibraryDiscoveryTest extends UnitTestCase { * @covers ::getLibrariesByExtension */ public function testGetLibrariesByExtension() { - $this->libraryDiscovery->getLibrariesbyExtension('test'); + $this->libraryDiscovery->getLibrariesByExtension('test'); // Verify that subsequent calls don't trigger hook_library_info_alter() // and hook_js_settings_alter() invocations, nor do they talk to the // collector again. This ensures that the alterations made by // hook_library_info_alter() and hook_js_settings_alter() implementations // are statically cached, as desired. $this->libraryDiscovery->getLibraryByName('test', 'test_1'); - $this->libraryDiscovery->getLibrariesbyExtension('test'); + $this->libraryDiscovery->getLibrariesByExtension('test'); } /** diff --git a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php index ab8ad7b28bb..64efa325154 100644 --- a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php @@ -19,7 +19,7 @@ use Drupal\Tests\UnitTestCase; class ConnectionTest extends UnitTestCase { /** - * Dataprovider for testPrefixRoundTrip(). + * Data provider for testPrefixRoundTrip(). * * @return array * Array of arrays with the following elements: @@ -68,7 +68,7 @@ class ConnectionTest extends UnitTestCase { } /** - * Dataprovider for testPrefixTables(). + * Data provider for testPrefixTables(). * * @return array * Array of arrays with the following elements: @@ -117,7 +117,7 @@ class ConnectionTest extends UnitTestCase { } /** - * Dataprovider for testGetDriverClass(). + * Data provider for testGetDriverClass(). * * @return array * Array of arrays with the following elements: @@ -290,7 +290,7 @@ class ConnectionTest extends UnitTestCase { } /** - * Dataprovider for testSchema(). + * Data provider for testSchema(). * * @return array * Array of arrays with the following elements: @@ -366,7 +366,7 @@ class ConnectionTest extends UnitTestCase { } /** - * Dataprovider for testMakeComments(). + * Data provider for testMakeComments(). * * @return array * Array of arrays with the following elements: @@ -402,7 +402,7 @@ class ConnectionTest extends UnitTestCase { } /** - * Dataprovider for testFilterComments(). + * Data provider for testFilterComments(). * * @return array * Array of arrays with the following elements: @@ -644,7 +644,7 @@ class ConnectionTest extends UnitTestCase { } /** - * Dataprovider for testQueryTrim(). + * Data provider for testQueryTrim(). * * @return array * Array of arrays with the following elements: diff --git a/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php b/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php index 7b605e262e0..15f823a688f 100644 --- a/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php +++ b/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php @@ -47,7 +47,7 @@ class InstallerObjectTest extends UnitTestCase { } /** - * Dataprovider for testDbUrltoConnectionConversion(). + * Data provider for testDbUrlToConnectionConversion(). * * @return array * Array of arrays with the following elements: diff --git a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php index b4ab0ad7fee..59d9b0f9021 100644 --- a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php @@ -48,13 +48,13 @@ class UrlConversionTest extends UnitTestCase { * * @dataProvider providerConvertDbUrlToConnectionInfo */ - public function testDbUrltoConnectionConversion($root, $url, $database_array) { + public function testDbUrlToConnectionConversion($root, $url, $database_array) { $result = Database::convertDbUrlToConnectionInfo($url, $root ?: $this->root); $this->assertEquals($database_array, $result); } /** - * Dataprovider for testDbUrltoConnectionConversion(). + * Data provider for testDbUrlToConnectionConversion(). * * @return array * Array of arrays with the following elements: @@ -216,7 +216,7 @@ class UrlConversionTest extends UnitTestCase { } /** - * Dataprovider for testGetInvalidArgumentExceptionInUrlConversion(). + * Data provider for testGetInvalidArgumentExceptionInUrlConversion(). * * @return array * Array of arrays with the following elements: @@ -248,7 +248,7 @@ class UrlConversionTest extends UnitTestCase { } /** - * Dataprovider for testGetConnectionInfoAsUrl(). + * Data provider for testGetConnectionInfoAsUrl(). * * @return array * Array of arrays with the following elements: @@ -376,7 +376,7 @@ class UrlConversionTest extends UnitTestCase { } /** - * Dataprovider for testGetInvalidArgumentGetConnectionInfoAsUrl(). + * Data provider for testGetInvalidArgumentGetConnectionInfoAsUrl(). * * @return array * Array of arrays with the following elements: diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php index 30500e67a7d..6d3be86b9b1 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php @@ -78,7 +78,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { // Situations with context: front page, English, no query. $context = [ - 'path' => 'myfrontpage', + 'path' => 'my-front-page', 'front' => TRUE, 'language' => 'en', 'query' => [], @@ -87,7 +87,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { $situations[] = ['context' => $context, 'is active' => FALSE, 'attributes' => []]; // Matching path, plus all matching variations. $attributes = [ - 'data-drupal-link-system-path' => 'myfrontpage', + 'data-drupal-link-system-path' => 'my-front-page', ]; $situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes]; $situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes + ['hreflang' => 'en']]; @@ -217,7 +217,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { // Situations with context: front page, English, query. $context = [ - 'path' => 'myfrontpage', + 'path' => 'my-front-page', 'front' => TRUE, 'language' => 'en', 'query' => ['foo' => 'bar'], @@ -225,7 +225,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { $situations[] = ['context' => $context, 'is active' => FALSE, 'attributes' => []]; // Matching path, plus all matching variations. $attributes = [ - 'data-drupal-link-system-path' => 'myfrontpage', + 'data-drupal-link-system-path' => 'my-front-page', 'data-drupal-link-query' => Json::encode(['foo' => 'bar']), ]; $situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes]; @@ -254,13 +254,13 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { // Query with unsorted keys must match when the attribute is in sorted form. $context = [ - 'path' => 'myfrontpage', + 'path' => 'my-front-page', 'front' => TRUE, 'language' => 'en', 'query' => ['foo' => 'bar', 'baz' => 'qux'], ]; $attributes = [ - 'data-drupal-link-system-path' => 'myfrontpage', + 'data-drupal-link-system-path' => 'my-front-page', 'data-drupal-link-query' => Json::encode(['baz' => 'qux', 'foo' => 'bar']), ]; $situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes]; @@ -329,11 +329,11 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { // - the special matching path ('<front>') $front_special_link = '<a data-drupal-link-system-path="&lt;front&gt;">Front</a>'; $front_special_link_active = '<a data-drupal-link-system-path="&lt;front&gt;" class="is-active">Front</a>'; - $front_path_link = '<a data-drupal-link-system-path="myfrontpage">Front Path</a>'; - $front_path_link_active = '<a data-drupal-link-system-path="myfrontpage" class="is-active">Front Path</a>'; + $front_path_link = '<a data-drupal-link-system-path="my-front-page">Front Path</a>'; + $front_path_link_active = '<a data-drupal-link-system-path="my-front-page" class="is-active">Front Path</a>'; $data[] = [ 0 => $front_path_link . ' ' . $front_special_link, - 1 => 'myfrontpage', + 1 => 'my-front-page', 2 => TRUE, 3 => 'en', 4 => [], @@ -341,7 +341,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { ]; $data[] = [ 0 => $front_special_link . ' ' . $front_path_link, - 1 => 'myfrontpage', + 1 => 'my-front-page', 2 => TRUE, 3 => 'en', 4 => [], @@ -350,11 +350,11 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { // Test cases to verify that links to the front page do not get the // 'is-active' class when not on the front page. - $other_link = '<a data-drupal-link-system-path="otherpage">Other page</a>'; - $other_link_active = '<a data-drupal-link-system-path="otherpage" class="is-active">Other page</a>'; + $other_link = '<a data-drupal-link-system-path="other-page">Other page</a>'; + $other_link_active = '<a data-drupal-link-system-path="other-page" class="is-active">Other page</a>'; $data['<front>-and-other-link-on-other-path'] = [ 0 => $front_special_link . ' ' . $other_link, - 1 => 'otherpage', + 1 => 'other-page', 2 => FALSE, 3 => 'en', 4 => [], @@ -362,7 +362,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { ]; $data['front-and-other-link-on-other-path'] = [ 0 => $front_path_link . ' ' . $other_link, - 1 => 'otherpage', + 1 => 'other-page', 2 => FALSE, 3 => 'en', 4 => [], @@ -370,7 +370,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { ]; $data['other-and-<front>-link-on-other-path'] = [ 0 => $other_link . ' ' . $front_special_link, - 1 => 'otherpage', + 1 => 'other-page', 2 => FALSE, 3 => 'en', 4 => [], @@ -378,7 +378,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { ]; $data['other-and-front-link-on-other-path'] = [ 0 => $other_link . ' ' . $front_path_link, - 1 => 'otherpage', + 1 => 'other-page', 2 => FALSE, 3 => 'en', 4 => [], @@ -435,7 +435,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { ); // A link that might otherwise be set 'active'. - $content = '<a data-drupal-link-system-path="otherpage">Other page</a>'; + $content = '<a data-drupal-link-system-path="other-page">Other page</a>'; // Assert response with non-html content type gets ignored. $response = new Response(); diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php index f5d4e9f4f07..f40c2ac48d0 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php @@ -47,7 +47,7 @@ class ExtensionDiscoveryTest extends UnitTestCase { } if ($type === 'profile') { // Set profile directories for discovery of the other extension types. - $extension_discovery->setProfileDirectories(['myprofile' => 'profiles/myprofile']); + $extension_discovery->setProfileDirectories(['my_profile' => 'profiles/my_profile']); } } @@ -119,15 +119,15 @@ class ExtensionDiscoveryTest extends UnitTestCase { 'sites/default/profiles/minimal/minimal.info.yml' => [ 'type' => 'profile', ], - 'profiles/myprofile/myprofile.info.yml' => [ + 'profiles/my_profile/my_profile.info.yml' => [ 'type' => 'profile', ], - 'profiles/myprofile/modules/myprofile_nested_module/myprofile_nested_module.info.yml' => [], - 'profiles/otherprofile/otherprofile.info.yml' => [ + 'profiles/my_profile/modules/my_profile_nested_module/my_profile_nested_module.info.yml' => [], + 'profiles/other_profile/other_profile.info.yml' => [ 'type' => 'profile', ], 'core/modules/user/user.info.yml' => [], - 'profiles/otherprofile/modules/otherprofile_nested_module/otherprofile_nested_module.info.yml' => [], + 'profiles/other_profile/modules/other_profile_nested_module/other_profile_nested_module.info.yml' => [], 'core/modules/system/system.info.yml' => [], 'core/themes/seven/seven.info.yml' => [ 'type' => 'theme', @@ -167,7 +167,7 @@ class ExtensionDiscoveryTest extends UnitTestCase { $this->addFileToFilesystemStructure($filesystem_structure, $pieces, $content); } - unset($files_by_type_and_name_expected['module']['otherprofile_nested_module']); + unset($files_by_type_and_name_expected['module']['other_profile_nested_module']); return $files_by_type_and_name_expected; } diff --git a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php index 4f8213ab3de..96652b73340 100644 --- a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php @@ -334,7 +334,7 @@ CORE_8X; } /** - * Dataprovider for testCore8x(). + * Data provider for testCore8x(). */ public function providerCore8x() { return [ @@ -444,7 +444,7 @@ INVALID_CORE_VERSION_REQUIREMENT; } /** - * Dataprovider for testCoreVersionRequirementInvalid(). + * Data provider for testCoreVersionRequirementInvalid(). */ public function providerCoreVersionRequirementInvalid() { return [ @@ -583,7 +583,7 @@ CORE_INCOMPATIBILITY; } /** - * Dataprovider for testCoreIncompatibility(). + * Data provider for testCoreIncompatibility(). */ public function providerCoreIncompatibility() { list($major, $minor) = explode('.', \Drupal::VERSION); diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php index 573c3f1a0af..63dff16a8d4 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php @@ -182,7 +182,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { */ public function testSetExecuted() { $this->decoratedFormState->setExecuted() - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setExecuted()); } @@ -277,7 +277,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { */ public function testSetLimitValidationErrors($limit_validation_errors) { $this->decoratedFormState->setLimitValidationErrors($limit_validation_errors) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setLimitValidationErrors($limit_validation_errors)); } @@ -323,7 +323,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { */ public function testSetMethod($method) { $this->decoratedFormState->setMethod($method) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setMethod($method)); } @@ -340,7 +340,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { public function testIsMethodType($expected_return_value, $method_type) { $this->decoratedFormState->isMethodType($method_type) ->willReturn($expected_return_value) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($expected_return_value, $this->formStateDecoratorBase->isMethodType($method_type)); } @@ -405,7 +405,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { public function testIsValidationEnforced($must_validate) { $this->decoratedFormState->isValidationEnforced() ->willReturn($must_validate) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($must_validate, $this->formStateDecoratorBase->isValidationEnforced()); } @@ -463,7 +463,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { public function testIsProcessingInput($process_input) { $this->decoratedFormState->isProcessingInput() ->willReturn($process_input) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($process_input, $this->formStateDecoratorBase->isProcessingInput()); } @@ -477,7 +477,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { */ public function testSetProgrammed($programmed) { $this->decoratedFormState->setProgrammed($programmed) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setProgrammed($programmed)); } @@ -492,7 +492,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { public function testIsProgrammed($programmed) { $this->decoratedFormState->isProgrammed() ->willReturn($programmed) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($programmed, $this->formStateDecoratorBase->isProgrammed()); } @@ -506,7 +506,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { */ public function testSetProgrammedBypassAccessCheck($programmed_bypass_access_check) { $this->decoratedFormState->setProgrammedBypassAccessCheck($programmed_bypass_access_check) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setProgrammedBypassAccessCheck($programmed_bypass_access_check)); } @@ -824,7 +824,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { $this->decoratedFormState->getValidateHandlers() ->willReturn($validate_handlers) - ->shouldBecalled(); + ->shouldBeCalled(); $this->assertSame($validate_handlers, $this->formStateDecoratorBase->getValidateHandlers()); } diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 800024129ec..0bb18b0da80 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -230,9 +230,9 @@ $databases = []; * Sample Database configuration format for a driver in a contributed module: * @code * $databases['default']['default'] = [ - * 'driver' => 'mydriver', - * 'namespace' => 'Drupal\mymodule\Driver\Database\mydriver', - * 'autoload' => 'modules/mymodule/src/Driver/Database/mydriver/', + * 'driver' => 'my_driver', + * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', + * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', * 'database' => 'databasename', * 'username' => 'sqlusername', * 'password' => 'sqlpassword',