',
diff --git a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
index 81eb6f21a860d2d4c45187eb63453205ace128e0..7e5f83f7f503682e561cb1bb9e67fb30c643abfc 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 @@ public function buildForm(array $form, FormStateInterface $form_state) {
]);
$form['view'] = [
'#type' => 'value',
- '#value' => $view
+ '#value' => $view,
];
$displays = $view->get('display');
@@ -68,7 +68,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'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 568900978398139bf8120380f049072125b051ad..e8aa2c31010fe4b040e32718603e78f72eea8834 100644
--- a/core/modules/views_ui/src/Tests/RowUITest.php
+++ b/core/modules/views_ui/src/Tests/RowUITest.php
@@ -34,13 +34,13 @@ public function testRowUI() {
$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 4bc8eaab3ad3dda49647de4a2eaa37a5314da0f8..787527baf8a9938b6591d8e259458352b736ccd8 100644
--- a/core/modules/views_ui/src/ViewPreviewForm.php
+++ b/core/modules/views_ui/src/ViewPreviewForm.php
@@ -77,7 +77,7 @@ protected function actions(array $form, FormStateInterface $form_state) {
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 beb5ffff475e11d598d639f7b2eab5e95179260d..6b49fdc92d3b8cb22f04c9b63228c46331b37459 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -713,7 +713,7 @@ public function renderPreview($display_id, $args = []) {
'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 7291dc2e8de8413a389238b3f3c0b3b691c50a4e..2f007f193c6814ec8f3e5d9834b0e5d68c0f08cf 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 @@ public function testDefaultMenuTabRegression() {
$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 519d5226e7ee7228845f26939c48bc344f7599ed..8fa5a80de387055b3c379ec466992eb12508e3e6 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 @@ public function testAddDisplay() {
*/
public function testReorderDisplay() {
$view = [
- 'block[create]' => TRUE
+ 'block[create]' => TRUE,
];
$view = $this->randomView($view);
@@ -60,7 +60,7 @@ public function testReorderDisplay() {
// 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 b4be17828d05fd787b4d7d38d8b0c3b49c0c2fc9..7d96d0c5b57ad7404541e9481c2b36c7d688402b 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 @@ protected function schemaDefinition() {
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'default' => 0
+ 'default' => 0,
];
return $schema;
@@ -74,8 +74,8 @@ protected function viewsData() {
'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 @@ public function testHandlerHelpEscaping() {
'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 1eb9c7862f4215e2af47a63ced3436f466ce6929..62f682a5f9255c7f48eaa0b4599646bd42c43adc 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 @@ public function testStyleUI() {
$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 839fe3a47a993e3787700e6750ef7ae8bfa20ea0..8a2dd2953f3b20c1a858d5a7f30975da94e7c69e 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 @@ public function testViewsUiTourTipsTranslated() {
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 b4a3df022d32dadb83e655bf1803a87abcd8b922..d448252c6f4ac609e7455c10a2f730a49ed73cac 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 @@ public function testBuildRowEntityList() {
'theme' => 'views_view',
'no_ui' => TRUE,
'admin' => '',
- ]
+ ],
],
[
'page',
@@ -61,7 +61,7 @@ public function testBuildRowEntityList() {
'contextual_links_locations' => ['page'],
'theme' => 'views_view',
'admin' => 'Page admin label',
- ]
+ ],
],
[
'embed',
@@ -71,7 +71,7 @@ public function testBuildRowEntityList() {
'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 0475bce698bc515d8986409b0e6217ca251676f2..318d85bd69148d9b3c5482e1464d2eae62791ebe 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 f57132f7af28c80583f2e67a1bbafc225753ef32..69eff489fc4f80fe0e64d2b6482a6a52ed97b7cf 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 676868d2421104ab308eec7ecc727ad44e1fdc35..d6560f592f5d710eefe23703f502f2b004873fd0 100644
--- a/core/modules/workflows/src/Form/WorkflowEditForm.php
+++ b/core/modules/workflows/src/Form/WorkflowEditForm.php
@@ -77,7 +77,7 @@ public function form(array $form, FormStateInterface $form_state) {
$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 @@ public function form(array $form, FormStateInterface $form_state) {
'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 @@ public function form(array $form, FormStateInterface $form_state) {
'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 7b8b90355ebffa372e9fea7168d7575e0bbc528f..0ecc3cde6beda57ec609112f5da85d7b973a871d 100644
--- a/core/modules/workflows/src/Form/WorkflowStateEditForm.php
+++ b/core/modules/workflows/src/Form/WorkflowStateEditForm.php
@@ -121,14 +121,14 @@ public function form(array $form, FormStateInterface $form_state) {
'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 @@ protected function actions(array $form, FormStateInterface $form_state) {
],
'#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 ac1552ecdd0fa56b4c710ae5622bafc9397ab0de..2d01e4324e43bfb3331d3b6dd300d92a9358eb5b 100644
--- a/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php
+++ b/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php
@@ -224,8 +224,8 @@ protected function actions(array $form, FormStateInterface $form_state) {
],
'#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 c36171aa6e8422c4153bce7c2c2fd7e139cc6fee..a85ef659fb253eb494d966375f15f3e8d9e0368e 100644
--- a/core/modules/workflows/src/WorkflowListBuilder.php
+++ b/core/modules/workflows/src/WorkflowListBuilder.php
@@ -73,7 +73,7 @@ public function buildRow(EntityInterface $entity) {
$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 f2d394c40605de44f58b6bb22071a9a0a5a60649..21227d7c7a8dfc0fbf1a4940465ffb8de25d3efa 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 @@ protected function getExpectedNormalizedEntity() {
],
'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 eae90d2ca7b42ee05a92a5d5aabd1d1fff69b144..dd34274e0715fe83d6642316316dd8227efe847a 100644
--- a/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php
+++ b/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php
@@ -381,7 +381,7 @@ public function testEntityQueryRelationship() {
$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 128b84efa666a6ad6839210ea16dd7a88d7f386b..30c8688ef69d80a0e2cf53fa14229da1212280ef 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 133e445bd04774214ae3e0291414024d8c570956..ad8b4383bdba98251e14ea66c001a5ea6aeb8a82 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
@@ -138,7 +138,7 @@ public function testFieldWidgetsWithLimitedValidationErrors() {
// \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 c8748342fb72d6d3c0372ef50bcf300304f49b9c..cc43936d6f166f27d0b63965da080cd07337983d 100644
--- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
+++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
@@ -83,7 +83,7 @@ public function testCrossSiteRequest() {
$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 3aaac143eac6b46b3070aad2465ad8ad4314b12a..96b59d7be00a45acdbc33c5d6445fc90c1686737 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
@@ -63,8 +63,8 @@ public function testMixedCasePaths() {
$this->drupalGet('admin/content', [
'query' => [
- 'title' => 'FooBarBaz'
- ]
+ 'title' => 'FooBarBaz',
+ ],
]);
$this->assertSession()->linkExists('FooBarBaz');
@@ -74,8 +74,8 @@ public function testMixedCasePaths() {
$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 744f527ba2a4d0b0458559125dc157388882d890..d7d84708fe9f26ef73719b72acf7c3b341f92467 100644
--- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
@@ -265,7 +265,7 @@ protected function initMink() {
}
$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 c52e3ea8533abab32a63fce7a58a0b001236eeae..4ceebf5b9b32deee12dddeb4a0151998740c6722 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 a9cd9f19022b42aefbb4786d075ede2f5a0bccde..6a0f938bd4558bad8872066fd5e8223a7849b24b 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
@@ -50,9 +50,9 @@ public function testDependencyManagement() {
'id' => 'entity1',
'dependencies' => [
'enforced' => [
- 'module' => ['node']
- ]
- ]
+ 'module' => ['node'],
+ ],
+ ],
]
);
$entity1->save();
@@ -200,7 +200,7 @@ public function testConfigEntityUninstall() {
'id' => 'entity1',
'dependencies' => [
'enforced' => [
- 'module' => ['node', 'config_test']
+ 'module' => ['node', 'config_test'],
],
],
]
@@ -264,7 +264,7 @@ public function testConfigEntityUninstallComplex(array $entity_id_suffixes) {
'id' => 'entity_' . $entity_id_suffixes[0],
'dependencies' => [
'enforced' => [
- 'module' => ['node', 'config_test']
+ 'module' => ['node', 'config_test'],
],
],
]
@@ -309,7 +309,7 @@ public function testConfigEntityUninstallComplex(array $entity_id_suffixes) {
'dependencies' => [
'enforced' => [
'config' => [$entity_1->getConfigDependencyName()],
- 'module' => ['node', 'config_test']
+ 'module' => ['node', 'config_test'],
],
],
]
@@ -508,7 +508,7 @@ public function testConfigEntityDelete() {
// Test dependencies between configuration entities.
$entity1 = $storage->create(
[
- 'id' => 'entity1'
+ 'id' => 'entity1',
]
);
$entity1->save();
@@ -621,7 +621,7 @@ public function testContentEntityDelete() {
'id' => 'entity1',
'dependencies' => [
'enforced' => [
- 'content' => [$content_entity->getConfigDependencyName()]
+ 'content' => [$content_entity->getConfigDependencyName()],
],
],
]
@@ -632,7 +632,7 @@ public function testContentEntityDelete() {
'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 4cbc16a0e04281f9f9165e949bac1dc166975b5a..1b468b0670fae09ea869b14ecdbc32ebbd7f6eb1 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
@@ -31,7 +31,7 @@ public function testNormalize() {
$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 807152bfedd6d59daace7cbe5f81e44d41df3b4a..154d2383b4f7c875274fd7b58473f78c1f784e26 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
@@ -97,7 +97,7 @@ public function testStorageMethods() {
$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 01a9746dffe2f708d18fbb34d5c74266687897ab..84b5a2de1314c5596d65e636e803948d820bc624 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
@@ -105,7 +105,7 @@ public function testRenameValidation() {
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 @@ public function testRenameSimpleConfigValidation() {
// 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 @@ public function testRenameSimpleConfigValidation() {
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 3aff3d5302af7ac1cad5920711e976708c7e0640..dc4e0ae12b9d64f95abc3764bb8c9b3402232209 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
@@ -226,7 +226,7 @@ public function testSecondaryWritePrimaryFirst() {
// 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 @@ public function testSecondaryWriteSecondaryFirst() {
// 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 @@ public function testSecondaryUpdateDeletedDeleterFirst() {
// 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 @@ public function testSecondaryUpdateDeletedDeleterFirst() {
// 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 b2859a0bbfc156f0452134be01219ad61e47e9cd..e16225d0ecaae6002f334f475342604e7980ca37 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
@@ -352,7 +352,7 @@ public function testConfigSaveWithSchema() {
// 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 @@ public function testConfigSaveWithSchema() {
'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 c18910e21d4344f0a6098a71e31e280f29206dba..dc121eaf565d0a727c500fcf21d7b49faa4a8844 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 @@ protected function setUp() {
for ($i = 1; $i < 3; $i++) {
$entity = EntityTest::create([
- 'name' => $this->randomMachineName()
+ 'name' => $this->randomMachineName(),
]);
$entity->save();
$this->referencedEntities[] = $entity;
@@ -297,7 +297,7 @@ public function testInvalidEntityAutocompleteElement() {
$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 @@ public function testInvalidEntityAutocompleteElement() {
$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 8545efe0fa086e4ff8e6ecafed5ff8ef907f40cf..c7bcc2922724acb3afaed4990f840ba8ac0b48aa 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
@@ -351,7 +351,7 @@ public function providerTestFieldAccess() {
'name' => 'A test entity',
'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe',
],
- FALSE
+ FALSE,
],
'string ID entity' => [
EntityTestStringId::class,
@@ -360,7 +360,7 @@ public function providerTestFieldAccess() {
'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 ff3cee571261d5190a1f9fc56167f40c93317379..4cbffedbf8c0765abf716169f39294be28d794d3 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -1067,7 +1067,7 @@ public function testInitialValueFromField($default_initial_value, $expected_valu
// 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 4974a74cb7535a205a23a4064123505b13ab1c64..afd7e0d9b79c8f7fb973aa14bb5d541ca0df47ee 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
@@ -35,12 +35,12 @@ public function testLoadEntityByUuidAccessChecking() {
// 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 f048569707dbbdb501a870b55063210d14a5053f..3f30b2b8996d3382f7a941637794bf4bd3ed8823 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
@@ -683,7 +683,7 @@ public function testCaseSensitivity() {
'translatable' => FALSE,
'settings' => [
'case_sensitive' => FALSE,
- ]
+ ],
]);
$field_storage->save();
@@ -729,7 +729,7 @@ public function testCaseSensitivity() {
'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 @@ public function testPendingRevisions() {
$entity->isDefaultRevision(FALSE);
$entity->{$this->figures}->setValue([
'color' => 'red',
- 'shape' => 'square'
+ 'shape' => 'square',
]);
$entity->save();
@@ -949,7 +949,7 @@ public function testPendingRevisions() {
$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 cedf6851a8b5c826aa7562a23b50b3ffa9720f9a..469f4a32a553f876654a3edd54c7758f1a5af9b0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
@@ -212,7 +212,7 @@ public function testReferencedEntitiesStringId() {
// 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 @@ public function testTargetEntityNoLoad() {
$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 9c003493f436285482b22a705f62f480091a0a7b..0ef35db9dfb1b4c6d029d5b73432287b157c25f1 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
@@ -88,7 +88,7 @@ protected function setUp() {
$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 81e1976fef5fc46922b5cef0c528ef95b73e4268..d3d5e5b1d41376452e57838f8e1fffdfcb053761 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
@@ -144,7 +144,7 @@ public function testValidationWithCompositeConstraint() {
*/
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 df9f4b13376f7c25235bed2e1dfe75643b1f8fcc..d68a1f5ac8cef7c4b84f6e36cb15109c4f7e9b72 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
@@ -34,7 +34,7 @@ protected function setUp() {
/** @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 3f182c91e80b18f3ba321072111d992d5c7fbdc1..be609d8d712e21fe0c1e76930a4913b1361e108e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
@@ -150,7 +150,7 @@ public function testPreExistingItemsValidation() {
['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 590a96cd5f8e8d85c081b19b4b5a4124821a796c..9229a60b0b5c8f3a43e8a31af8647e55714511fe 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
@@ -82,7 +82,7 @@ public function testConfigurableFieldStorageSettings() {
$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 @@ public function testConfigurableFieldSettings() {
$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 05ac7c2557f1b2f0dde8b3dcc59c3fcd33ec5770..4eca9976f222c18000b13efda225afa5da6347cb 100644
--- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
@@ -62,7 +62,7 @@ public function testFileMimeTypeDetection() {
'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 57e0342075f55133c5f841e6f985fb9437f526a3..5c31dc66a42a278f4b3963e588705bc5ea91760d 100644
--- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
@@ -119,7 +119,7 @@ public function testManipulations() {
'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 @@ public function testManipulations() {
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 5966eaa745fd2bbfd722fc18eaa0e1c3ab553aff..6bf2faaa984b9b57db5cd25620ea1dd1159b1e90 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 @@ public function testThemeTableRowRenderArray() {
[
'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 2acaefb873b62b80272d495704b5297c99234b36..043aae4445ce4ede9ff408091ff27b8ade13370d 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
@@ -36,7 +36,7 @@ public function testDrupalRenderThemePreprocessAttached() {
'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 ef593751bf2cbc28aa97fa370146260008b1ca07..40a8a743dd38b77eb0a5211f5a8900caa6459c46 100644
--- a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
@@ -111,7 +111,7 @@ public function testDrupalRewriteSettings() {
'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 748e2bbc6fa076199a194fff8013a49177a09761..d190cc53439db1b7703d20e9f0e58a29433107e5 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 7f6d2eccda8ededad48d4ebf6ce53ee612359874..169da31925d836fa397a7aa1da8f01c6345df8a6 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
@@ -205,7 +205,7 @@ public function testThemeTemplatesRegisteredByModules() {
$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 c44cc1c814166631e0a841c4f65f9ad156cf87f6..8bcc3c4bc98c1fd660671b132a70a78872a2900d 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
@@ -73,7 +73,7 @@ public function providerTestThemeRenderAndAutoescape() {
'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 dbdf351a718321e11c245b91951d312a6e6460cc..826ac047cb5baf306cf82d13c7330561ab2adcaa 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 bbdf10992f3097adae9ce9a50b2ef04ba25d1f67..54f2872ab8b716dd195e8ec9ca588ed035d9c5f6 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
@@ -37,7 +37,7 @@ public function testValidation() {
->setPropertyDefinition('key', DataDefinition::create('integer'))
->addConstraint('ComplexData', [
'key' => [
- 'AllowedValues' => [1, 2, 3]
+ 'AllowedValues' => [1, 2, 3],
],
]);
@@ -67,7 +67,7 @@ public function testValidation() {
->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 e3e3fae2fe8c276a65040fcccf02fb6c552b1284..581960ed509300659b3bd893d774621822f42970 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -470,7 +470,7 @@ public function testTypedDataMaps() {
$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 313b2036d9ffd277a8675d957731ecc39e6ce3a7..433ec38f411d9b000f8ab1a1e40931a60f790f14 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -313,7 +313,7 @@ protected function initMink() {
}
$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 717e32749a9e0f463fdc095266564b48c2b939f4..b37a2bfde4f6be6554614a50b6a0d9713c17c5bc 100644
--- a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
+++ b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
@@ -159,7 +159,7 @@ public function testAllCallable() {
[__CLASS__, 'callMeStatic'],
function () {
return TRUE;
- }
+ },
]));
$this->assertFalse(Inspector::assertAllCallable([
@@ -169,7 +169,7 @@ function () {
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 1b5b23f347e44661eaaf5f3b32e4a6fdf3e6cdb1..577bb8baffd100cea71da45e27c69c476f75000f 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
@@ -993,7 +993,7 @@ protected function getMockContainerDefinition() {
'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 4760c1955b2972342161596ac20eb45dc0b5a0ef..0d1ef58c195243eee3678fadb5458809d06ad5c6 100644
--- a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
+++ b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
@@ -91,7 +91,7 @@ public function providerTestRegexDirectoryIterator() {
[
'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 2f8f23e5b3c863fff54c1bb60ba58e053636cea1..82226d0d3425d2266f701c879284eb88b86d87e5 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
@@ -37,7 +37,7 @@ public function providerEncodeDecodeTests() {
[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 10664ffc66df81122dcc1d8cc0a08b0b16f235f3..02a4ed5f15b14d86f203afef9eb3979f87b60f8e 100644
--- a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
@@ -61,7 +61,7 @@ public function providerTestHexToRgb() {
// 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 80fc7ddf33ca4c3f3df4e8754c69efae573667a3..4cdb1b62f007ecd8e8c100ab250d50a427c836d4 100644
--- a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
@@ -265,7 +265,7 @@ public function testFilter($array, $callable, $expected) {
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 7503cc27100cb24bff913a40c6aebc8aa256116a..ab2447065a76b4554e7074311b89f2ef759651a2 100644
--- a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
@@ -49,42 +49,42 @@ public function providerSortByWeightElement() {
$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 @@ public function providerSortByWeightProperty() {
$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 @@ public function providerSortByTitleElement() {
$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 @@ public function providerSortByTitleProperty() {
$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 0664f94272cc1aae459446b28413c3d1970fcb07..695b4278ed3fb78e067a285e057f439473898a34 100644
--- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
@@ -503,31 +503,31 @@ public function providerTestAttributes() {
'
',
'
',
'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 7be87f593f3188447ec81b73753bca5b79bcb460..65038a6dc8aef41aec14e8789ba15c205843bedc 100644
--- a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
+++ b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
@@ -55,7 +55,7 @@ public function providerTestGet() {
[
'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 95cacea45c6d7e3b521625151c8813da9d2fa0d9..99ba0a5ef9c4d1e60677a82c8e0a9102909f1bc4 100644
--- a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
@@ -141,12 +141,12 @@ public function providerAttachedAssets() {
'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 ba0b4db532f3492cd86b61bb09bf600634a40569..18c7b0080eb6509d425fe4d6bddc5b5ba2eaa249 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
@@ -94,7 +94,7 @@ public function providerTestRender() {
'#tag' => 'style',
'#value' => $value,
'#attributes' => [
- 'media' => $media
+ 'media' => $media,
],
'#browsers' => $browsers,
];
@@ -461,7 +461,7 @@ public function testRenderInvalidType() {
'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 f3824e8d5009b4d8ce40a3fb44e6ed277d244da0..8b0b7598165d98572b7e27b93071fd57909ac63f 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
@@ -128,7 +128,7 @@ public function providerSetCacheMaxAge() {
[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 76f33eb96ed3e5b32368da02b555933b46b5a66f..c792d1abad5cc3cff904a8f873a60e5d124f4efc 100644
--- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
+++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
@@ -72,7 +72,7 @@ public function tearDown() {
// Delete test site directory.
$this->fileUnmanagedDeleteRecursive($test_site_directory, [
BrowserTestBase::class,
- 'filePreDeleteCallback'
+ 'filePreDeleteCallback',
]);
}
}
@@ -113,7 +113,7 @@ public function testQuickStartCommand() {
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 @@ public function testQuickStartInstallAndServerCommands() {
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 00a5eb2ea62ac245eda9119b36bb66031d3ff2c8..b2ddd5e3652314224e319c4ca7bf5740d07b360c 100644
--- a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
+++ b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
@@ -38,7 +38,7 @@ public function providerTestAttributeData() {
'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 0d417ab494040439366c67e99ef2e5ce53257673..81d424b2ce14c8d0bd6fc2c941b61a8eccd8c0d5 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 @@ public function providerCalculateDependenciesWithPluginCollections() {
'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 7bcbc97cc998ac63667dda87d961a11459e04b6a..f689db48ab260e354b60bddf5e50f528252ccf1b 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 @@ public function testWithDependencies() {
'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 914d4f6fe53307b735eff76065aeb1c9bf298a7e..c5d4c1c4ea5ace744ce30e048d34f60825ff508b 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 @@ public function testConstructBadStorage() {
$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 f3c882cec05a0a4ba7d6d5ba06e09f324834d9c3..5558b26e8367dac1ba359e845c84893caa668f40 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 @@ public function providerTestGetKeys() {
$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 @@ public function providerTestGetKeys() {
$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 fc0d63bede3d2407a946381bff07a4510750970f..353e6d3c7b0797ed7781e05be519dcbcaad9ef27 100644
--- a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
@@ -63,7 +63,7 @@ protected function getConfigData() {
'uuid' => $uuid->generate(),
'dependencies' => [
'config' => [
- 'field.storage.node.body'
+ 'field.storage.node.body',
],
],
],
@@ -89,7 +89,7 @@ protected function getConfigData() {
],
// 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 227027b3933bdb79db7ce35aad81e1dbe6fd0669..8d0fccdd6bb0be031a7485d7145caed24b7302b3 100644
--- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
@@ -161,7 +161,7 @@ public function providerTestGetController() {
// 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 455cbcf799a836f6a56d550151f754eb10a72827..fde641bd400e122fbd4b361777f77e3a83562e82 100644
--- a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
@@ -51,7 +51,7 @@ public function providerTestWeekDaysOrdered() {
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 30a515c78b7665b4997e96332f0bd4baf0ca9e14..76ab32e331de3fb4e7dd6e2f251a6349b23b04a8 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 @@ public function testProcessNoPriorityAndExtraArguments() {
$container
->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments')
->addTag('service_collector', [
- 'call' => 'addNoPriority'
+ 'call' => 'addNoPriority',
]);
$container
@@ -376,7 +376,7 @@ public function testProcessWithIdAndExtraArguments() {
$container
->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments')
->addTag('service_collector', [
- 'call' => 'addWithId'
+ 'call' => 'addWithId',
]);
$container
@@ -408,7 +408,7 @@ public function testProcessWithDifferentArgumentsOrderAndDefaultValue() {
$container
->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments')
->addTag('service_collector', [
- 'call' => 'addWithDifferentOrder'
+ 'call' => 'addWithDifferentOrder',
]);
$container
@@ -416,7 +416,7 @@ public function testProcessWithDifferentArgumentsOrderAndDefaultValue() {
->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 4d198b9cb20b9bcfc33bd7a729283274ed1626b5..308c49c0faa36771cdda4947645704d833625a95 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 da041bda4e493596f23f8ed41042b090c4fb57f7..bc32d04ba6810678ea1655428fb13a4fcb48ba6f 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
@@ -116,7 +116,7 @@ public function providerTestTrustedHosts() {
'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 @@ public function providerTestTrustedHosts() {
'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 @@ public function providerTestTrustedHosts() {
'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 81069c35d3fd3056131578dff4d276b1d7b8cb52..eeba7e54c5d1c825ad10788fcd36097120ce5fa8 100644
--- a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
@@ -40,7 +40,7 @@ protected function setUp() {
$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 a7f7eb41aa7e2f7e6cb3865735f9576d4e190ee9..87b8a68fc1ccaf454afbce4913eea9f604865022 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
@@ -676,7 +676,7 @@ public function testGetFieldMap() {
'type' => 'string',
'bundles' => ['second_bundle' => 'second_bundle'],
],
- ]
+ ],
];
$this->assertEquals($expected, $this->entityFieldManager->getFieldMap());
}
@@ -695,7 +695,7 @@ public function testGetFieldMapFromCache() {
'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 5643b15ca3e6465308b1fa4f53cbc2c56c483176..a18e41076d10fbea3855cd926456c46a8232e212 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 @@ public function testGetSchemaBase() {
],
'domain' => [
'type' => 'varchar',
- ]
+ ],
],
'unique keys' => [
'email' => ['username', 'hostname', ['domain', 3]],
@@ -194,7 +194,7 @@ public function testGetSchemaBase() {
],
'city' => [
'type' => 'varchar',
- ]
+ ],
],
'indexes' => [
'country_state_city' => ['country', 'state', ['city', 10]],
@@ -397,7 +397,7 @@ public function testGetSchemaRevisionable() {
'id' => 'id',
'revision' => 'revision_id',
],
- ]
+ ],
])
->setMethods(['getRevisionMetadataKeys'])
->getMock();
@@ -429,7 +429,7 @@ public function testGetSchemaRevisionable() {
'revision_id' => [
'type' => 'int',
'not null' => FALSE,
- ]
+ ],
],
'primary key' => ['id'],
'unique keys' => [
@@ -440,7 +440,7 @@ public function testGetSchemaRevisionable() {
'entity_test__revision' => [
'table' => 'entity_test_revision',
'columns' => ['revision_id' => 'revision_id'],
- ]
+ ],
],
],
'entity_test_revision' => [
@@ -533,7 +533,7 @@ public function testGetSchemaTranslatable() {
'langcode' => [
'type' => 'varchar',
'not null' => TRUE,
- ]
+ ],
],
'primary key' => ['id'],
'unique keys' => [],
@@ -613,7 +613,7 @@ public function testGetSchemaRevisionableTranslatable() {
'revision' => 'revision_id',
'langcode' => 'langcode',
],
- ]
+ ],
])
->setMethods(['getRevisionMetadataKeys'])
->getMock();
@@ -670,7 +670,7 @@ public function testGetSchemaRevisionableTranslatable() {
'langcode' => [
'type' => 'varchar',
'not null' => TRUE,
- ]
+ ],
],
'primary key' => ['id'],
'unique keys' => [
@@ -853,7 +853,7 @@ public function testDedicatedTableSchema() {
'color' => [
'table' => 'color',
'columns' => [
- 'color' => 'id'
+ 'color' => 'id',
],
],
],
@@ -1020,7 +1020,7 @@ public function testDedicatedTableSchemaForEntityWithStringIdentifier() {
'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 964020cf5ca8a53c50d652c134eaf3e6b7ead4b4..3d7fb43aef190901f757b73d4aecfe0a741a2363 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 @@ public function testGetTableMappingRevisionableTranslatable(array $entity_keys)
$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 @@ protected function setUpModuleHandlerNoImplementations() {
->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 bfd5143849a82c87985913df5638582da7f38ee5..d2672b344bea4b7b7e2657ddd27ddfa8f0f3e631 100644
--- a/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php
@@ -83,7 +83,7 @@ public function providerTestSetConfiguration() {
'bar' => 'bar value',
'baz' => 'baz value',
],
- ]
+ ],
],
],
[
@@ -96,7 +96,7 @@ public function providerTestSetConfiguration() {
'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 8f339a839dcdfa283050249f7fc05c69c2536053..2fadea64268b5388897adea33086941af33fb267 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
@@ -43,11 +43,11 @@ public function providerTestOn4xx() {
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 49b9fbd28998bdf2e130fae14396f389c9220576..d8290fe4753ae48965fbf4d9dcda242276a082af 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
@@ -116,7 +116,7 @@ public function testOnResponse($content, $expected_content) {
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 3b9d09a12a8a48bf850762b1da5bbee13cc49958..993bf759ffba5e0aa56e480e45275d0388812829 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
@@ -111,7 +111,7 @@ public function testGetAllAvailableInfo() {
'core' => '8.x',
'name' => 'test name',
'mtime' => 123456789,
- ]
+ ],
], $infos);
}
@@ -129,7 +129,7 @@ public function testGetAllInstalledInfo() {
'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 4fda0022b7d59a652a76ebb9de0295d3024c39ec..820c6bd47cccd7dd0a7846578a80063131be2feb 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
@@ -52,7 +52,7 @@ protected function getModuleHandler() {
'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 @@ public function testModuleReloading() {
'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 @@ public function testSetModuleList() {
$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 @@ public function testAddModule() {
$module_handler = $this->getMockBuilder(ModuleHandler::class)
->setConstructorArgs([
- $this->root, [], $this->cacheBackend
+ $this->root, [], $this->cacheBackend,
])
->setMethods(['resetImplementations'])
->getMock();
@@ -227,7 +227,7 @@ public function testAddProfile() {
$module_handler = $this->getMockBuilder(ModuleHandler::class)
->setConstructorArgs([
- $this->root, [], $this->cacheBackend
+ $this->root, [], $this->cacheBackend,
])
->setMethods(['resetImplementations'])
->getMock();
@@ -264,8 +264,8 @@ public function testLoadAllIncludes() {
'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 @@ public function testCachedGetImplementations() {
'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 @@ public function testCachedGetImplementationsMissingMethod() {
'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 645daf43d24540b87b0c7718340c8527f4aeee89..f0f9f3bec071f64d50b055fd4e3e1a4491ca4297 100644
--- a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
+++ b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
@@ -119,7 +119,7 @@ public function providerTestBasename() {
$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 14e03cb565cb93aff0e384351fd5c1f02f89212f..4d95e0b0bcca51054226da9f7579bbd2bb0317db 100644
--- a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
@@ -19,7 +19,7 @@ public function testConfig() {
// 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 177504c13ad64f3c32c4e0beca16bd1727629f4a..d9537c3fdbdb5b6f8eb43532a4b898eafcd8caa3 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
@@ -86,7 +86,7 @@ public function testBuildResponseRenderArray() {
'#ajax' => [
'callback' => function (array $form, FormStateInterface $form_state) {
return $form['test'];
- }
+ },
],
];
$request = new Request();
@@ -117,7 +117,7 @@ public function testBuildResponseResponse() {
'#ajax' => [
'callback' => function (array $form, FormStateInterface $form_state) {
return new AjaxResponse([]);
- }
+ },
],
];
$request = new Request();
@@ -142,7 +142,7 @@ public function testBuildResponseWithCommands() {
'#ajax' => [
'callback' => function (array $form, FormStateInterface $form_state) {
return new AjaxResponse([]);
- }
+ },
],
];
$request = new Request();
@@ -175,7 +175,7 @@ public function testBuildResponseWithUpdateCommand() {
'#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 f089bc37678cda35d669a12480a09adcca901e16..473308f64b346d3d544883f2e1f87d635380c9e7 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
@@ -331,7 +331,7 @@ public function testLoadCachedFormStateWithFiles() {
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 ae42e511a27aa17166a6b616c00b2a442e6d6710..7335603686eaf2ead1dc14e0b3680a55e4d25220 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
@@ -1254,7 +1254,7 @@ public function testGetResponse() {
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 cc5514a76be4cc2ab5b2ad6b62540c67445f95d7..ea431bf3aa843b3dc0dd99ff8fad8aac4cf5a057 100644
--- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
@@ -85,7 +85,7 @@ protected function setupLocalTaskDefault() {
*/
public function testGetRouteParametersForStaticRoute() {
$this->pluginDefinition = [
- 'route_name' => 'test_route'
+ 'route_name' => 'test_route',
];
$this->routeProvider->expects($this->once())
@@ -105,7 +105,7 @@ public function testGetRouteParametersForStaticRoute() {
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 @@ public function testGetRouteParametersInPluginDefinitions() {
*/
public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters() {
$this->pluginDefinition = [
- 'route_name' => 'test_route'
+ 'route_name' => 'test_route',
];
$route = new Route('/test-route/{parameter}');
@@ -147,7 +147,7 @@ public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters()
*/
public function testGetRouteParametersForDynamicRouteWithUpcastedParameters() {
$this->pluginDefinition = [
- 'route_name' => 'test_route'
+ 'route_name' => 'test_route',
];
$route = new Route('/test-route/{parameter}');
@@ -177,17 +177,17 @@ public function providerTestGetWeight() {
[
'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 @@ public function testGetOptions() {
'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 0295e408c7a01deece65788d498cf95c8150da07..0bb828b2ff1e6f34d8fda8e8d622031d2d42a16c 100644
--- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
@@ -46,7 +46,7 @@ public function testExtractFormValues() {
'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 98a122ca214b8369ad52f1118e20f6d504e54f4f..b287f12eb3aa3052ff10ee9e0f2df77f9461dc28 100644
--- a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
@@ -111,14 +111,14 @@ public function testSaveOverride() {
$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 6d60e1d4e77244314890d30d38d5ae3f2c159d29..b7549ce47ace46a093da60db3585b582fcbfcbfd 100644
--- a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
@@ -80,7 +80,7 @@ public function providerTestAddConverter() {
$converters[0]['sorted'] = [
'strawberry', 'raspberry', 'pear', 'peach',
- 'pineapple', 'banana', 'apple'
+ 'pineapple', 'banana', 'apple',
];
$converters[1]['unsorted'] = [
@@ -95,7 +95,7 @@ public function providerTestAddConverter() {
$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 e6215caac834e310a794ea5bc605447c60244aaf..0aa2de7b64bc2842a719655e9ba26f5fb9225444 100644
--- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
+++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
@@ -49,8 +49,8 @@ protected function setUp() {
$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 @@ public function testProcessInbound() {
$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 040b1f988e1a126ef6aeec919b2cc257cd157ef8..092525c75d555a057d731f33641dcf9120220789 100644
--- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
@@ -675,17 +675,17 @@ public function providerTestAddCacheableDependency() {
'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 db463d8b40e7867381b13a59540ade6eb44e1141..06f11d3b9468fe30fcd7f1c0b3a51454d91a2726 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 @@ public function testProcessMachineName() {
'maxlength' => 32,
'additional_property' => TRUE,
'#additional_property_with_hash' => TRUE,
- ]
+ ],
];
$complete_form = [
@@ -67,7 +67,7 @@ public function testProcessMachineName() {
'#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 ead47e471e969d3362d7d3e3201d60d3ba6a33e4..f095ae57368e37399951cdec6b442e0985eaa0d3 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 @@ public function testProcessTableselectWithLinkTitle() {
$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 d168f741e5c7f4ab1151c6433e103fd11c279085..818244832485734441c39c3f8960ab8042df6e23 100644
--- a/core/tests/Drupal/Tests/Core/Render/ElementTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/ElementTest.php
@@ -28,7 +28,7 @@ public function testProperties() {
$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 f55e34832e088ec1e922b3f2289ae7843404b6cc..6ad2acbe0da35dff68fb8ad1de5e91c7dd6f4815 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
@@ -297,7 +297,7 @@ public function providerTestContextBubblingEdgeCases() {
$test_element = [
'#cache' => [
'keys' => ['parent'],
- 'tags' => ['yar', 'har']
+ 'tags' => ['yar', 'har'],
],
'#markup' => 'parent',
'child' => [
@@ -308,10 +308,10 @@ public function providerTestContextBubblingEdgeCases() {
'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 8cfa0fda7c8a9ee7c92260d4942c51b9efa95c7d..0d38afd10612bf014ecabe896e988026a105ee83 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
@@ -1125,7 +1125,7 @@ protected function setupThemeManagerForDetails() {
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 76f9d48b27960c68da9c30108a9ce435ae3dba45..7e4b83345eb9a83283acdcfc368019d3fbc22ed7 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
@@ -46,10 +46,10 @@ public function testRenderRecursionWithNestedRenderRoot() {
$page = [
'content' => [
'#pre_render' => [
- $callable
+ $callable,
],
'#suffix' => $parent_markup,
- ]
+ ],
];
$renderer->renderRoot($page);
}
@@ -78,10 +78,10 @@ public function testRenderRecursionWithNestedRender() {
'content' => [
'complex_child' => $complex_child_template,
'#post_render' => [
- $callable
+ $callable,
],
'#suffix' => $parent_markup,
- ]
+ ],
];
$output = $renderer->renderRoot($page);
@@ -114,10 +114,10 @@ public function testRenderRecursionWithNestedRenderPlain() {
$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 eda1f9fc6057035f6894771106c667e1745a1351..adfc890cb08a21e0e229c3c55c81fd99a5179730 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
@@ -180,7 +180,7 @@ public function providerTestRenderBasic() {
'#pre_render' => [function ($elements) {
$elements['#markup'] .= '';
return $elements;
- }
+ },
],
],
'fooalert("bar");',
@@ -193,7 +193,7 @@ public function providerTestRenderBasic() {
'#pre_render' => [function ($elements) {
$elements['#markup'] .= '';
return $elements;
- }
+ },
],
],
'foo',
@@ -206,7 +206,7 @@ public function providerTestRenderBasic() {
'#pre_render' => [function ($elements) {
$elements['#plain_text'] .= '';
return $elements;
- }
+ },
],
],
'foo<script>alert("bar");</script>',
@@ -508,7 +508,7 @@ public function testRenderWithAccessCallbackCallable($access) {
$build = [
'#access_callback' => function () use ($access) {
return $access;
- }
+ },
];
$this->assertAccess($build, $access);
@@ -527,7 +527,7 @@ public function testRenderWithAccessPropertyAndCallback($access) {
'#access' => $access,
'#access_callback' => function () {
return TRUE;
- }
+ },
];
$this->assertAccess($build, $access);
@@ -613,7 +613,7 @@ public function providerRenderTwice() {
[
'#markup' => 'kittens',
'#cache' => [
- 'tags' => ['kittens-147']
+ 'tags' => ['kittens-147'],
],
],
],
@@ -961,7 +961,7 @@ public function providerTestAddCacheableDependency() {
'contexts' => ['theme'],
'tags' => ['bar'],
'max-age' => 600,
- ]
+ ],
],
new TestCacheableDependency(['user.roles'], ['foo'], Cache::PERMANENT),
[
@@ -979,7 +979,7 @@ public function providerTestAddCacheableDependency() {
'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 38278ab0811040d1aad37cea6bff88037ed3279c..5ff38fa46b6ba897da8b4f3251cea04e912c8149 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php
@@ -60,7 +60,7 @@ public function staticSampleRouteCollection() {
'path' => '/path/two',
'methods' => ['GET'],
'requirements' => [
- '_format' => 'json'
+ '_format' => 'json',
],
];
$routes['route_d'] = [
@@ -70,7 +70,7 @@ public function staticSampleRouteCollection() {
'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 a872e305d4177ed9f2a02e3e64cc68383924b946..f98a8a9c545b8e2c2ec0a16db0e29fa55bd74f54 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
@@ -114,12 +114,12 @@ public function providerTestEscaping() {
['{{ 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 7084278b804bf86d26425de1cb8f3a618c39d30d..8a6fdc83193caab670f157140cda485526a006ab 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
@@ -38,7 +38,7 @@ public function testConstructor($db_prefix, $expected_db_prefix, $expected_site_
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 ede32ebf30eacb8848b70293971f53149e64bfe4..853a788f5feec316008868f78995556938b0c98d 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
@@ -40,8 +40,8 @@ protected function getFilesystem() {
'Listener.php' => ' [
'Listener.php' => 'addConstraint('Callback', [
'callback' => function ($value, ExecutionContextInterface $context) {
$context->addViolation('test violation: ' . $value);
- }
+ },
])
);
$typed_data->setValue('foo');
@@ -147,7 +147,7 @@ public function testBasicValidateWithMultipleConstraints() {
$options = [
'callback' => function ($value, ExecutionContextInterface $context) {
$context->addViolation('test violation');
- }
+ },
];
$typed_data = $this->typedDataManager->create(
DataDefinition::create('string')
@@ -320,7 +320,7 @@ protected function buildExampleTypedDataWithProperties($subkey_value = NULL) {
'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 2462148ebe0875d6ab158a901cf7d2c3eff33883..4ebecb6097ac822ffb5ed91f00ee53908aea2f96 100644
--- a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
+++ b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
@@ -79,14 +79,14 @@ function module_b_post_update_a() {
'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 @@ public function testGetPendingUpdateFunctionsNoExistingUpdates() {
$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 @@ public function testGetPendingUpdateFunctionsExistingUpdates() {
$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 @@ public function testGetPendingUpdateInformation() {
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$expected = [];
@@ -197,7 +197,7 @@ public function testGetPendingUpdateInformationWithExistingUpdates() {
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
- 'module_b'
+ 'module_b',
], $key_value, FALSE);
$expected = [];
@@ -218,7 +218,7 @@ public function testGetModuleUpdateFunctions() {
$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 @@ public function testRegisterInvokedUpdatesWithoutExistingUpdates() {
$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 @@ public function testRegisterInvokedUpdatesWithMultiple() {
$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 @@ public function testRegisterInvokedUpdatesWithExistingUpdates() {
$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 @@ public function testFilterOutInvokedUpdatesByModule() {
$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 91620e61559874d240a96cb61d96184d5a006ad2..5f8474a0dc95cae225e2659ab7ea7a47a809e30b 100644
--- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@@ -94,7 +94,7 @@ protected function setUp() {
$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 @@ public function testReplaceWithBubbleableMetadataObject() {
$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 @@ public function testReplaceWithHookTokensWithBubbleableMetadata() {
$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 @@ public function testReplaceWithHookTokensAlterWithBubbleableMetadata() {
$this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags());
$this->assertEquals([
'current_user',
- 'custom_context'
+ 'custom_context',
], $bubbleable_metadata->getCacheContexts());
$this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge());
}