diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt
index 0e119e323cd..7b42dc8b4aa 100644
--- a/core/misc/cspell/dictionary.txt
+++ b/core/misc/cspell/dictionary.txt
@@ -18,7 +18,6 @@ ajaxing
akiko
allwords
alphadecimal
-alterjs
alternatif
amet
amphibius
@@ -132,8 +131,6 @@ bodyvalue
boing
bomofo
bonacieux
-boskoop
-boskop
bovigo
breezer
brion
@@ -343,7 +340,6 @@ drivertext
dropbutton
dropbuttons
drudbal
-drup
drupalci
drupaldatetime
drupaldevdays
@@ -368,7 +364,6 @@ drush
drépal
détruire
editables
-editunblock
eerste
egulias
eins
@@ -437,7 +432,6 @@ fieldsets
filelist
filemime
filesort
-filestorage
filesystems
filetransfer
filevalidationerror
@@ -454,7 +448,6 @@ fooalert
foobarbaz
foobargorilla
foofoo
-foos
formattable
formvalidation
fouc
@@ -743,7 +736,6 @@ negotiatiors
newcol
newfieldinitial
newnode
-newstr
newterm
newwin
nids
@@ -891,8 +883,6 @@ presetname
pretransaction
preuninstall
processlist
-projecta
-projectb
proname
prophesize
prophesized
@@ -973,7 +963,6 @@ revlog
revpub
ribisi
ritchie
-rolename
roly
routable
routeable
@@ -1033,7 +1022,6 @@ somemodule
someschema
somethinggeneric
sortablejs
-sourcedir
sourceediting
spacebar
spagna
@@ -1136,7 +1124,6 @@ tagstack
tagwords
takeshita
tappable
-targetdir
tarz
taskless
tatou
diff --git a/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php b/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php
index 63f3fcf8286..066edcb3fc5 100644
--- a/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php
@@ -46,14 +46,14 @@ class SearchTextProcessorTest extends KernelTestBase {
// \Drupal\search\SearchTextProcessorInterface::analyze().
$start = 0;
while ($start < mb_strlen($string)) {
- $newstr = mb_substr($string, $start, 30);
+ $new_string = mb_substr($string, $start, 30);
// Special case: leading zeros are removed from numeric strings,
// and there's one string in this file that is numbers starting with
// zero, so prepend a 1 on that string.
- if (preg_match('/^[0-9]+$/', $newstr)) {
- $newstr = '1' . $newstr;
+ if (preg_match('/^[0-9]+$/', $new_string)) {
+ $new_string = '1' . $new_string;
}
- $strings[] = $newstr;
+ $strings[] = $new_string;
$start += 30;
}
}
diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module
index 93787ff51b3..ecf0c50240a 100644
--- a/core/modules/system/tests/modules/common_test/common_test.module
+++ b/core/modules/system/tests/modules/common_test/common_test.module
@@ -251,9 +251,9 @@ function common_test_page_attachments_alter(array &$page) {
*/
function common_test_js_alter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) {
// Attach alter.js above tableselect.js.
- $alterjs = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js';
- if (array_key_exists($alterjs, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
- $javascript[$alterjs]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
+ $alter_js = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js';
+ if (array_key_exists($alter_js, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
+ $javascript[$alter_js]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
}
}
diff --git a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
index 9ddd26d9bc2..5f0ee86072e 100644
--- a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
+++ b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
@@ -79,23 +79,23 @@ class FileTransferTest extends BrowserTestBase {
// This convoluted piece of code is here because our testing framework does
// not support expecting exceptions.
- $gotit = FALSE;
+ $got_it = FALSE;
try {
$this->testConnection->copyDirectory($source, sys_get_temp_dir());
}
catch (FileTransferException $e) {
- $gotit = TRUE;
+ $got_it = TRUE;
}
- $this->assertTrue($gotit, 'Was not able to copy a directory outside of the jailed area.');
+ $this->assertTrue($got_it, 'Was not able to copy a directory outside of the jailed area.');
- $gotit = TRUE;
+ $got_it = TRUE;
try {
$this->testConnection->copyDirectory($source, $this->root . '/' . PublicStream::basePath());
}
catch (FileTransferException $e) {
- $gotit = FALSE;
+ $got_it = FALSE;
}
- $this->assertTrue($gotit, 'Was able to copy a directory inside of the jailed area');
+ $this->assertTrue($got_it, 'Was able to copy a directory inside of the jailed area');
}
}
diff --git a/core/modules/system/tests/src/Functional/System/RetrieveFileTest.php b/core/modules/system/tests/src/Functional/System/RetrieveFileTest.php
index f322322418c..9cb689ce404 100644
--- a/core/modules/system/tests/src/Functional/System/RetrieveFileTest.php
+++ b/core/modules/system/tests/src/Functional/System/RetrieveFileTest.php
@@ -24,15 +24,15 @@ class RetrieveFileTest extends BrowserTestBase {
// Test 404 handling by trying to fetch a randomly named file.
/** @var \Drupal\Core\File\FileSystemInterface $file_system */
$file_system = \Drupal::service('file_system');
- $file_system->mkdir($sourcedir = 'public://' . $this->randomMachineName());
+ $file_system->mkdir($source_dir = 'public://' . $this->randomMachineName());
// cSpell:disable-next-line
$filename = 'Файл для тестирования ' . $this->randomMachineName();
- $url = \Drupal::service('file_url_generator')->generateAbsoluteString($sourcedir . '/' . $filename);
+ $url = \Drupal::service('file_url_generator')->generateAbsoluteString($source_dir . '/' . $filename);
$retrieved_file = system_retrieve_file($url);
$this->assertFalse($retrieved_file, 'Non-existent file not fetched.');
// Actually create that file, download it via HTTP and test the returned path.
- file_put_contents($sourcedir . '/' . $filename, 'testing');
+ file_put_contents($source_dir . '/' . $filename, 'testing');
$retrieved_file = system_retrieve_file($url);
// URLs could not contains characters outside the ASCII set so $filename
@@ -47,15 +47,15 @@ class RetrieveFileTest extends BrowserTestBase {
$file_system->delete($retrieved_file);
// Test downloading file to a different location.
- $file_system->mkdir($targetdir = 'temporary://' . $this->randomMachineName());
- $retrieved_file = system_retrieve_file($url, $targetdir);
- $this->assertEquals("{$targetdir}/{$encoded_filename}", $retrieved_file, 'Sane path for downloaded file returned (temporary:// scheme).');
+ $file_system->mkdir($target_dir = 'temporary://' . $this->randomMachineName());
+ $retrieved_file = system_retrieve_file($url, $target_dir);
+ $this->assertEquals("{$target_dir}/{$encoded_filename}", $retrieved_file, 'Sane path for downloaded file returned (temporary:// scheme).');
$this->assertFileExists($retrieved_file);
$this->assertEquals(7, filesize($retrieved_file), 'File size of downloaded file is correct (temporary:// scheme).');
$file_system->delete($retrieved_file);
- $file_system->deleteRecursive($sourcedir);
- $file_system->deleteRecursive($targetdir);
+ $file_system->deleteRecursive($source_dir);
+ $file_system->deleteRecursive($target_dir);
}
}
diff --git a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
index c3d1b252b16..da25f5d65ab 100644
--- a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
@@ -55,8 +55,8 @@ class ThemeTest extends KernelTestBase {
// theme_test_false is an implemented theme hook so \Drupal::theme() service
// should return a string or an object that implements MarkupInterface,
// even though the theme function itself can return anything.
- $foos = ['null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo', 'empty_string' => ''];
- foreach ($foos as $type => $example) {
+ $types = ['null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo', 'empty_string' => ''];
+ foreach ($types as $type => $example) {
$output = \Drupal::theme()->render('theme_test_foo', ['foo' => $example]);
$this->assertTrue($output instanceof MarkupInterface || is_string($output), new FormattableMarkup('\Drupal::theme() returns an object that implements MarkupInterface or a string for data type @type.', ['@type' => $type]));
if ($output instanceof MarkupInterface) {
diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php
index 333a5c9c958..dce68b2ff13 100644
--- a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php
@@ -433,25 +433,25 @@ class UpdateSemverCoreTest extends UpdateSemverTestBase {
* Tests that exactly one fetch task per project is created and not more.
*/
public function testFetchTasks() {
- $projecta = [
+ $project_a = [
'name' => 'aaa_update_test',
];
- $projectb = [
+ $project_b = [
'name' => 'bbb_update_test',
];
$queue = \Drupal::queue('update_fetch_tasks');
$this->assertEquals(0, $queue->numberOfItems(), 'Queue is empty');
- update_create_fetch_task($projecta);
+ update_create_fetch_task($project_a);
$this->assertEquals(1, $queue->numberOfItems(), 'Queue contains one item');
- update_create_fetch_task($projectb);
+ update_create_fetch_task($project_b);
$this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items');
// Try to add a project again.
- update_create_fetch_task($projecta);
+ update_create_fetch_task($project_a);
$this->assertEquals(2, $queue->numberOfItems(), 'Queue still contains two items');
// Clear storage and try again.
update_storage_clear();
- update_create_fetch_task($projecta);
+ update_create_fetch_task($project_a);
$this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items');
}
diff --git a/core/modules/user/tests/src/Functional/UserAdminTest.php b/core/modules/user/tests/src/Functional/UserAdminTest.php
index 046a4095c1b..8c79b8fa620 100644
--- a/core/modules/user/tests/src/Functional/UserAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserAdminTest.php
@@ -143,15 +143,15 @@ class UserAdminTest extends BrowserTestBase {
$this->assertSession()->elementExists('xpath', static::getLinkSelectorForUser($user_c));
// Test unblocking of a user from /admin/people page and sending of activation mail
- $editunblock = [];
- $editunblock['action'] = 'user_unblock_user_action';
- $editunblock['user_bulk_form[4]'] = TRUE;
+ $edit_unblock = [];
+ $edit_unblock['action'] = 'user_unblock_user_action';
+ $edit_unblock['user_bulk_form[4]'] = TRUE;
$this->drupalGet('admin/people', [
// Sort the table by username so that we know reliably which user will be
// targeted with the blocking action.
'query' => ['order' => 'name', 'sort' => 'asc'],
]);
- $this->submitForm($editunblock, 'Apply to selected items');
+ $this->submitForm($edit_unblock, 'Apply to selected items');
$user_storage->resetCache([$user_c->id()]);
$account = $user_storage->load($user_c->id());
$this->assertTrue($account->isActive(), 'User C unblocked');
diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php
index 3f68c071a63..465420f8ea8 100644
--- a/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php
+++ b/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php
@@ -27,29 +27,29 @@ class HandlerFieldRoleTest extends UserTestBase {
public function testRole() {
// Create a couple of roles for the view.
- $rolename_a = 'a' . $this->randomMachineName(8);
- $this->drupalCreateRole(['access content'], $rolename_a, '' . $rolename_a . '', 9);
+ $role_name_a = 'a' . $this->randomMachineName(8);
+ $this->drupalCreateRole(['access content'], $role_name_a, '' . $role_name_a . '', 9);
- $rolename_b = 'b' . $this->randomMachineName(8);
- $this->drupalCreateRole(['access content'], $rolename_b, $rolename_b, 8);
+ $role_name_b = 'b' . $this->randomMachineName(8);
+ $this->drupalCreateRole(['access content'], $role_name_b, $role_name_b, 8);
- $rolename_not_assigned = $this->randomMachineName(8);
- $this->drupalCreateRole(['access content'], $rolename_not_assigned, $rolename_not_assigned);
+ $role_name_not_assigned = $this->randomMachineName(8);
+ $this->drupalCreateRole(['access content'], $role_name_not_assigned, $role_name_not_assigned);
// Add roles to user 1.
$user = User::load(1);
- $user->addRole($rolename_a);
- $user->addRole($rolename_b);
+ $user->addRole($role_name_a);
+ $user->addRole($role_name_b);
$user->save();
$this->drupalLogin($this->createUser(['access user profiles']));
$this->drupalGet('/test-views-handler-field-role');
// Verify that the view test_views_handler_field_role renders role assigned
// to user in the correct order and markup in role names is escaped.
- $this->assertSession()->responseContains($rolename_b . Html::escape('' . $rolename_a . ''));
+ $this->assertSession()->responseContains($role_name_b . Html::escape('' . $role_name_a . ''));
// Verify that the view test_views_handler_field_role does not render a role
// not assigned to a user.
- $this->assertSession()->pageTextNotContains($rolename_not_assigned);
+ $this->assertSession()->pageTextNotContains($role_name_not_assigned);
}
}
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
index 693d78f6897..5c6ad2913d4 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
@@ -96,7 +96,7 @@ class FieldDropbuttonTest extends ViewsKernelTestBase {
]);
$this->node2 = $this->createNode([
'type' => 'foo',
- 'title' => 'foos',
+ 'title' => 'foo',
'status' => 1,
'uid' => $admin->id(),
'created' => REQUEST_TIME - 5,
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
index ed0496e405a..e4614d7d4a7 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
@@ -39,19 +39,19 @@ class WorkspaceBypassTest extends BrowserTestBase {
$this->createContentType(['type' => 'test', 'label' => 'Test']);
$this->setupWorkspaceSwitcherBlock();
- $ditka = $this->drupalCreateUser(array_merge($permissions, ['create test content']));
+ $coach = $this->drupalCreateUser(array_merge($permissions, ['create test content']));
// Login as a limited-access user and create a workspace.
- $this->drupalLogin($ditka);
+ $this->drupalLogin($coach);
$bears = $this->createWorkspaceThroughUi('Bears', 'bears');
$this->switchToWorkspace($bears);
// Now create a node in the Bears workspace, as the owner of that workspace.
- $ditka_bears_node = $this->createNodeThroughUi('Ditka Bears node', 'test');
- $ditka_bears_node_id = $ditka_bears_node->id();
+ $coach_bears_node = $this->createNodeThroughUi('Ditka Bears node', 'test');
+ $coach_bears_node_id = $coach_bears_node->id();
// Editing both nodes should be possible.
- $this->drupalGet('/node/' . $ditka_bears_node_id . '/edit');
+ $this->drupalGet('/node/' . $coach_bears_node_id . '/edit');
$this->assertSession()->statusCodeEquals(200);
// Create a new user that should be able to edit anything in the Bears
@@ -63,7 +63,7 @@ class WorkspaceBypassTest extends BrowserTestBase {
// Editor 2 has the bypass permission but does not own the workspace and so,
// should not be able to create and edit any node.
- $this->drupalGet('/node/' . $ditka_bears_node_id . '/edit');
+ $this->drupalGet('/node/' . $coach_bears_node_id . '/edit');
$this->assertSession()->statusCodeEquals(403);
}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
index 8a65787cf8d..db8181776ec 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
@@ -207,9 +207,9 @@ class ConfigFileContentTest extends KernelTestBase {
];
// Encode and write, and reload and decode the configuration data.
- $filestorage = new FileStorage(Settings::get('config_sync_directory'));
- $filestorage->write($name, $config_data);
- $config_parsed = $filestorage->read($name);
+ $file_storage = new FileStorage(Settings::get('config_sync_directory'));
+ $file_storage->write($name, $config_data);
+ $config_parsed = $file_storage->read($name);
$key = 'numeric keys';
$this->assertSame($config_data[$key], $config_parsed[$key]);
diff --git a/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php b/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php
index 34a365f0086..26fd085e385 100644
--- a/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php
+++ b/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php
@@ -47,10 +47,10 @@ class HtmlEscapedTextTest extends TestCase {
$tests[] = [$script_tag, '<script>', 'Escapes <script> even inside an object that implements MarkupInterface.'];
$tests[] = ["