diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
index 2b74d30046e67eafc9a19ecbbac5e964a0532b6d..8a4f7ab8753bc6154ec09c0ff5d41027f077bfcb 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
@@ -197,11 +197,8 @@ public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) {
     $this->clickLink('Update items');
 
     // Ensure we have the right number of items.
-    $iids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute();
-    $feed->items = [];
-    foreach ($iids as $iid) {
-      $feed->items[] = $iid;
-    }
+    $item_ids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute();
+    $feed->items = array_values($item_ids);
 
     if ($expected_count !== NULL) {
       $feed->item_count = count($feed->items);
diff --git a/core/modules/aggregator/tests/src/Functional/FeedParserTest.php b/core/modules/aggregator/tests/src/Functional/FeedParserTest.php
index 4e76ad76c044709fbd441ffb3e44b9198a0d14db..bc3ed26c67b413260937792a889e6db3611413ba 100644
--- a/core/modules/aggregator/tests/src/Functional/FeedParserTest.php
+++ b/core/modules/aggregator/tests/src/Functional/FeedParserTest.php
@@ -64,16 +64,16 @@ public function testAtomSample() {
     $this->assertText('Atom-Powered Robots Run Amok');
     $this->assertLinkByHref('http://example.org/2003/12/13/atom03');
     $this->assertText('Some text.');
-    $iids = \Drupal::entityQuery('aggregator_item')->condition('link', 'http://example.org/2003/12/13/atom03')->execute();
-    $item = Item::load(array_values($iids)[0]);
+    $item_ids = \Drupal::entityQuery('aggregator_item')->condition('link', 'http://example.org/2003/12/13/atom03')->execute();
+    $item = Item::load(array_values($item_ids)[0]);
     $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.');
 
     // Check for second feed entry.
     $this->assertText('We tried to stop them, but we failed.');
     $this->assertLinkByHref('http://example.org/2003/12/14/atom03');
     $this->assertText('Some other text.');
-    $iids = \Drupal::entityQuery('aggregator_item')->condition('link', 'http://example.org/2003/12/14/atom03')->execute();
-    $item = Item::load(array_values($iids)[0]);
+    $item_ids = \Drupal::entityQuery('aggregator_item')->condition('link', 'http://example.org/2003/12/14/atom03')->execute();
+    $item = Item::load(array_values($item_ids)[0]);
     $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.');
   }
 
diff --git a/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
index fdbcc04eabd4d6ca8abd4d2d8bebf4b4314d7165..4c5a3d3ab3cbaeeb070d732ed28270761648f3ff 100644
--- a/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
+++ b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
@@ -54,8 +54,8 @@ public function testUpdateFeedItem() {
     $feed = Feed::load(array_values($fids)[0]);
 
     $feed->refreshItems();
-    $iids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute();
-    $before = Item::load(array_values($iids)[0])->getPostedTime();
+    $item_ids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute();
+    $before = Item::load(array_values($item_ids)[0])->getPostedTime();
 
     // Sleep for 3 second.
     sleep(3);
@@ -67,7 +67,7 @@ public function testUpdateFeedItem() {
       ->save();
     $feed->refreshItems();
 
-    $after = Item::load(array_values($iids)[0])->getPostedTime();
+    $after = Item::load(array_values($item_ids)[0])->getPostedTime();
     $this->assertTrue($before === $after, new FormattableMarkup('Publish timestamp of feed item was not updated (@before === @after)', ['@before' => $before, '@after' => $after]));
 
     // Make sure updating items works even after uninstalling a module
diff --git a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
index 782715e9a3ec6e0d125ef3e9c9f20ded443a0d70..91e49b28c1eb7823b9a25102820ea842bb6eaf95 100644
--- a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
+++ b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
@@ -241,9 +241,9 @@ public function providerTestBuildCacheability() {
         ];
 
         // Multi-level tree.
-        $multi_level_root_a = MenuLinkMock::create(['id' => 'test.roota', 'route_name' => 'roota', 'title' => 'Root A']);
-        $multi_level_root_b = MenuLinkMock::create(['id' => 'test.rootb', 'route_name' => 'rootb', 'title' => 'Root B']);
-        $multi_level_parent_c = MenuLinkMock::create(['id' => 'test.parentc', 'route_name' => 'parentc', 'title' => 'Parent C']);
+        $multi_level_root_a = MenuLinkMock::create(['id' => 'test.root_a', 'route_name' => 'root_a', 'title' => 'Root A']);
+        $multi_level_root_b = MenuLinkMock::create(['id' => 'test.root_b', 'route_name' => 'root_b', 'title' => 'Root B']);
+        $multi_level_parent_c = MenuLinkMock::create(['id' => 'test.parent_c', 'route_name' => 'parent_c', 'title' => 'Parent C']);
         $tree = [
           new MenuLinkTreeElement($multi_level_root_a, TRUE, 0, FALSE, [
             new MenuLinkTreeElement($multi_level_parent_c, TRUE, 0, FALSE, [
@@ -256,13 +256,13 @@ public function providerTestBuildCacheability() {
         ];
         $tree[0]->subtree[0]->subtree[0]->access = $access;
         $expected_build = $base_expected_build;
-        $expected_build['#items']['test.roota'] = $get_built_element($tree[0]);
-        $expected_build['#items']['test.roota']['below']['test.parentc'] = $get_built_element($tree[0]->subtree[0]);
+        $expected_build['#items']['test.root_a'] = $get_built_element($tree[0]);
+        $expected_build['#items']['test.root_a']['below']['test.parent_c'] = $get_built_element($tree[0]->subtree[0]);
         if ($access === NULL || $access->isAllowed()) {
-          $expected_build['#items']['test.roota']['below']['test.parentc']['below']['test.example1'] = $get_built_element($tree[0]->subtree[0]->subtree[0]);
+          $expected_build['#items']['test.root_a']['below']['test.parent_c']['below']['test.example1'] = $get_built_element($tree[0]->subtree[0]->subtree[0]);
         }
-        $expected_build['#items']['test.rootb'] = $get_built_element($tree[1]);
-        $expected_build['#items']['test.rootb']['below']['test.example2'] = $get_built_element($tree[1]->subtree[0]);
+        $expected_build['#items']['test.root_b'] = $get_built_element($tree[1]);
+        $expected_build['#items']['test.root_b']['below']['test.example2'] = $get_built_element($tree[1]->subtree[0]);
         $expected_build['#cache']['contexts'] = array_merge($expected_build['#cache']['contexts'], $access_cache_contexts, $links[0]->getCacheContexts(), $links[1]->getCacheContexts());
         $data[] = [
           'description' => "Multi-level tree; access=$i; link=$j.",
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
index 5a6fa195a9e4f0963aae1a2ad28f1bceb4630631..29ba1d6772f4083cbb4c38e3c0053acc2ec954d2 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
@@ -343,16 +343,16 @@ public function testSorting() {
       ->getTypePlugin()
       ->setConfiguration([
         'states' => [
-          'twoa' => [
-            'label' => 'twoa',
+          'two_a' => [
+            'label' => 'two a',
             'weight' => 2,
           ],
           'three' => [
             'label' => 'three',
             'weight' => 3,
           ],
-          'twob' => [
-            'label' => 'twob',
+          'two_b' => [
+            'label' => 'two b',
             'weight' => 2,
           ],
           'one' => [
@@ -367,10 +367,10 @@ public function testSorting() {
             'to' => 'three',
             'weight' => 3,
           ],
-          'twoa' => [
-            'label' => 'twoa',
-            'from' => ['twoa'],
-            'to' => 'twoa',
+          'two_a' => [
+            'label' => 'two a',
+            'from' => ['two_a'],
+            'to' => 'two_a',
             'weight' => 2,
           ],
           'one' => [
@@ -379,10 +379,10 @@ public function testSorting() {
             'to' => 'one',
             'weight' => 1,
           ],
-          'twob' => [
-            'label' => 'twob',
-            'from' => ['twob'],
-            'to' => 'twob',
+          'two_b' => [
+            'label' => 'two b',
+            'from' => ['two_b'],
+            'to' => 'two_b',
             'weight' => 2,
           ],
         ],
@@ -391,12 +391,12 @@ public function testSorting() {
 
     $this->drupalLogin($this->createUser(['administer workflows']));
     $this->drupalGet('admin/config/workflow/workflows/manage/test');
-    $expected_states = ['one', 'twoa', 'twob', 'three'];
+    $expected_states = ['one', 'two a', 'two b', 'three'];
     $elements = $this->xpath('//details[@id="edit-states-container"]//table/tbody/tr');
     foreach ($elements as $key => $element) {
       $this->assertEquals($expected_states[$key], $element->find('xpath', 'td')->getText());
     }
-    $expected_transitions = ['one', 'twoa', 'twob', 'three'];
+    $expected_transitions = ['one', 'two a', 'two b', 'three'];
     $elements = $this->xpath('//details[@id="edit-transitions-container"]//table/tbody/tr');
     foreach ($elements as $key => $element) {
       $this->assertEquals($expected_transitions[$key], $element->find('xpath', 'td')->getText());