',
diff --git a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
index 81eb6f21a86..7e5f83f7f50 100644
--- a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
+++ b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
@@ -44,7 +44,7 @@ class ReorderDisplays extends ViewsFormBase {
]);
$form['view'] = [
'#type' => 'value',
- '#value' => $view
+ '#value' => $view,
];
$displays = $view->get('display');
@@ -68,7 +68,7 @@ class ReorderDisplays extends ViewsFormBase {
'action' => 'order',
'relationship' => 'sibling',
'group' => 'weight',
- ]
+ ],
],
'#tree' => TRUE,
'#prefix' => '
',
diff --git a/core/modules/views_ui/src/Tests/RowUITest.php b/core/modules/views_ui/src/Tests/RowUITest.php
index 56890097839..e8aa2c31010 100644
--- a/core/modules/views_ui/src/Tests/RowUITest.php
+++ b/core/modules/views_ui/src/Tests/RowUITest.php
@@ -34,13 +34,13 @@ class RowUITest extends UITestBase {
$this->assertFieldByName('row[type]', 'fields', 'The default row plugin selected in the UI should be fields.');
$edit = [
- 'row[type]' => 'test_row'
+ 'row[type]' => 'test_row',
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->assertFieldByName('row_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.');
$random_name = $this->randomMachineName();
$edit = [
- 'row_options[test_option]' => $random_name
+ 'row_options[test_option]' => $random_name,
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->drupalGet($row_options_url);
diff --git a/core/modules/views_ui/src/ViewPreviewForm.php b/core/modules/views_ui/src/ViewPreviewForm.php
index 4bc8eaab3ad..787527baf8a 100644
--- a/core/modules/views_ui/src/ViewPreviewForm.php
+++ b/core/modules/views_ui/src/ViewPreviewForm.php
@@ -77,7 +77,7 @@ class ViewPreviewForm extends ViewFormBase {
return [
'#attributes' => [
'id' => 'preview-submit-wrapper',
- 'class' => ['preview-submit-wrapper']
+ 'class' => ['preview-submit-wrapper'],
],
'button' => [
'#type' => 'submit',
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index beb5ffff475..6b49fdc92d3 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -713,7 +713,7 @@ class ViewUI implements ViewEntityInterface {
'data' => [
'#markup' => $path,
],
- ]
+ ],
];
}
if ($show_stats) {
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
index 7291dc2e8de..2f007f193c6 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
@@ -208,7 +208,7 @@ class DisplayPathTest extends UITestBase {
$edit = [
'title[0][value]' => 'Menu title',
'link[0][uri]' => '/admin/foo',
- 'menu_parent' => 'admin:system.admin'
+ 'menu_parent' => 'admin:system.admin',
];
$this->drupalPostForm('admin/structure/menu/manage/admin/add', $edit, t('Save'));
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
index 519d5226e7e..8fa5a80de38 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
@@ -45,7 +45,7 @@ class DisplayTest extends UITestBase {
*/
public function testReorderDisplay() {
$view = [
- 'block[create]' => TRUE
+ 'block[create]' => TRUE,
];
$view = $this->randomView($view);
@@ -60,7 +60,7 @@ class DisplayTest extends UITestBase {
// Put the block display in front of the page display.
$edit = [
'displays[page_1][weight]' => 2,
- 'displays[block_1][weight]' => 1
+ 'displays[block_1][weight]' => 1,
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->drupalPostForm(NULL, [], t('Save'));
diff --git a/core/modules/views_ui/tests/src/Functional/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
index b4be17828d0..7d96d0c5b57 100644
--- a/core/modules/views_ui/tests/src/Functional/HandlerTest.php
+++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
@@ -53,7 +53,7 @@ class HandlerTest extends UITestBase {
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'default' => 0
+ 'default' => 0,
];
return $schema;
@@ -74,8 +74,8 @@ class HandlerTest extends UITestBase {
'relationship' => [
'id' => 'standard',
'base' => 'users_field_data',
- 'base field' => 'uid'
- ]
+ 'base field' => 'uid',
+ ],
];
// Create a dummy field with no help text.
@@ -180,14 +180,14 @@ class HandlerTest extends UITestBase {
'field_name' => 'field_test',
'entity_type' => 'node',
'bundle' => 'page',
- 'label' => 'The giraffe" label'
+ 'label' => 'The giraffe" label',
])->save();
FieldConfig::create([
'field_name' => 'field_test',
'entity_type' => 'node',
'bundle' => 'article',
- 'label' => 'The
giraffe" label '
+ 'label' => 'The
giraffe" label ',
])->save();
$this->drupalGet('admin/structure/views/nojs/add-handler/content/default/field');
diff --git a/core/modules/views_ui/tests/src/Functional/StyleUITest.php b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
index 1eb9c7862f4..62f682a5f92 100644
--- a/core/modules/views_ui/tests/src/Functional/StyleUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
@@ -33,13 +33,13 @@ class StyleUITest extends UITestBase {
$this->assertFieldByName('style[type]', 'default', 'The default style plugin selected in the UI should be unformatted list.');
$edit = [
- 'style[type]' => 'test_style'
+ 'style[type]' => 'test_style',
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->assertFieldByName('style_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.');
$random_name = $this->randomMachineName();
$edit = [
- 'style_options[test_option]' => $random_name
+ 'style_options[test_option]' => $random_name,
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->drupalGet($style_options_url);
diff --git a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
index 839fe3a47a9..8a2dd2953f3 100644
--- a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
@@ -76,7 +76,7 @@ class ViewsUITourTest extends TourTestBase {
foreach ($handler_titles as $handler_title) {
// Create source string.
$source = $this->localeStorage->createString([
- 'source' => $handler_title
+ 'source' => $handler_title,
]);
$source->save();
$this->createTranslation($source, $langcode);
diff --git a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
index b4a3df022d3..d448252c6f4 100644
--- a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
+++ b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
@@ -48,7 +48,7 @@ class ViewListBuilderTest extends UnitTestCase {
'theme' => 'views_view',
'no_ui' => TRUE,
'admin' => '',
- ]
+ ],
],
[
'page',
@@ -61,7 +61,7 @@ class ViewListBuilderTest extends UnitTestCase {
'contextual_links_locations' => ['page'],
'theme' => 'views_view',
'admin' => 'Page admin label',
- ]
+ ],
],
[
'embed',
@@ -71,7 +71,7 @@ class ViewListBuilderTest extends UnitTestCase {
'title' => 'embed',
'theme' => 'views_view',
'admin' => 'Embed admin label',
- ]
+ ],
],
]));
diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module
index 0475bce698b..318d85bd691 100644
--- a/core/modules/views_ui/views_ui.module
+++ b/core/modules/views_ui/views_ui.module
@@ -134,7 +134,7 @@ function views_ui_preprocess_views_view(&$variables) {
// Render title for the admin preview.
if (!empty($view->live_preview)) {
$variables['title'] = [
- '#markup' => $view->getTitle()
+ '#markup' => $view->getTitle(),
];
}
diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc
index f57132f7af2..69eff489fc4 100644
--- a/core/modules/views_ui/views_ui.theme.inc
+++ b/core/modules/views_ui/views_ui.theme.inc
@@ -184,7 +184,7 @@ function template_preprocess_views_ui_build_group_filter_form(&$variables) {
'action' => 'order',
'relationship' => 'sibling',
'group' => 'weight',
- ]
+ ],
],
];
@@ -353,7 +353,7 @@ function template_preprocess_views_ui_rearrange_filter_form(&$variables) {
'action' => 'order',
'relationship' => 'sibling',
'group' => 'weight',
- ]
+ ],
],
];
}
diff --git a/core/modules/workflows/src/Form/WorkflowEditForm.php b/core/modules/workflows/src/Form/WorkflowEditForm.php
index 676868d2421..d6560f592f5 100644
--- a/core/modules/workflows/src/Form/WorkflowEditForm.php
+++ b/core/modules/workflows/src/Form/WorkflowEditForm.php
@@ -77,7 +77,7 @@ class WorkflowEditForm extends EntityForm {
$header = [
'state' => $this->t('State'),
'weight' => $this->t('Weight'),
- 'operations' => $this->t('Operations')
+ 'operations' => $this->t('Operations'),
];
$form['states_container'] = [
'#type' => 'details',
@@ -117,14 +117,14 @@ class WorkflowEditForm extends EntityForm {
'edit' => [
'title' => $this->t('Edit'),
'url' => Url::fromRoute('entity.workflow.edit_state_form', ['workflow' => $workflow->id(), 'workflow_state' => $state->id()]),
- ]
+ ],
];
if ($this->entity->access('delete-state:' . $state->id())) {
$links['delete'] = [
'title' => t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_state_form', [
'workflow' => $workflow->id(),
- 'workflow_state' => $state->id()
+ 'workflow_state' => $state->id(),
]),
];
}
@@ -155,7 +155,7 @@ class WorkflowEditForm extends EntityForm {
'weight' => $this->t('Weight'),
'from' => $this->t('From'),
'to' => $this->t('To'),
- 'operations' => $this->t('Operations')
+ 'operations' => $this->t('Operations'),
];
$form['transitions_container'] = [
'#type' => 'details',
diff --git a/core/modules/workflows/src/Form/WorkflowStateEditForm.php b/core/modules/workflows/src/Form/WorkflowStateEditForm.php
index 7b8b90355eb..0ecc3cde6be 100644
--- a/core/modules/workflows/src/Form/WorkflowStateEditForm.php
+++ b/core/modules/workflows/src/Form/WorkflowStateEditForm.php
@@ -121,14 +121,14 @@ class WorkflowStateEditForm extends EntityForm {
'title' => $this->t('Edit'),
'url' => Url::fromRoute('entity.workflow.edit_transition_form', [
'workflow' => $workflow->id(),
- 'workflow_transition' => $transition->id()
+ 'workflow_transition' => $transition->id(),
]),
];
$links['delete'] = [
'title' => t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_transition_form', [
'workflow' => $workflow->id(),
- 'workflow_transition' => $transition->id()
+ 'workflow_transition' => $transition->id(),
]),
];
$form['transitions'][$transition->id()] = [
@@ -230,8 +230,8 @@ class WorkflowStateEditForm extends EntityForm {
],
'#url' => Url::fromRoute('entity.workflow.delete_state_form', [
'workflow' => $this->entity->id(),
- 'workflow_state' => $this->stateId
- ])
+ 'workflow_state' => $this->stateId,
+ ]),
];
return $actions;
diff --git a/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php b/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php
index ac1552ecdd0..2d01e4324e4 100644
--- a/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php
+++ b/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php
@@ -224,8 +224,8 @@ class WorkflowTransitionEditForm extends EntityForm {
],
'#url' => Url::fromRoute('entity.workflow.delete_transition_form', [
'workflow' => $this->entity->id(),
- 'workflow_transition' => $this->transitionId
- ])
+ 'workflow_transition' => $this->transitionId,
+ ]),
];
return $actions;
diff --git a/core/modules/workflows/src/WorkflowListBuilder.php b/core/modules/workflows/src/WorkflowListBuilder.php
index c36171aa6e8..a85ef659fb2 100644
--- a/core/modules/workflows/src/WorkflowListBuilder.php
+++ b/core/modules/workflows/src/WorkflowListBuilder.php
@@ -73,7 +73,7 @@ class WorkflowListBuilder extends ConfigEntityListBuilder {
$row['label'] = $entity->label();
$row['type']['data'] = [
- '#markup' => $entity->getTypePlugin()->label()
+ '#markup' => $entity->getTypePlugin()->label(),
];
$items = array_map([State::class, 'labelCallback'], $entity->getTypePlugin()->getStates());
diff --git a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php
index f2d394c4060..21227d7c7a8 100644
--- a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php
+++ b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php
@@ -125,7 +125,7 @@ abstract class WorkspaceResourceTestBase extends EntityResourceTestBase {
],
'uuid' => [
[
- 'value' => $this->entity->uuid()
+ 'value' => $this->entity->uuid(),
],
],
];
diff --git a/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php b/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php
index eae90d2ca7b..dd34274e071 100644
--- a/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php
+++ b/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php
@@ -381,7 +381,7 @@ class WorkspaceIntegrationTest extends KernelTestBase {
$this->switchToWorkspace('live');
$node_1 = $this->createNode([
- 'title' => 'live node 1'
+ 'title' => 'live node 1',
]);
$entity_test = EntityTestMulRev::create([
'name' => 'live entity_test_mulrev',
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 128b84efa66..30c8688ef69 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -21,6 +21,12 @@
+
+
+
+
+
+
diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
index 133e445bd04..ad8b4383bdb 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
@@ -138,7 +138,7 @@ class ContentEntityFormFieldValidationFilteringTest extends BrowserTestBase {
// \Drupal\file\Plugin\Field\FieldWidget\FileWidget::process().
$text_file = current($this->getTestFiles('text'));
$edit = [
- 'files[test_file_0]' => \Drupal::service('file_system')->realpath($text_file->uri)
+ 'files[test_file_0]' => \Drupal::service('file_system')->realpath($text_file->uri),
];
$assert_session->elementNotExists('css', 'input#edit-test-file-0-remove-button');
$this->drupalPostForm(NULL, $edit, 'Upload');
diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
index c8748342fb7..cc43936d6f1 100644
--- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
+++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
@@ -83,7 +83,7 @@ class CorsIntegrationTest extends BrowserTestBase {
$response = $httpClient->request('POST', $url->setAbsolute()->toString(), [
'headers' => [
'Origin' => $origin,
- ]
+ ],
]);
$this->assertEquals(200, $response->getStatusCode());
}
diff --git a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
index 3aaac143eac..96b59d7be00 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
@@ -63,8 +63,8 @@ class CaseInsensitivePathTest extends BrowserTestBase {
$this->drupalGet('admin/content', [
'query' => [
- 'title' => 'FooBarBaz'
- ]
+ 'title' => 'FooBarBaz',
+ ],
]);
$this->assertSession()->linkExists('FooBarBaz');
@@ -74,8 +74,8 @@ class CaseInsensitivePathTest extends BrowserTestBase {
$this->drupalGet('Admin/Content', [
'query' => [
- 'title' => 'FooBarBaz'
- ]
+ 'title' => 'FooBarBaz',
+ ],
]);
$this->assertSession()->linkExists('FooBarBaz');
diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
index 744f527ba2a..d7d84708fe9 100644
--- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
@@ -265,7 +265,7 @@ abstract class UpdatePathTestBase extends BrowserTestBase {
}
$selectors_handler = new SelectorsHandler([
- 'hidden_field_selector' => new HiddenFieldSelector()
+ 'hidden_field_selector' => new HiddenFieldSelector(),
]);
$session = new Session($driver, $selectors_handler);
$this->mink = new Mink();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
index c52e3ea8533..4ceebf5b9b3 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
@@ -21,7 +21,7 @@ class CacheabilityMetadataConfigOverrideTest extends KernelTestBase {
'config',
'config_override_test',
'system',
- 'user'
+ 'user',
];
/**
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
index a9cd9f19022..6a0f938bd45 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
@@ -50,9 +50,9 @@ class ConfigDependencyTest extends EntityKernelTestBase {
'id' => 'entity1',
'dependencies' => [
'enforced' => [
- 'module' => ['node']
- ]
- ]
+ 'module' => ['node'],
+ ],
+ ],
]
);
$entity1->save();
@@ -200,7 +200,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
'id' => 'entity1',
'dependencies' => [
'enforced' => [
- 'module' => ['node', 'config_test']
+ 'module' => ['node', 'config_test'],
],
],
]
@@ -264,7 +264,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
'id' => 'entity_' . $entity_id_suffixes[0],
'dependencies' => [
'enforced' => [
- 'module' => ['node', 'config_test']
+ 'module' => ['node', 'config_test'],
],
],
]
@@ -309,7 +309,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
'dependencies' => [
'enforced' => [
'config' => [$entity_1->getConfigDependencyName()],
- 'module' => ['node', 'config_test']
+ 'module' => ['node', 'config_test'],
],
],
]
@@ -508,7 +508,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
// Test dependencies between configuration entities.
$entity1 = $storage->create(
[
- 'id' => 'entity1'
+ 'id' => 'entity1',
]
);
$entity1->save();
@@ -621,7 +621,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
'id' => 'entity1',
'dependencies' => [
'enforced' => [
- 'content' => [$content_entity->getConfigDependencyName()]
+ 'content' => [$content_entity->getConfigDependencyName()],
],
],
]
@@ -632,7 +632,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
'id' => 'entity2',
'dependencies' => [
'enforced' => [
- 'config' => [$entity1->getConfigDependencyName()]
+ 'config' => [$entity1->getConfigDependencyName()],
],
],
]
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
index 4cbc16a0e04..1b468b0670f 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
@@ -31,7 +31,7 @@ class ConfigEntityNormalizeTest extends KernelTestBase {
$config = $this->config('config_test.dynamic.system');
$data = [
'label' => 'foobar',
- 'additional_key' => TRUE
+ 'additional_key' => TRUE,
] + $config->getRawData();
$config->setData($data)->save();
$this->assertNotIdentical($config_entity->toArray(), $config->getRawData(), 'Stored config entity is not is equivalent to config schema.');
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
index 807152bfedd..154d2383b4f 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
@@ -97,7 +97,7 @@ class ConfigEntityUnitTest extends KernelTestBase {
$entity = $this->storage->create([
'id' => $this->randomMachineName(),
'label' => $this->randomString(),
- 'style' => 999
+ 'style' => 999,
]);
$entity->save();
$this->assertSame('999', $entity->style);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
index 01a9746dffe..84b5a2de131 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
@@ -105,7 +105,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase {
catch (ConfigImporterException $e) {
$this->pass('Expected ConfigImporterException thrown when a renamed configuration entity does not match the existing entity type.');
$expected = [
- new FormattableMarkup('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id])
+ new FormattableMarkup('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id]),
];
$this->assertEqual($expected, $this->configImporter->getErrors());
}
@@ -134,7 +134,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase {
// UUIDs match.
$this->configImporter->reset();
$expected = [
- 'config_test.old::config_test.new'
+ 'config_test.old::config_test.new',
];
$renames = $this->configImporter->getUnprocessedConfiguration('rename');
$this->assertSame($expected, $renames);
@@ -148,7 +148,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase {
catch (ConfigImporterException $e) {
$this->pass('Expected ConfigImporterException thrown when simple configuration is renamed.');
$expected = [
- new FormattableMarkup('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new'])
+ new FormattableMarkup('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new']),
];
$this->assertEqual($expected, $this->configImporter->getErrors());
}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
index 3aff3d5302a..dc4e0ae12b9 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
@@ -226,7 +226,7 @@ class ConfigImporterTest extends KernelTestBase {
// Add a dependency on primary, to ensure that is synced first.
'dependencies' => [
'config' => [$name_primary],
- ]
+ ],
];
$sync->write($name_secondary, $values_secondary);
@@ -265,7 +265,7 @@ class ConfigImporterTest extends KernelTestBase {
// Add a dependency on secondary, so that is synced first.
'dependencies' => [
'config' => [$name_secondary],
- ]
+ ],
];
$sync->write($name_primary, $values_primary);
$values_secondary = [
@@ -322,7 +322,7 @@ class ConfigImporterTest extends KernelTestBase {
// Add a dependency on deleter, to make sure that is synced first.
'dependencies' => [
'config' => [$name_deleter],
- ]
+ ],
];
$storage->write($name_deletee, $values_deletee);
$values_deletee['label'] = 'Updated Deletee';
@@ -338,7 +338,7 @@ class ConfigImporterTest extends KernelTestBase {
// will also be synced after the deletee due to alphabetical ordering.
'dependencies' => [
'config' => [$name_deleter],
- ]
+ ],
];
$storage->write($name_other, $values_other);
$values_other['label'] = 'Updated other';
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
index b2859a0bbfc..e16225d0eca 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
@@ -352,7 +352,7 @@ class ConfigSchemaTest extends KernelTestBase {
// If the config schema doesn't have a type it shouldn't be casted.
'no_type' => 1,
'mapping' => [
- 'string' => 1
+ 'string' => 1,
],
'float' => '3.14',
'null_float' => '',
@@ -375,7 +375,7 @@ class ConfigSchemaTest extends KernelTestBase {
'boolean' => TRUE,
'no_type' => 1,
'mapping' => [
- 'string' => '1'
+ 'string' => '1',
],
'float' => 3.14,
'null_float' => NULL,
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
index c18910e21d4..dc121eaf565 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
@@ -65,7 +65,7 @@ class EntityAutocompleteElementFormTest extends EntityKernelTestBase implements
for ($i = 1; $i < 3; $i++) {
$entity = EntityTest::create([
- 'name' => $this->randomMachineName()
+ 'name' => $this->randomMachineName(),
]);
$entity->save();
$this->referencedEntities[] = $entity;
@@ -297,7 +297,7 @@ class EntityAutocompleteElementFormTest extends EntityKernelTestBase implements
$form_state = (new FormState())
->setValues([
'single_no_validate' => 'single - non-existent label',
- 'single_autocreate_no_validate' => 'single - autocreate non-existent label'
+ 'single_autocreate_no_validate' => 'single - autocreate non-existent label',
]);
$form_builder->submitForm($this, $form_state);
@@ -309,7 +309,7 @@ class EntityAutocompleteElementFormTest extends EntityKernelTestBase implements
$form_state = (new FormState())
->setValues([
'single_no_validate' => 'single - non-existent label (42)',
- 'single_autocreate_no_validate' => 'single - autocreate non-existent label (43)'
+ 'single_autocreate_no_validate' => 'single - autocreate non-existent label (43)',
]);
$form_builder->submitForm($this, $form_state);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
index 8545efe0fa0..c7bcc292272 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
@@ -351,7 +351,7 @@ class EntityAccessControlHandlerTest extends EntityLanguageTestBase {
'name' => 'A test entity',
'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe',
],
- FALSE
+ FALSE,
],
'string ID entity' => [
EntityTestStringId::class,
@@ -360,7 +360,7 @@ class EntityAccessControlHandlerTest extends EntityLanguageTestBase {
'name' => 'A test entity',
'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe',
],
- TRUE
+ TRUE,
],
];
}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
index ff3cee57126..4cbffedbf8c 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -1067,7 +1067,7 @@ class EntityDefinitionUpdateTest extends EntityKernelTestBase {
// field, allowing us to test the 'default_value' parameter of
// \Drupal\Core\Field\BaseFieldDefinition::setInitialValueFromField().
$storage->create([
- 'name' => 'Second entity'
+ 'name' => 'Second entity',
])->save();
// Add a base field with an initial value inherited from another field.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
index 4974a74cb75..afd7e0d9b79 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
@@ -35,12 +35,12 @@ class EntityLoadByUuidTest extends KernelTestBase {
// Create two test entities.
$entity_0 = EntityTest::create([
'type' => 'entity_test',
- 'name' => 'published entity'
+ 'name' => 'published entity',
]);
$entity_0->save();
$entity_1 = EntityTest::create([
'type' => 'entity_test',
- 'name' => 'unpublished entity'
+ 'name' => 'unpublished entity',
]);
$entity_1->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
index f048569707d..3f30b2b8996 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
@@ -683,7 +683,7 @@ class EntityQueryTest extends EntityKernelTestBase {
'translatable' => FALSE,
'settings' => [
'case_sensitive' => FALSE,
- ]
+ ],
]);
$field_storage->save();
@@ -729,7 +729,7 @@ class EntityQueryTest extends EntityKernelTestBase {
'name' => $this->randomMachineName(),
'langcode' => 'en',
'field_ci' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'],
- 'field_cs' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase']
+ 'field_cs' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'],
])->save();
// Check the case insensitive field, = operator.
@@ -920,7 +920,7 @@ class EntityQueryTest extends EntityKernelTestBase {
$entity->isDefaultRevision(FALSE);
$entity->{$this->figures}->setValue([
'color' => 'red',
- 'shape' => 'square'
+ 'shape' => 'square',
]);
$entity->save();
@@ -949,7 +949,7 @@ class EntityQueryTest extends EntityKernelTestBase {
$entity->isDefaultRevision(FALSE);
$entity->{$this->figures}->setValue([
'color' => 'red',
- 'shape' => 'square'
+ 'shape' => 'square',
]);
$entity->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
index cedf6851a8b..469f4a32a55 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
@@ -212,7 +212,7 @@ class EntityReferenceFieldTest extends EntityKernelTestBase {
// Create the default target entity.
$target_entity = EntityTestStringId::create([
'id' => $this->randomString(),
- 'type' => $this->bundle
+ 'type' => $this->bundle,
]);
$target_entity->save();
@@ -381,7 +381,7 @@ class EntityReferenceFieldTest extends EntityKernelTestBase {
$definitions = [
'target_reference' => BaseFieldDefinition::create('entity_reference')
->setSetting('target_type', $entity_type->id())
- ->setSetting('handler', 'default')
+ ->setSetting('handler', 'default'),
];
$this->state->set('entity_test_update.additional_base_field_definitions', $definitions);
$this->entityManager->clearCachedDefinitions();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
index 9c003493f43..0ef35db9dfb 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
@@ -88,7 +88,7 @@ class FieldSqlStorageTest extends EntityKernelTestBase {
$this->fieldStorage->save();
$this->field = FieldConfig::create([
'field_storage' => $this->fieldStorage,
- 'bundle' => $entity_type
+ 'bundle' => $entity_type,
]);
$this->field->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
index 81e1976fef5..d3d5e5b1d41 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
@@ -144,7 +144,7 @@ class FieldWidgetConstraintValidatorTest extends KernelTestBase {
*/
public function testEntityLevelConstraintValidation() {
$entity = EntityTestCompositeConstraint::create([
- 'name' => 'entity-level-violation'
+ 'name' => 'entity-level-violation',
]);
$entity->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
index df9f4b13376..d68a1f5ac8c 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
@@ -34,7 +34,7 @@ class RouteProviderTest extends KernelTestBase {
/** @var \Drupal\user\RoleInterface $role */
$role = Role::create([
- 'id' => RoleInterface::ANONYMOUS_ID
+ 'id' => RoleInterface::ANONYMOUS_ID,
]);
$role
->grantPermission('administer entity_test content')
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
index 3f182c91e80..be609d8d712 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
@@ -150,7 +150,7 @@ class ValidReferenceConstraintValidatorTest extends EntityKernelTestBase {
['entity' => $unpublished_node],
['entity' => $different_bundle_node],
['entity' => $deleted_node],
- ]
+ ],
]);
// Check that users with access are able pass the validation for fields
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
index 590a96cd5f8..9229a60b0b5 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
@@ -82,7 +82,7 @@ class FieldSettingsTest extends EntityKernelTestBase {
$field_storage = FieldStorageConfig::create([
'field_name' => 'test_field',
'entity_type' => 'entity_test',
- 'type' => 'test_field'
+ 'type' => 'test_field',
]);
// Check that the default settings have been populated.
@@ -109,11 +109,11 @@ class FieldSettingsTest extends EntityKernelTestBase {
$field_storage = FieldStorageConfig::create([
'field_name' => 'test_field',
'entity_type' => 'entity_test',
- 'type' => 'test_field'
+ 'type' => 'test_field',
]);
$field = FieldConfig::create([
'field_storage' => $field_storage,
- 'bundle' => 'entity_test'
+ 'bundle' => 'entity_test',
]);
// Note: FieldConfig does not populate default settings until the config
// is saved.
diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
index 05ac7c2557f..4eca9976f22 100644
--- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
@@ -62,7 +62,7 @@ class MimeTypeTest extends FileTestBase {
'extensions' => [
'jar' => 0,
'jpg' => 1,
- ]
+ ],
];
$test_case = [
diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
index 57e0342075f..5c31dc66a42 100644
--- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
@@ -119,7 +119,7 @@ class ToolkitGdTest extends KernelTestBase {
'gif' => IMAGETYPE_GIF,
'jpeg' => IMAGETYPE_JPEG,
'jpg' => IMAGETYPE_JPEG,
- 'jpe' => IMAGETYPE_JPEG
+ 'jpe' => IMAGETYPE_JPEG,
];
$image = $this->imageFactory->get();
foreach ($expected_image_types as $extension => $expected_image_type) {
@@ -266,7 +266,7 @@ class ToolkitGdTest extends KernelTestBase {
array_fill(0, 3, 76) + [3 => 0],
array_fill(0, 3, 149) + [3 => 0],
array_fill(0, 3, 29) + [3 => 0],
- array_fill(0, 3, 225) + [3 => 127]
+ array_fill(0, 3, 225) + [3 => 127],
],
],
];
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
index 5966eaa745f..6bf2faaa984 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
@@ -266,7 +266,7 @@ class TableTest extends KernelTestBase {
[
'1-one',
[
- 'data' => '1-two'
+ 'data' => '1-two',
],
'1-three',
],
diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
index 2acaefb873b..043aae4445c 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
@@ -36,7 +36,7 @@ class RenderTest extends KernelTestBase {
'library' => [
'test/generic_preprocess',
'test/specific_preprocess',
- ]
+ ],
];
$this->assertEqual($expected_attached, $test_element['#attached'], 'All expected assets from theme preprocess hooks attached.');
diff --git a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
index ef593751bf2..40a8a743dd3 100644
--- a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
@@ -111,7 +111,7 @@ EXPECTED
'required' => TRUE,
],
],
- 'expected' => '$no_index = true;'
+ 'expected' => '$no_index = true;',
];
// Make an empty file.
$filename = Settings::get('file_public_path', $site_path . '/files') . '/mock_settings.php';
diff --git a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
index 748e2bbc6fa..d190cc53439 100644
--- a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
+++ b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
@@ -19,7 +19,7 @@ class TranslationStringTest extends KernelTestBase {
* @var array
*/
public static $modules = [
- 'language'
+ 'language',
];
/**
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
index 7f6d2eccda8..169da31925d 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
@@ -205,7 +205,7 @@ class RegistryTest extends KernelTestBase {
$expected = [
'template_preprocess',
'template_preprocess_container',
- 'template_preprocess_theme_test_registered_by_module'
+ 'template_preprocess_theme_test_registered_by_module',
];
$registry = $registry_theme->get();
$this->assertEquals($expected, array_values($registry['theme_test_registered_by_module']['preprocess functions']));
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
index c44cc1c8141..8bcc3c4bc98 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
@@ -73,7 +73,7 @@ class ThemeRenderAndAutoescapeTest extends KernelTestBase {
'type markup with EM tags is rendered' => [['#markup' => '
hi '], '
hi '],
'SCRIPT tag in string is escaped' => [
'',
- Html::escape('')
+ Html::escape(''),
],
'type plain_text render array EM tag is escaped' => [['#plain_text' => '
hi '], Html::escape('
hi ')],
'type hidden render array is rendered' => [['#type' => 'hidden', '#name' => 'foo', '#value' => 'bar'], "
\n"],
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
index dbdf351a718..826ac047cb5 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
@@ -30,7 +30,7 @@ class TwigMarkupInterfaceTest extends KernelTestBase {
* @var array
*/
public static $modules = [
- 'language'
+ 'language',
];
/**
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
index bbdf10992f3..54f2872ab8b 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
@@ -37,7 +37,7 @@ class ComplexDataConstraintValidatorTest extends KernelTestBase {
->setPropertyDefinition('key', DataDefinition::create('integer'))
->addConstraint('ComplexData', [
'key' => [
- 'AllowedValues' => [1, 2, 3]
+ 'AllowedValues' => [1, 2, 3],
],
]);
@@ -67,7 +67,7 @@ class ComplexDataConstraintValidatorTest extends KernelTestBase {
->setPropertyDefinition('key', DataDefinition::create('integer'))
->addConstraint('ComplexData', [
'key' => [
- 'NotNull' => []
+ 'NotNull' => [],
],
]);
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index e3e3fae2fe8..581960ed509 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -470,7 +470,7 @@ class TypedDataTest extends KernelTestBase {
$this->assertEqual($value, [
'one' => 'uno',
'two' => 'zwei',
- 'three' => 'drei'
+ 'three' => 'drei',
]);
$properties = $typed_data->getProperties();
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 313b2036d9f..433ec38f411 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -313,7 +313,7 @@ abstract class BrowserTestBase extends TestCase {
}
$selectors_handler = new SelectorsHandler([
- 'hidden_field_selector' => new HiddenFieldSelector()
+ 'hidden_field_selector' => new HiddenFieldSelector(),
]);
$session = new Session($driver, $selectors_handler);
$this->mink = new Mink();
diff --git a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
index 717e32749a9..b37a2bfde4f 100644
--- a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
+++ b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
@@ -159,7 +159,7 @@ class InspectorTest extends TestCase {
[__CLASS__, 'callMeStatic'],
function () {
return TRUE;
- }
+ },
]));
$this->assertFalse(Inspector::assertAllCallable([
@@ -169,7 +169,7 @@ class InspectorTest extends TestCase {
function () {
return TRUE;
},
- "I'm not callable"
+ "I'm not callable",
]));
}
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
index 1b5b23f347e..577bb8baffd 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
@@ -993,7 +993,7 @@ class ContainerTest extends TestCase {
'arguments' => [],
'configurator' => [
$this->getServiceCall('configurator'),
- 'configureService'
+ 'configureService',
],
];
$services['configurable_service_exception'] = [
diff --git a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
index 4760c1955b2..0d1ef58c195 100644
--- a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
+++ b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
@@ -91,7 +91,7 @@ class RegexDirectoryIteratorTest extends TestCase {
[
'1.yml',
'2.yml',
- '3.txt'
+ '3.txt',
],
],
[
diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
index 2f8f23e5b3c..82226d0d342 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
@@ -37,7 +37,7 @@ abstract class YamlTestBase extends TestCase {
[10],
[0 => '123456'],
],
- [NULL]
+ [NULL],
];
}
diff --git a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
index 10664ffc66d..02a4ed5f15b 100644
--- a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
@@ -61,7 +61,7 @@ class ColorTest extends TestCase {
// Add invalid data types (hex value must be a string).
foreach ([
1, 12, 1234, 12345, 123456, 1234567, 12345678, 123456789, 123456789,
- -1, PHP_INT_MAX, PHP_INT_MAX + 1, -PHP_INT_MAX, 0x0, 0x010
+ -1, PHP_INT_MAX, PHP_INT_MAX + 1, -PHP_INT_MAX, 0x0, 0x010,
] as $value) {
$invalid[] = [$value, '', TRUE];
}
diff --git a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
index 80fc7ddf33c..4cdb1b62f00 100644
--- a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
@@ -265,7 +265,7 @@ class NestedArrayTest extends TestCase {
public function providerTestFilter() {
$data = [];
$data['1d-array'] = [
- [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE]
+ [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE],
];
$data['1d-array-callable'] = [
[0, 1, '', TRUE],
diff --git a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
index 7503cc27100..ab2447065a7 100644
--- a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
@@ -49,42 +49,42 @@ class SortArrayTest extends TestCase {
$tests[] = [
['weight' => 1],
['weight' => 1],
- 0
+ 0,
];
// Weights set and $a is less (lighter) than $b.
$tests[] = [
['weight' => 1],
['weight' => 2],
- -1
+ -1,
];
// Weights set and $a is greater (heavier) than $b.
$tests[] = [
['weight' => 2],
['weight' => 1],
- 1
+ 1,
];
// Weights not set.
$tests[] = [
[],
[],
- 0
+ 0,
];
// Weights for $b not set.
$tests[] = [
['weight' => 1],
[],
- 1
+ 1,
];
// Weights for $a not set.
$tests[] = [
[],
['weight' => 1],
- -1
+ -1,
];
return $tests;
@@ -125,42 +125,42 @@ class SortArrayTest extends TestCase {
$tests[] = [
['#weight' => 1],
['#weight' => 1],
- 0
+ 0,
];
// Weights set and $a is less (lighter) than $b.
$tests[] = [
['#weight' => 1],
['#weight' => 2],
- -1
+ -1,
];
// Weights set and $a is greater (heavier) than $b.
$tests[] = [
['#weight' => 2],
['#weight' => 1],
- 1
+ 1,
];
// Weights not set.
$tests[] = [
[],
[],
- 0
+ 0,
];
// Weights for $b not set.
$tests[] = [
['#weight' => 1],
[],
- 1
+ 1,
];
// Weights for $a not set.
$tests[] = [
[],
['#weight' => 1],
- -1
+ -1,
];
return $tests;
@@ -201,35 +201,35 @@ class SortArrayTest extends TestCase {
$tests[] = [
['title' => 'test'],
['title' => 'test'],
- 0
+ 0,
];
// Title $a not set.
$tests[] = [
[],
['title' => 'test'],
- -4
+ -4,
];
// Title $b not set.
$tests[] = [
['title' => 'test'],
[],
- 4
+ 4,
];
// Titles set but not equal.
$tests[] = [
['title' => 'test'],
['title' => 'testing'],
- -1
+ -1,
];
// Titles set but not equal.
$tests[] = [
['title' => 'testing'],
['title' => 'test'],
- 1
+ 1,
];
return $tests;
@@ -270,35 +270,35 @@ class SortArrayTest extends TestCase {
$tests[] = [
['#title' => 'test'],
['#title' => 'test'],
- 0
+ 0,
];
// Title $a not set.
$tests[] = [
[],
['#title' => 'test'],
- -4
+ -4,
];
// Title $b not set.
$tests[] = [
['#title' => 'test'],
[],
- 4
+ 4,
];
// Titles set but not equal.
$tests[] = [
['#title' => 'test'],
['#title' => 'testing'],
- -1
+ -1,
];
// Titles set but not equal.
$tests[] = [
['#title' => 'testing'],
['#title' => 'test'],
- 1
+ 1,
];
return $tests;
diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
index 0664f94272c..695b4278ed3 100644
--- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
@@ -503,31 +503,31 @@ class XssTest extends TestCase {
'
',
'
',
'Image tag with alt and title attribute',
- ['img']
+ ['img'],
],
[
'
Drupal ',
'
Drupal ',
'Link tag with rel attribute',
- ['a']
+ ['a'],
],
[
'
Drupal 8: The best release ever. ',
'
Drupal 8: The best release ever. ',
'Span tag with property attribute',
- ['span']
+ ['span'],
],
[
'
',
'
',
'Image tag with data attribute',
- ['img']
+ ['img'],
],
[
'
',
'
',
'Link tag with numeric data attribute',
- ['a']
+ ['a'],
],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
index 7be87f593f3..65038a6dc8a 100644
--- a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
+++ b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
@@ -55,7 +55,7 @@ class TranslationTest extends UnitTestCase {
[
'value' => 'Foo',
],
- 'Foo'
+ 'Foo',
];
$random = $this->randomMachineName();
$random_html_entity = '&' . $random;
diff --git a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
index 95cacea45c6..99ba0a5ef9c 100644
--- a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
@@ -141,12 +141,12 @@ class AssetResolverTest extends UnitTestCase {
'same libraries, different timestamps' => [
(new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currentTime' => $time]),
(new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currentTime' => $time + 100]),
- 1
+ 1,
],
'different libraries, same timestamps' => [
(new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currenttime' => $time]),
(new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal', 'core/jquery'])->setSettings(['currentTime' => $time]),
- 2
+ 2,
],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
index ba0b4db532f..18c7b0080eb 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
@@ -94,7 +94,7 @@ class CssCollectionRendererUnitTest extends UnitTestCase {
'#tag' => 'style',
'#value' => $value,
'#attributes' => [
- 'media' => $media
+ 'media' => $media,
],
'#browsers' => $browsers,
];
@@ -461,7 +461,7 @@ class CssCollectionRendererUnitTest extends UnitTestCase {
'media' => 'all',
'preprocess' => TRUE,
'browsers' => [],
- 'data' => 'http://example.com/popular.js'
+ 'data' => 'http://example.com/popular.js',
];
$this->renderer->render($css_group);
}
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
index f3824e8d500..8b0b7598165 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
@@ -128,7 +128,7 @@ class CacheableMetadataTest extends UnitTestCase {
[new \stdClass(), TRUE],
[300, FALSE],
[[], TRUE],
- [8.0, TRUE]
+ [8.0, TRUE],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
index 76f33eb96ed..c792d1abad5 100644
--- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
+++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
@@ -72,7 +72,7 @@ class QuickStartTest extends TestCase {
// Delete test site directory.
$this->fileUnmanagedDeleteRecursive($test_site_directory, [
BrowserTestBase::class,
- 'filePreDeleteCallback'
+ 'filePreDeleteCallback',
]);
}
}
@@ -113,7 +113,7 @@ class QuickStartTest extends TestCase {
define('DRUPAL_TEST_IN_CHILD_SITE', FALSE);
chmod($this->testDb->getTestSitePath(), 0755);
$cookieJar = CookieJar::fromArray([
- 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix())
+ 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()),
], '127.0.0.1');
$response = $guzzle->get('http://127.0.0.1:' . $port, ['cookies' => $cookieJar]);
@@ -165,7 +165,7 @@ class QuickStartTest extends TestCase {
define('DRUPAL_TEST_IN_CHILD_SITE', FALSE);
chmod($this->testDb->getTestSitePath(), 0755);
$cookieJar = CookieJar::fromArray([
- 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix())
+ 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()),
], '127.0.0.1');
$response = $guzzle->get('http://127.0.0.1:' . $port, ['cookies' => $cookieJar]);
diff --git a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
index 00a5eb2ea62..b2ddd5e3652 100644
--- a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
+++ b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
@@ -38,7 +38,7 @@ class AttributesTest extends UnitTestCase {
'alt' => 'Alternate',
],
' id="id-test" class="first last" alt="Alternate"',
- 'Multiple attributes.'
+ 'Multiple attributes.',
],
// Verify empty attributes array is rendered.
[[], '', 'Empty attributes array.'],
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
index 0d417ab4940..81d424b2ce1 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
@@ -283,13 +283,13 @@ class ConfigEntityBaseUnitTest extends UnitTestCase {
'config_dependencies' => [
'config' => [$instance_dependency_1],
'module' => [$instance_dependency_2],
- ]
+ ],
],
[
'config' => [$instance_dependency_1],
- 'module' => [$instance_dependency_2, 'test']
- ]
- ]
+ 'module' => [$instance_dependency_2, 'test'],
+ ],
+ ],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php
index 7bcbc97cc99..f689db48ab2 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php
@@ -29,7 +29,7 @@ class ConfigEntityDependencyTest extends UnitTestCase {
'dependencies' => [
'module' => [
'node',
- 'views'
+ 'views',
],
'config' => [
'config_test.dynamic.entity_id:745b0ce0-aece-42dd-a800-ade5b8455e84',
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
index 914d4f6fe53..c5d4c1c4ea5 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
@@ -85,7 +85,7 @@ class ConfigEntityTypeTest extends UnitTestCase {
$this->setExpectedException(ConfigEntityStorageClassException::class, '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage is not \Drupal\Core\Config\Entity\ConfigEntityStorage or it does not extend it');
new ConfigEntityType([
'id' => 'example_config_entity_type',
- 'handlers' => ['storage' => '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage']
+ 'handlers' => ['storage' => '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage'],
]);
}
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
index f3c882cec05..5558b26e836 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
@@ -37,42 +37,42 @@ class QueryFactoryTest extends UnitTestCase {
$tests[] = [
['uuid:abc'],
'uuid',
- $this->getConfigObject('test')->set('uuid', 'abc')
+ $this->getConfigObject('test')->set('uuid', 'abc'),
];
// Tests a lookup being set to a top level key when sub-keys exist.
$tests[] = [
[],
'uuid',
- $this->getConfigObject('test')->set('uuid.blah', 'abc')
+ $this->getConfigObject('test')->set('uuid.blah', 'abc'),
];
// Tests a non existent key.
$tests[] = [
[],
'uuid',
- $this->getConfigObject('test')
+ $this->getConfigObject('test'),
];
// Tests a non existent sub key.
$tests[] = [
[],
'uuid.blah',
- $this->getConfigObject('test')->set('uuid', 'abc')
+ $this->getConfigObject('test')->set('uuid', 'abc'),
];
// Tests a existent sub key.
$tests[] = [
['uuid.blah:abc'],
'uuid.blah',
- $this->getConfigObject('test')->set('uuid.blah', 'abc')
+ $this->getConfigObject('test')->set('uuid.blah', 'abc'),
];
// One wildcard.
$tests[] = [
['test.*.value:a', 'test.*.value:b'],
'test.*.value',
- $this->getConfigObject('test')->set('test.a.value', 'a')->set('test.b.value', 'b')
+ $this->getConfigObject('test')->set('test.a.value', 'a')->set('test.b.value', 'b'),
];
// Three wildcards.
@@ -82,14 +82,14 @@ class QueryFactoryTest extends UnitTestCase {
$this->getConfigObject('test')
->set('test.a.sub2.a.sub4.a.value', 'aaa')
->set('test.a.sub2.a.sub4.b.value', 'aab')
- ->set('test.b.sub2.a.sub4.b.value', 'bab')
+ ->set('test.b.sub2.a.sub4.b.value', 'bab'),
];
// Three wildcards in a row.
$tests[] = [
['test.*.*.*.value:abc', 'test.*.*.*.value:abd'],
'test.*.*.*.value',
- $this->getConfigObject('test')->set('test.a.b.c.value', 'abc')->set('test.a.b.d.value', 'abd')
+ $this->getConfigObject('test')->set('test.a.b.c.value', 'abc')->set('test.a.b.d.value', 'abd'),
];
return $tests;
diff --git a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
index fc0d63bede3..353e6d3c7b0 100644
--- a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
@@ -63,7 +63,7 @@ class StorageComparerTest extends UnitTestCase {
'uuid' => $uuid->generate(),
'dependencies' => [
'config' => [
- 'field.storage.node.body'
+ 'field.storage.node.body',
],
],
],
@@ -89,7 +89,7 @@ class StorageComparerTest extends UnitTestCase {
],
// Simple config.
'system.performance' => [
- 'stale_file_threshold' => 2592000
+ 'stale_file_threshold' => 2592000,
],
];
diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
index 227027b3933..8d0fccdd6bb 100644
--- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
@@ -161,7 +161,7 @@ class ControllerResolverTest extends UnitTestCase {
// Tests passing a controller via the request.
[['_controller' => 'Drupal\Tests\Core\Controller\MockContainerAware::getResult'], 'Drupal\Tests\Core\Controller\MockContainerAware', 'This is container aware.'],
// Tests a request with no controller specified.
- [[], FALSE]
+ [[], FALSE],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
index 455cbcf799a..fde641bd400 100644
--- a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
@@ -51,7 +51,7 @@ class DateHelperTest extends UnitTestCase {
5 => 'Friday',
6 => 'Saturday',
0 => 'Sunday',
- ]
+ ],
];
$data[] = [
2,
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
index 30a515c78b7..76ab32e331d 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
@@ -347,7 +347,7 @@ class TaggedHandlersPassTest extends UnitTestCase {
$container
->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments')
->addTag('service_collector', [
- 'call' => 'addNoPriority'
+ 'call' => 'addNoPriority',
]);
$container
@@ -376,7 +376,7 @@ class TaggedHandlersPassTest extends UnitTestCase {
$container
->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments')
->addTag('service_collector', [
- 'call' => 'addWithId'
+ 'call' => 'addWithId',
]);
$container
@@ -408,7 +408,7 @@ class TaggedHandlersPassTest extends UnitTestCase {
$container
->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments')
->addTag('service_collector', [
- 'call' => 'addWithDifferentOrder'
+ 'call' => 'addWithDifferentOrder',
]);
$container
@@ -416,7 +416,7 @@ class TaggedHandlersPassTest extends UnitTestCase {
->addTag('consumer_id', [
'priority' => 0,
'extra1' => 'extra1',
- 'extra3' => 'extra3'
+ 'extra3' => 'extra3',
]);
$handler_pass = new TaggedHandlersPass();
diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php
index 4d198b9cb20..308c49c0faa 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php
@@ -21,7 +21,7 @@ class DiscoverServiceProvidersTest extends UnitTestCase {
public function testDiscoverServiceCustom() {
new Settings([
'container_yamls' => [
- __DIR__ . '/fixtures/custom.yml'
+ __DIR__ . '/fixtures/custom.yml',
],
]);
diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
index da041bda4e4..bc32d04ba68 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
@@ -116,7 +116,7 @@ namespace Drupal\Tests\Core\DrupalKernel {
'www.example.com',
'www.example.com',
'canonical URL is trusted',
- TRUE
+ TRUE,
];
// Tests missing hostname for HTTP/1.0 compatibility where the Host
@@ -128,25 +128,25 @@ namespace Drupal\Tests\Core\DrupalKernel {
'example.com',
'www.example.com',
'host from settings is trusted',
- TRUE
+ TRUE,
];
$data[] = [
'subdomain.example.com',
'www.example.com',
'host from settings is trusted',
- TRUE
+ TRUE,
];
$data[] = [
'www.example.org',
'www.example.com',
'host from settings is trusted',
- TRUE
+ TRUE,
];
$data[] = [
'example.org',
'www.example.com',
'host from settings is trusted',
- TRUE
+ TRUE,
];
// Tests mismatch.
@@ -154,7 +154,7 @@ namespace Drupal\Tests\Core\DrupalKernel {
'www.blackhat.com',
'www.example.com',
'unspecified host is untrusted',
- FALSE
+ FALSE,
];
return $data;
diff --git a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
index 81069c35d3f..eeba7e54c5d 100644
--- a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
@@ -40,7 +40,7 @@ class BaseFieldDefinitionTest extends UnitTestCase {
$this->fieldTypeDefinition = [
'id' => $this->fieldType,
'storage_settings' => [
- 'some_setting' => 'value 1'
+ 'some_setting' => 'value 1',
],
'field_settings' => [
'some_instance_setting' => 'value 2',
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
index a7f7eb41aa7..87b8a68fc1c 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
@@ -676,7 +676,7 @@ class EntityFieldManagerTest extends UnitTestCase {
'type' => 'string',
'bundles' => ['second_bundle' => 'second_bundle'],
],
- ]
+ ],
];
$this->assertEquals($expected, $this->entityFieldManager->getFieldMap());
}
@@ -695,7 +695,7 @@ class EntityFieldManagerTest extends UnitTestCase {
'type' => 'string',
'bundles' => ['second_bundle' => 'second_bundle'],
],
- ]
+ ],
];
$this->setUpEntityTypeDefinitions();
$this->cacheBackend->get('entity_field_map')->willReturn((object) ['data' => $expected]);
diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
index 5643b15ca3e..a18e41076d1 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
@@ -155,7 +155,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
],
'domain' => [
'type' => 'varchar',
- ]
+ ],
],
'unique keys' => [
'email' => ['username', 'hostname', ['domain', 3]],
@@ -194,7 +194,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
],
'city' => [
'type' => 'varchar',
- ]
+ ],
],
'indexes' => [
'country_state_city' => ['country', 'state', ['city', 10]],
@@ -397,7 +397,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'id' => 'id',
'revision' => 'revision_id',
],
- ]
+ ],
])
->setMethods(['getRevisionMetadataKeys'])
->getMock();
@@ -429,7 +429,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'revision_id' => [
'type' => 'int',
'not null' => FALSE,
- ]
+ ],
],
'primary key' => ['id'],
'unique keys' => [
@@ -440,7 +440,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'entity_test__revision' => [
'table' => 'entity_test_revision',
'columns' => ['revision_id' => 'revision_id'],
- ]
+ ],
],
],
'entity_test_revision' => [
@@ -533,7 +533,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'langcode' => [
'type' => 'varchar',
'not null' => TRUE,
- ]
+ ],
],
'primary key' => ['id'],
'unique keys' => [],
@@ -613,7 +613,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'revision' => 'revision_id',
'langcode' => 'langcode',
],
- ]
+ ],
])
->setMethods(['getRevisionMetadataKeys'])
->getMock();
@@ -670,7 +670,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'langcode' => [
'type' => 'varchar',
'not null' => TRUE,
- ]
+ ],
],
'primary key' => ['id'],
'unique keys' => [
@@ -853,7 +853,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'color' => [
'table' => 'color',
'columns' => [
- 'color' => 'id'
+ 'color' => 'id',
],
],
],
@@ -1020,7 +1020,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase {
'color' => [
'table' => 'color',
'columns' => [
- 'color' => 'id'
+ 'color' => 'id',
],
],
],
diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
index 964020cf5ca..3d7fb43aef1 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
@@ -790,7 +790,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
$revision_metadata_keys = [
'revision_created' => 'revision_timestamp',
'revision_user' => 'revision_uid',
- 'revision_log_message' => 'revision_log'
+ 'revision_log_message' => 'revision_log',
];
$this->entityType->expects($this->atLeastOnce())
@@ -1389,7 +1389,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
->method('getImplementations')
->will($this->returnValueMap([
['entity_load', []],
- [$this->entityTypeId . '_load', []]
+ [$this->entityTypeId . '_load', []],
]));
$this->container->set('module_handler', $this->moduleHandler);
diff --git a/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php b/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php
index bfd5143849a..d2672b344be 100644
--- a/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php
@@ -83,7 +83,7 @@ class EntityReferenceSelectionUnitTest extends UnitTestCase {
'bar' => 'bar value',
'baz' => 'baz value',
],
- ]
+ ],
],
],
[
@@ -96,7 +96,7 @@ class EntityReferenceSelectionUnitTest extends UnitTestCase {
'handler_settings' => [
// Same setting from root level takes precedence.
'setting2' => 'this will be overwritten',
- ]
+ ],
],
],
];
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
index 8f339a839dc..2fadea64268 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
@@ -43,11 +43,11 @@ class ExceptionJsonSubscriberTest extends UnitTestCase {
return [
'uncacheable exception' => [
new MethodNotAllowedHttpException(['POST', 'PUT'], 'test message'),
- JsonResponse::class
+ JsonResponse::class,
],
'cacheable exception' => [
new CacheableMethodNotAllowedHttpException((new CacheableMetadata())->setCacheContexts(['route']), ['POST', 'PUT'], 'test message'),
- CacheableJsonResponse::class
+ CacheableJsonResponse::class,
],
];
}
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
index 49b9fbd2899..d8290fe4753 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
@@ -116,7 +116,7 @@ RSS;
Request::create('/'),
'foo',
new Response($content, 200, [
- 'Content-Type' => 'application/rss+xml'
+ 'Content-Type' => 'application/rss+xml',
])
);
diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
index 3b9d09a12a8..993bf759ffb 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
@@ -111,7 +111,7 @@ class ExtensionListTest extends UnitTestCase {
'core' => '8.x',
'name' => 'test name',
'mtime' => 123456789,
- ]
+ ],
], $infos);
}
@@ -129,7 +129,7 @@ class ExtensionListTest extends UnitTestCase {
'core' => '8.x',
'name' => 'test name',
'mtime' => 123456789,
- ]
+ ],
], $infos);
}
diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
index 4fda0022b7d..820c6bd47cc 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
@@ -52,7 +52,7 @@ class ModuleHandlerTest extends UnitTestCase {
'type' => 'module',
'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml',
'filename' => 'module_handler_test.module',
- ]
+ ],
], $this->cacheBackend);
return $module_handler;
}
@@ -107,8 +107,8 @@ class ModuleHandlerTest extends UnitTestCase {
'type' => 'module',
'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml',
'filename' => 'module_handler_test.module',
- ]
- ], $this->cacheBackend
+ ],
+ ], $this->cacheBackend,
])
->setMethods(['load'])
->getMock();
@@ -177,7 +177,7 @@ class ModuleHandlerTest extends UnitTestCase {
$fixture_module_handler = $this->getModuleHandler();
$module_handler = $this->getMockBuilder(ModuleHandler::class)
->setConstructorArgs([
- $this->root, [], $this->cacheBackend
+ $this->root, [], $this->cacheBackend,
])
->setMethods(['resetImplementations'])
->getMock();
@@ -205,7 +205,7 @@ class ModuleHandlerTest extends UnitTestCase {
$module_handler = $this->getMockBuilder(ModuleHandler::class)
->setConstructorArgs([
- $this->root, [], $this->cacheBackend
+ $this->root, [], $this->cacheBackend,
])
->setMethods(['resetImplementations'])
->getMock();
@@ -227,7 +227,7 @@ class ModuleHandlerTest extends UnitTestCase {
$module_handler = $this->getMockBuilder(ModuleHandler::class)
->setConstructorArgs([
- $this->root, [], $this->cacheBackend
+ $this->root, [], $this->cacheBackend,
])
->setMethods(['resetImplementations'])
->getMock();
@@ -264,8 +264,8 @@ class ModuleHandlerTest extends UnitTestCase {
'type' => 'module',
'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml',
'filename' => 'module_handler_test.module',
- ]
- ], $this->cacheBackend
+ ],
+ ], $this->cacheBackend,
])
->setMethods(['loadInclude'])
->getMock();
@@ -353,8 +353,8 @@ class ModuleHandlerTest extends UnitTestCase {
'type' => 'module',
'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml',
'filename' => 'module_handler_test.module',
- ]
- ], $this->cacheBackend
+ ],
+ ], $this->cacheBackend,
])
->setMethods(['buildImplementationInfo', 'loadInclude'])
->getMock();
@@ -391,8 +391,8 @@ class ModuleHandlerTest extends UnitTestCase {
'type' => 'module',
'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml',
'filename' => 'module_handler_test.module',
- ]
- ], $this->cacheBackend
+ ],
+ ], $this->cacheBackend,
])
->setMethods(['buildImplementationInfo'])
->getMock();
diff --git a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
index 645daf43d24..f0f9f3bec07 100644
--- a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
+++ b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
@@ -119,7 +119,7 @@ class FileSystemTest extends UnitTestCase {
$data[] = [
'public://dir/test.txt',
'test',
- '.txt'
+ '.txt',
];
return $data;
}
diff --git a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
index 14e03cb565c..4d95e0b0bcc 100644
--- a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
@@ -19,7 +19,7 @@ class ConfigFormBaseTraitTest extends UnitTestCase {
// Set up some configuration in a mocked config factory.
$trait->configFactory = $this->getConfigFactoryStub([
'editable.config' => [],
- 'immutable.config' => []
+ 'immutable.config' => [],
]);
$trait->expects($this->any())
diff --git a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
index 177504c13ad..d9537c3fdbd 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
@@ -86,7 +86,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase {
'#ajax' => [
'callback' => function (array $form, FormStateInterface $form_state) {
return $form['test'];
- }
+ },
],
];
$request = new Request();
@@ -117,7 +117,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase {
'#ajax' => [
'callback' => function (array $form, FormStateInterface $form_state) {
return new AjaxResponse([]);
- }
+ },
],
];
$request = new Request();
@@ -142,7 +142,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase {
'#ajax' => [
'callback' => function (array $form, FormStateInterface $form_state) {
return new AjaxResponse([]);
- }
+ },
],
];
$request = new Request();
@@ -175,7 +175,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase {
'#ajax' => [
'callback' => function (array $form, FormStateInterface $form_state) {
return new AjaxResponse([]);
- }
+ },
],
];
$request = new Request();
diff --git a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
index f089bc37678..473308f64b3 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
@@ -331,7 +331,7 @@ class FormCacheTest extends UnitTestCase {
public function testSetCacheWithForm() {
$form_build_id = 'the_form_build_id';
$form = [
- '#form_id' => 'the_form_id'
+ '#form_id' => 'the_form_id',
];
$form_state = new FormState();
diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
index ae42e511a27..7335603686e 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
@@ -1254,7 +1254,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
public function testSetRedirect() {
$route_name = 'foo';
$route_parameters = [
- 'bar' => 'baz'
+ 'bar' => 'baz',
];
$options = [
'qux' => 'foo',
diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
index cc5514a76be..ea431bf3aa8 100644
--- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
@@ -85,7 +85,7 @@ class LocalTaskDefaultTest extends UnitTestCase {
*/
public function testGetRouteParametersForStaticRoute() {
$this->pluginDefinition = [
- 'route_name' => 'test_route'
+ 'route_name' => 'test_route',
];
$this->routeProvider->expects($this->once())
@@ -105,7 +105,7 @@ class LocalTaskDefaultTest extends UnitTestCase {
public function testGetRouteParametersInPluginDefinitions() {
$this->pluginDefinition = [
'route_name' => 'test_route',
- 'route_parameters' => ['parameter' => 'example']
+ 'route_parameters' => ['parameter' => 'example'],
];
$this->routeProvider->expects($this->once())
@@ -124,7 +124,7 @@ class LocalTaskDefaultTest extends UnitTestCase {
*/
public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters() {
$this->pluginDefinition = [
- 'route_name' => 'test_route'
+ 'route_name' => 'test_route',
];
$route = new Route('/test-route/{parameter}');
@@ -147,7 +147,7 @@ class LocalTaskDefaultTest extends UnitTestCase {
*/
public function testGetRouteParametersForDynamicRouteWithUpcastedParameters() {
$this->pluginDefinition = [
- 'route_name' => 'test_route'
+ 'route_name' => 'test_route',
];
$route = new Route('/test-route/{parameter}');
@@ -177,17 +177,17 @@ class LocalTaskDefaultTest extends UnitTestCase {
[
'base_route' => 'local_task_default',
'route_name' => 'local_task_default',
- 'id' => 'local_task_default'
+ 'id' => 'local_task_default',
],
'local_task_default',
- -10
+ -10,
],
// If the base route is different from the route of the tab, ignore it.
[
[
'base_route' => 'local_task_example',
'route_name' => 'local_task_other',
- 'id' => 'local_task_default'
+ 'id' => 'local_task_default',
],
'local_task_default',
0,
@@ -291,9 +291,9 @@ class LocalTaskDefaultTest extends UnitTestCase {
'attributes' => [
'class' => [
'example',
- 'is-active'
- ]
- ]
+ 'is-active',
+ ],
+ ],
], $this->localTaskBase->getOptions($route_match));
}
diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
index 0295e408c7a..0bb828b2ff1 100644
--- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
@@ -46,7 +46,7 @@ class MenuLinkDefaultFormTest extends UnitTestCase {
'weight' => 5,
'expanded' => 1,
'parent' => 'bar',
- 'menu_name' => 'foo'
+ 'menu_name' => 'foo',
], $result);
}
diff --git a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
index 98a122ca214..b287f12eb3a 100644
--- a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
@@ -111,14 +111,14 @@ class StaticMenuLinkOverridesTest extends UnitTestCase {
$definition_save_1 = [
'definitions' => [
- 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE]
- ]
+ 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE],
+ ],
];
$definitions_save_2 = [
'definitions' => [
'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE],
- 'test1__la___ma' => ['parent' => 'test1', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE]
- ]
+ 'test1__la___ma' => ['parent' => 'test1', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE],
+ ],
];
$config->expects($this->at(2))
->method('set')
diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
index 6d60e1d4e77..b7549ce47ac 100644
--- a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
@@ -80,7 +80,7 @@ class ParamConverterManagerTest extends UnitTestCase {
$converters[0]['sorted'] = [
'strawberry', 'raspberry', 'pear', 'peach',
- 'pineapple', 'banana', 'apple'
+ 'pineapple', 'banana', 'apple',
];
$converters[1]['unsorted'] = [
@@ -95,7 +95,7 @@ class ParamConverterManagerTest extends UnitTestCase {
$converters[1]['sorted'] = [
'giraffe', 'zebra', 'eagle', 'ape',
- 'cat', 'puppy', 'llama'
+ 'cat', 'puppy', 'llama',
];
return $converters;
diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
index e6215caac83..0aa2de7b64b 100644
--- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
+++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
@@ -49,8 +49,8 @@ class PathProcessorTest extends UnitTestCase {
$language_prefixes = array_keys($this->languages);
$config = [
'url' => [
- 'prefixes' => array_combine($language_prefixes, $language_prefixes)
- ]
+ 'prefixes' => array_combine($language_prefixes, $language_prefixes),
+ ],
];
// Create a URL-based language negotiation method definition.
@@ -109,7 +109,7 @@ class PathProcessorTest extends UnitTestCase {
$config_factory_stub = $this->getConfigFactoryStub(
[
'system.site' => [
- 'page.front' => '/user/login'
+ 'page.front' => '/user/login',
],
'language.negotiation' => [
'url' => [
diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
index 040b1f988e1..092525c75d5 100644
--- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
@@ -675,17 +675,17 @@ class BubbleableMetadataTest extends UnitTestCase {
'merge-cacheable-metadata' => [
(new BubbleableMetadata())->setCacheContexts(['foo'])->setCacheTags(['foo'])->setCacheMaxAge(20),
(new CacheableMetadata())->setCacheContexts(['bar'])->setCacheTags(['bar'])->setCacheMaxAge(60),
- (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20)
+ (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20),
],
'merge-bubbleable-metadata' => [
(new BubbleableMetadata())->setCacheContexts(['foo'])->setCacheTags(['foo'])->setCacheMaxAge(20)->setAttachments(['foo' => []]),
(new BubbleableMetadata())->setCacheContexts(['bar'])->setCacheTags(['bar'])->setCacheMaxAge(60)->setAttachments(['bar' => []]),
- (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20)->setAttachments(['foo' => [], 'bar' => []])
+ (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20)->setAttachments(['foo' => [], 'bar' => []]),
],
'merge-attachments-metadata' => [
(new BubbleableMetadata())->setAttachments(['foo' => []]),
(new BubbleableMetadata())->setAttachments(['baro' => []]),
- (new BubbleableMetadata())->setAttachments(['foo' => [], 'bar' => []])
+ (new BubbleableMetadata())->setAttachments(['foo' => [], 'bar' => []]),
],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php
index db463d8b40e..06f11d3b946 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php
@@ -59,7 +59,7 @@ class MachineNameTest extends UnitTestCase {
'maxlength' => 32,
'additional_property' => TRUE,
'#additional_property_with_hash' => TRUE,
- ]
+ ],
];
$complete_form = [
@@ -67,7 +67,7 @@ class MachineNameTest extends UnitTestCase {
'#type' => 'textfield',
'#id' => 'source',
],
- 'test_machine_name' => $element
+ 'test_machine_name' => $element,
];
$form_state->setCompleteForm($complete_form);
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php
index ead47e471e9..f095ae57368 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php
@@ -30,7 +30,7 @@ class TableSelectTest extends UnitTestCase {
$element['#value'] = 0;
$element['#options'][] = [
- 'title' => new Link('my-text', Url::fromRoute('
'))
+ 'title' => new Link('my-text', Url::fromRoute('')),
];
$element['#attributes'] = [];
diff --git a/core/tests/Drupal/Tests/Core/Render/ElementTest.php b/core/tests/Drupal/Tests/Core/Render/ElementTest.php
index d168f741e5c..81824483248 100644
--- a/core/tests/Drupal/Tests/Core/Render/ElementTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/ElementTest.php
@@ -28,7 +28,7 @@ class ElementTest extends UnitTestCase {
$element = [
'#property1' => 'property1',
'#property2' => 'property2',
- 'property3' => 'property3'
+ 'property3' => 'property3',
];
$properties = Element::properties($element);
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
index f55e34832e0..6ad2acbe0da 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
@@ -297,7 +297,7 @@ class RendererBubblingTest extends RendererTestBase {
$test_element = [
'#cache' => [
'keys' => ['parent'],
- 'tags' => ['yar', 'har']
+ 'tags' => ['yar', 'har'],
],
'#markup' => 'parent',
'child' => [
@@ -308,10 +308,10 @@ class RendererBubblingTest extends RendererTestBase {
'tags' => ['fiddle', 'dee'],
],
'#attached' => [
- 'library' => ['foo/bar']
+ 'library' => ['foo/bar'],
],
'#markup' => '',
- ]
+ ],
],
];
$expected_cache_items = [
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
index 8cfa0fda7c8..0d38afd1061 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
@@ -1125,7 +1125,7 @@ HTML;
EOS;
$output = str_replace([
'{{ title }}',
- '{{ children }}'
+ '{{ children }}',
], [$vars['#title'], $vars['#children']], $output);
return $output;
});
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
index 76f9d48b279..7e4b83345eb 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
@@ -46,10 +46,10 @@ class RendererRecursionTest extends RendererTestBase {
$page = [
'content' => [
'#pre_render' => [
- $callable
+ $callable,
],
'#suffix' => $parent_markup,
- ]
+ ],
];
$renderer->renderRoot($page);
}
@@ -78,10 +78,10 @@ class RendererRecursionTest extends RendererTestBase {
'content' => [
'complex_child' => $complex_child_template,
'#post_render' => [
- $callable
+ $callable,
],
'#suffix' => $parent_markup,
- ]
+ ],
];
$output = $renderer->renderRoot($page);
@@ -114,10 +114,10 @@ class RendererRecursionTest extends RendererTestBase {
$page = [
'content' => [
'#pre_render' => [
- $callable
+ $callable,
],
'#suffix' => $parent_markup,
- ]
+ ],
];
$output = $renderer->renderRoot($page);
$this->assertEquals('This is a rendered placeholder!
' . $parent_markup, $output, 'Rendered output as expected, with the placeholder replaced.');
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
index eda1f9fc605..adfc890cb08 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
@@ -180,7 +180,7 @@ class RendererTest extends RendererTestBase {
'#pre_render' => [function ($elements) {
$elements['#markup'] .= '';
return $elements;
- }
+ },
],
],
'fooalert("bar");',
@@ -193,7 +193,7 @@ class RendererTest extends RendererTestBase {
'#pre_render' => [function ($elements) {
$elements['#markup'] .= '';
return $elements;
- }
+ },
],
],
'foo',
@@ -206,7 +206,7 @@ class RendererTest extends RendererTestBase {
'#pre_render' => [function ($elements) {
$elements['#plain_text'] .= '';
return $elements;
- }
+ },
],
],
'foo<script>alert("bar");</script>',
@@ -508,7 +508,7 @@ class RendererTest extends RendererTestBase {
$build = [
'#access_callback' => function () use ($access) {
return $access;
- }
+ },
];
$this->assertAccess($build, $access);
@@ -527,7 +527,7 @@ class RendererTest extends RendererTestBase {
'#access' => $access,
'#access_callback' => function () {
return TRUE;
- }
+ },
];
$this->assertAccess($build, $access);
@@ -613,7 +613,7 @@ class RendererTest extends RendererTestBase {
[
'#markup' => 'kittens',
'#cache' => [
- 'tags' => ['kittens-147']
+ 'tags' => ['kittens-147'],
],
],
],
@@ -961,7 +961,7 @@ class RendererTest extends RendererTestBase {
'contexts' => ['theme'],
'tags' => ['bar'],
'max-age' => 600,
- ]
+ ],
],
new TestCacheableDependency(['user.roles'], ['foo'], Cache::PERMANENT),
[
@@ -979,7 +979,7 @@ class RendererTest extends RendererTestBase {
'contexts' => ['theme'],
'tags' => ['bar'],
'max-age' => 600,
- ]
+ ],
],
new \stdClass(),
[
diff --git a/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php b/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php
index 38278ab0811..5ff38fa46b6 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php
@@ -60,7 +60,7 @@ class RoutingFixtures {
'path' => '/path/two',
'methods' => ['GET'],
'requirements' => [
- '_format' => 'json'
+ '_format' => 'json',
],
];
$routes['route_d'] = [
@@ -70,7 +70,7 @@ class RoutingFixtures {
'path' => '/path/two',
'methods' => ['GET', 'HEAD'],
'requirements' => [
- '_format' => 'html'
+ '_format' => 'html',
],
];
diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
index a872e305d41..f98a8a9c545 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
@@ -114,12 +114,12 @@ class TwigExtensionTest extends UnitTestCase {
['{{ path(name = "foo", parameters = foo) }}', TRUE],
[
'{{ path(name = "foo", parameters = { foo: ["foo", "bar"] }) }}',
- TRUE
+ TRUE,
],
['{{ path(name = "foo", parameters = { foo: foo }) }}', TRUE],
[
'{{ path(name = "foo", parameters = { foo: "foo", bar: "bar" }) }}',
- TRUE
+ TRUE,
],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
index 7084278b804..8a6fdc83193 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
@@ -38,7 +38,7 @@ class TestDatabaseTest extends UnitTestCase {
public function providerTestConstructor() {
return [
['test1234', 'test1234', 'sites/simpletest/1234'],
- ['test123456test234567', 'test123456test234567', 'sites/simpletest/234567']
+ ['test123456test234567', 'test123456test234567', 'sites/simpletest/234567'],
];
}
diff --git a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
index ede32ebf30e..853a788f5fe 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
@@ -40,8 +40,8 @@ class TestSuiteBaseTest extends TestCase {
'Listener.php' => ' [
'Listener.php' => 'addConstraint('Callback', [
'callback' => function ($value, ExecutionContextInterface $context) {
$context->addViolation('test violation: ' . $value);
- }
+ },
])
);
$typed_data->setValue('foo');
@@ -147,7 +147,7 @@ class RecursiveContextualValidatorTest extends UnitTestCase {
$options = [
'callback' => function ($value, ExecutionContextInterface $context) {
$context->addViolation('test violation');
- }
+ },
];
$typed_data = $this->typedDataManager->create(
DataDefinition::create('string')
@@ -320,7 +320,7 @@ class RecursiveContextualValidatorTest extends UnitTestCase {
'value' => [
'key1' => 'value1',
'key2' => 'value2',
- 'key_with_properties' => $subkey_value
+ 'key_with_properties' => $subkey_value,
],
];
$tree['properties'] = [
diff --git a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
index 2462148ebe0..4ebecb6097a 100644
--- a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
+++ b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
@@ -79,14 +79,14 @@ EOS;
'modules' => [
'module_a' => [
'module_a.post_update.php' => $module_a,
- 'module_a.info.yml' => $info_a
+ 'module_a.info.yml' => $info_a,
],
'module_b' => [
'module_b.post_update.php' => $module_b,
- 'module_b.info.yml' => $info_b
+ 'module_b.info.yml' => $info_b,
],
- ]
- ]
+ ],
+ ],
],
]);
}
@@ -103,13 +103,13 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$this->assertEquals([
'module_a_post_update_a',
'module_a_post_update_b',
- 'module_b_post_update_a'
+ 'module_b_post_update_a',
], $update_registry->getPendingUpdateFunctions());
}
@@ -150,12 +150,12 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$this->assertEquals(array_values([
'module_a_post_update_b',
- 'module_b_post_update_a'
+ 'module_b_post_update_a',
]), array_values($update_registry->getPendingUpdateFunctions()));
}
@@ -172,7 +172,7 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$expected = [];
@@ -197,7 +197,7 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$expected = [];
@@ -218,7 +218,7 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$this->assertEquals(['module_a_post_update_a', 'module_a_post_update_b'], array_values($update_registry->getModuleUpdateFunctions('module_a')));
@@ -241,7 +241,7 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$update_registry->registerInvokedUpdates(['module_a_post_update_a']);
}
@@ -262,7 +262,7 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$update_registry->registerInvokedUpdates(['module_a_post_update_a', 'module_a_post_update_b']);
}
@@ -283,7 +283,7 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$update_registry->registerInvokedUpdates(['module_a_post_update_a']);
}
@@ -304,7 +304,7 @@ EOS;
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$update_registry->filterOutInvokedUpdatesByModule('module_a');
diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
index 91620e61559..5f8474a0dc9 100644
--- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@@ -94,7 +94,7 @@ class TokenTest extends UnitTestCase {
$container = new ContainerBuilder();
$this->cacheContextManager = new CacheContextsManager($container, [
'current_user',
- 'custom_context'
+ 'custom_context',
]);
$container->set('cache_contexts_manager', $this->cacheContextManager);
\Drupal::setContainer($container);
@@ -170,7 +170,7 @@ class TokenTest extends UnitTestCase {
$this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags());
$this->assertEquals([
'current_user',
- 'custom_context'
+ 'custom_context',
], $bubbleable_metadata->getCacheContexts());
$this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge());
}
@@ -205,7 +205,7 @@ class TokenTest extends UnitTestCase {
$this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags());
$this->assertEquals([
'current_user',
- 'custom_context'
+ 'custom_context',
], $bubbleable_metadata->getCacheContexts());
$this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge());
}
@@ -243,7 +243,7 @@ class TokenTest extends UnitTestCase {
$this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags());
$this->assertEquals([
'current_user',
- 'custom_context'
+ 'custom_context',
], $bubbleable_metadata->getCacheContexts());
$this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge());
}