diff --git a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
index bd87724cf2..934a6894b9 100644
--- a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
+++ b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
@@ -32,7 +32,7 @@ protected function setUp() {
    */
   public function testActionSettings() {
     $config = $this->config('action.settings');
-    $this->assertIdentical(35, $config->get('recursion_limit'));
+    $this->assertSame(35, $config->get('recursion_limit'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'action.settings', $config->get());
   }
 
diff --git a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
index 1737715f8a..fff91bb4c9 100644
--- a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
+++ b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
@@ -63,10 +63,10 @@ protected function assertEntity($id, $label, $type, $configuration) {
 
     $this->assertTrue($action instanceof Action);
     /** @var \Drupal\system\Entity\Action $action */
-    $this->assertIdentical($id, $action->id());
-    $this->assertIdentical($label, $action->label());
-    $this->assertIdentical($type, $action->getType());
-    $this->assertIdentical($configuration, $action->get('configuration'));
+    $this->assertSame($id, $action->id());
+    $this->assertSame($label, $action->label());
+    $this->assertSame($type, $action->getType());
+    $this->assertSame($configuration, $action->get('configuration'));
   }
 
 }
diff --git a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
index 1601449d67..30de0c3d4f 100644
--- a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
+++ b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
@@ -63,10 +63,10 @@ protected function assertEntity($id, $label, $type, $configuration) {
 
     $this->assertTrue($action instanceof Action);
     /** @var \Drupal\system\Entity\Action $action */
-    $this->assertIdentical($id, $action->id());
-    $this->assertIdentical($label, $action->label());
-    $this->assertIdentical($type, $action->getType());
-    $this->assertIdentical($configuration, $action->get('configuration'));
+    $this->assertSame($id, $action->id());
+    $this->assertSame($label, $action->label());
+    $this->assertSame($type, $action->getType());
+    $this->assertSame($configuration, $action->get('configuration'));
   }
 
 }
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php
index 6d96aa1de1..7cedbc909c 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php
@@ -46,7 +46,7 @@ public function testItemStub() {
       $this->fail('Expected exception has not been thrown.');
     }
     catch (MigrateException $e) {
-      $this->assertIdentical($e->getMessage(),
+      $this->assertSame($e->getMessage(),
         'Stubbing failed, unable to generate value for field fid');
     }
 
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php
index 280a103db8..79c250b963 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php
@@ -32,13 +32,13 @@ protected function setUp() {
    */
   public function testAggregatorSettings() {
     $config = $this->config('aggregator.settings');
-    $this->assertIdentical('aggregator', $config->get('fetcher'));
-    $this->assertIdentical('aggregator', $config->get('parser'));
-    $this->assertIdentical(['aggregator'], $config->get('processors'));
-    $this->assertIdentical(600, $config->get('items.teaser_length'));
-    $this->assertIdentical('<a> <b> <br /> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>', $config->get('items.allowed_html'));
-    $this->assertIdentical(9676800, $config->get('items.expire'));
-    $this->assertIdentical(3, $config->get('source.list_max'));
+    $this->assertSame('aggregator', $config->get('fetcher'));
+    $this->assertSame('aggregator', $config->get('parser'));
+    $this->assertSame(['aggregator'], $config->get('processors'));
+    $this->assertSame(600, $config->get('items.teaser_length'));
+    $this->assertSame('<a> <b> <br /> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>', $config->get('items.allowed_html'));
+    $this->assertSame(9676800, $config->get('items.expire'));
+    $this->assertSame(3, $config->get('source.list_max'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'aggregator.settings', $config->get());
   }
 
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php
index 9dac60faa8..36c5600418 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php
@@ -32,17 +32,17 @@ protected function setUp() {
   public function testAggregatorFeedImport() {
     /** @var \Drupal\aggregator\Entity\Feed $feed */
     $feed = Feed::load(5);
-    $this->assertIdentical('Know Your Meme', $feed->title->value);
-    $this->assertIdentical('en', $feed->language()->getId());
-    $this->assertIdentical('http://knowyourmeme.com/newsfeed.rss', $feed->url->value);
-    $this->assertIdentical('900', $feed->refresh->value);
-    $this->assertIdentical('1387659487', $feed->checked->value);
-    $this->assertIdentical('0', $feed->queued->value);
-    $this->assertIdentical('http://knowyourmeme.com', $feed->link->value);
-    $this->assertIdentical('New items added to the News Feed', $feed->description->value);
-    $this->assertIdentical('http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png', $feed->image->value);
-    $this->assertIdentical('"213cc1365b96c310e92053c5551f0504"', $feed->etag->value);
-    $this->assertIdentical('0', $feed->modified->value);
+    $this->assertSame('Know Your Meme', $feed->title->value);
+    $this->assertSame('en', $feed->language()->getId());
+    $this->assertSame('http://knowyourmeme.com/newsfeed.rss', $feed->url->value);
+    $this->assertSame('900', $feed->refresh->value);
+    $this->assertSame('1387659487', $feed->checked->value);
+    $this->assertSame('0', $feed->queued->value);
+    $this->assertSame('http://knowyourmeme.com', $feed->link->value);
+    $this->assertSame('New items added to the News Feed', $feed->description->value);
+    $this->assertSame('http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png', $feed->image->value);
+    $this->assertSame('"213cc1365b96c310e92053c5551f0504"', $feed->etag->value);
+    $this->assertSame('0', $feed->modified->value);
   }
 
 }
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php
index 5343d1e2de..b81cdd6a22 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php
@@ -33,15 +33,15 @@ protected function setUp() {
   public function testAggregatorItem() {
     /** @var \Drupal\aggregator\Entity\Item $item */
     $item = Item::load(1);
-    $this->assertIdentical('1', $item->id());
-    $this->assertIdentical('5', $item->getFeedId());
-    $this->assertIdentical('This (three) weeks in Drupal Core - January 10th 2014', $item->label());
-    $this->assertIdentical('larowlan', $item->getAuthor());
-    $this->assertIdentical("<h2 id='new'>What's new with Drupal 8?</h2>", $item->getDescription());
-    $this->assertIdentical('https://groups.drupal.org/node/395218', $item->getLink());
-    $this->assertIdentical('1389297196', $item->getPostedTime());
-    $this->assertIdentical('en', $item->language()->getId());
-    $this->assertIdentical('395218 at https://groups.drupal.org', $item->getGuid());
+    $this->assertSame('1', $item->id());
+    $this->assertSame('5', $item->getFeedId());
+    $this->assertSame('This (three) weeks in Drupal Core - January 10th 2014', $item->label());
+    $this->assertSame('larowlan', $item->getAuthor());
+    $this->assertSame("<h2 id='new'>What's new with Drupal 8?</h2>", $item->getDescription());
+    $this->assertSame('https://groups.drupal.org/node/395218', $item->getLink());
+    $this->assertSame('1389297196', $item->getPostedTime());
+    $this->assertSame('en', $item->language()->getId());
+    $this->assertSame('395218 at https://groups.drupal.org', $item->getGuid());
 
   }
 
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
index fd208238c7..c00bf86a49 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
@@ -32,23 +32,23 @@ protected function setUp() {
   public function testAggregatorFeedImport() {
     /** @var \Drupal\aggregator\FeedInterface $feed */
     $feed = Feed::load(1);
-    $this->assertIdentical('Know Your Meme', $feed->label());
-    $this->assertIdentical('en', $feed->language()->getId());
-    $this->assertIdentical('http://knowyourmeme.com/newsfeed.rss', $feed->getUrl());
-    $this->assertIdentical('900', $feed->getRefreshRate());
+    $this->assertSame('Know Your Meme', $feed->label());
+    $this->assertSame('en', $feed->language()->getId());
+    $this->assertSame('http://knowyourmeme.com/newsfeed.rss', $feed->getUrl());
+    $this->assertSame('900', $feed->getRefreshRate());
     // The feed's last checked time can change as the fixture is updated, so
     // assert that its format is correct.
     $checked_time = $feed->getLastCheckedTime();
     $this->assertTrue(is_numeric($checked_time));
     $this->assertTrue($checked_time > 1000000000);
-    $this->assertIdentical('0', $feed->getQueuedTime());
-    $this->assertIdentical('http://knowyourmeme.com', $feed->link->value);
-    $this->assertIdentical('New items added to the News Feed', $feed->getDescription());
+    $this->assertSame('0', $feed->getQueuedTime());
+    $this->assertSame('http://knowyourmeme.com', $feed->link->value);
+    $this->assertSame('New items added to the News Feed', $feed->getDescription());
     $this->assertNull($feed->getImage());
     // As with getLastCheckedTime(), the etag can change as the fixture is
     // updated normally, so assert that its format is correct.
     $this->assertTrue(preg_match('/^"[a-z0-9]{32}"$/', $feed->getEtag()));
-    $this->assertIdentical('0', $feed->getLastModified());
+    $this->assertSame('0', $feed->getLastModified());
   }
 
 }
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php
index 83e59d9707..84e42a160a 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php
@@ -42,16 +42,16 @@ public function testAggregatorItem() {
     foreach ($items as $original) {
       /** @var \Drupal\aggregator\ItemInterface $item */
       $item = Item::load($original->iid);
-      $this->assertIdentical($original->fid, $item->getFeedId());
-      $this->assertIdentical($original->title, $item->label());
+      $this->assertSame($original->fid, $item->getFeedId());
+      $this->assertSame($original->title, $item->label());
       // If $original->author is an empty string, getAuthor() returns NULL so
       // we need to use assertEqual() here.
       $this->assertEqual($original->author, $item->getAuthor());
-      $this->assertIdentical($original->description, $item->getDescription());
-      $this->assertIdentical($original->link, $item->getLink());
-      $this->assertIdentical($original->timestamp, $item->getPostedTime());
-      $this->assertIdentical('en', $item->language()->getId());
-      $this->assertIdentical($original->guid, $item->getGuid());
+      $this->assertSame($original->description, $item->getDescription());
+      $this->assertSame($original->link, $item->getLink());
+      $this->assertSame($original->timestamp, $item->getPostedTime());
+      $this->assertSame('en', $item->language()->getId());
+      $this->assertSame($original->guid, $item->getGuid());
     }
   }
 
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php
index 0fa8f63597..9368267f02 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php
@@ -27,13 +27,13 @@ protected function setUp() {
    */
   public function testMigration() {
     $config = \Drupal::config('aggregator.settings')->get();
-    $this->assertIdentical('aggregator', $config['fetcher']);
-    $this->assertIdentical('aggregator', $config['parser']);
-    $this->assertIdentical(['aggregator'], $config['processors']);
-    $this->assertIdentical('<p> <div> <a>', $config['items']['allowed_html']);
-    $this->assertIdentical(500, $config['items']['teaser_length']);
-    $this->assertIdentical(86400, $config['items']['expire']);
-    $this->assertIdentical(6, $config['source']['list_max']);
+    $this->assertSame('aggregator', $config['fetcher']);
+    $this->assertSame('aggregator', $config['parser']);
+    $this->assertSame(['aggregator'], $config['processors']);
+    $this->assertSame('<p> <div> <a>', $config['items']['allowed_html']);
+    $this->assertSame(500, $config['items']['teaser_length']);
+    $this->assertSame(86400, $config['items']['expire']);
+    $this->assertSame(6, $config['source']['list_max']);
   }
 
 }
diff --git a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
index 39f57b2518..d6699dbdda 100644
--- a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
@@ -106,7 +106,7 @@ public function testAggregatorItemView() {
       'description' => 'description',
       'aggregator_item_author' => 'author',
     ];
-    $this->assertIdenticalResultset($view, $expected, $column_map);
+    $this->assertSameResultset($view, $expected, $column_map);
 
     // Ensure that the rendering of the linked title works as expected.
     foreach ($view->result as $row) {
diff --git a/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php b/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
index b197a7631a..6264989948 100644
--- a/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
+++ b/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
@@ -41,7 +41,7 @@ public function testBasicAuth() {
     $this->assertResponse('200', 'HTTP response is OK');
     $this->mink->resetSessions();
     $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'));
-    $this->assertIdentical(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'Cache-Control is not set to public');
+    $this->assertSame(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'Cache-Control is not set to public');
 
     $this->basicAuthGet($url, $account->getUsername(), $this->randomMachineName());
     $this->assertNoText($account->getUsername(), 'Bad basic auth credentials do not authenticate the user.');
@@ -69,7 +69,7 @@ public function testBasicAuth() {
     $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS');
     $this->basicAuthGet($url, $account->getUsername(), $account->pass_raw);
     $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'));
-    $this->assertIdentical(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'No page cache response when requesting a cached page with basic auth credentials.');
+    $this->assertSame(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'No page cache response when requesting a cached page with basic auth credentials.');
   }
 
   /**
diff --git a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
index 716cf73fae..6fcfa7a07b 100644
--- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
+++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
@@ -468,7 +468,7 @@ protected function assertBigPipeNoJsMetaRefreshRedirect() {
 
     // First response: redirect.
     $this->assertEqual(302, $statuses[0], 'The first response was a 302 (redirect).');
-    $this->assertIdentical(0, strpos($headers[0]['Set-Cookie'][0], 'big_pipe_nojs=1'), 'The first response sets the big_pipe_nojs cookie.');
+    $this->assertSame(0, strpos($headers[0]['Set-Cookie'][0], 'big_pipe_nojs=1'), 'The first response sets the big_pipe_nojs cookie.');
     $this->assertEqual($original_url, $headers[0]['Location'][0], 'The first response redirected back to the original page.');
     $this->assertTrue(empty(array_diff(['cookies:big_pipe_nojs', 'session.exists'], explode(' ', $headers[0]['X-Drupal-Cache-Contexts'][0]))), 'The first response varies by the "cookies:big_pipe_nojs" and "session.exists" cache contexts.');
     $this->assertFalse(isset($headers[0]['Surrogate-Control']), 'The first response has no "Surrogate-Control" header.');
diff --git a/core/modules/block/tests/src/Functional/BlockTest.php b/core/modules/block/tests/src/Functional/BlockTest.php
index 300205247c..4afa3c0701 100644
--- a/core/modules/block/tests/src/Functional/BlockTest.php
+++ b/core/modules/block/tests/src/Functional/BlockTest.php
@@ -92,8 +92,8 @@ public function testBlockToggleVisibility() {
     /** @var \Drupal\block\BlockInterface $block */
     $block = Block::load($block_id);
     $visibility_config = $block->getVisibilityConditions()->getConfiguration();
-    $this->assertIdentical([], $visibility_config);
-    $this->assertIdentical([], $block->get('visibility'));
+    $this->assertSame([], $visibility_config);
+    $this->assertSame([], $block->get('visibility'));
   }
 
   /**
@@ -390,7 +390,7 @@ public function testBlockCacheTags() {
     ];
     sort($expected_cache_tags);
     $keys = \Drupal::service('cache_contexts_manager')->convertTokensToKeys(['languages:language_interface', 'theme', 'user.permissions'])->getKeys();
-    $this->assertIdentical($cache_entry->tags, $expected_cache_tags);
+    $this->assertSame($cache_entry->tags, $expected_cache_tags);
     $cache_entry = \Drupal::cache('render')->get('entity_view:block:powered:' . implode(':', $keys));
     $expected_cache_tags = [
       'block_view',
@@ -398,7 +398,7 @@ public function testBlockCacheTags() {
       'rendered',
     ];
     sort($expected_cache_tags);
-    $this->assertIdentical($cache_entry->tags, $expected_cache_tags);
+    $this->assertSame($cache_entry->tags, $expected_cache_tags);
 
     // The "Powered by Drupal" block is modified; verify a cache miss.
     $block->setRegion('content');
@@ -440,7 +440,7 @@ public function testBlockCacheTags() {
     sort($expected_cache_tags);
     $keys = \Drupal::service('cache_contexts_manager')->convertTokensToKeys(['languages:language_interface', 'theme', 'user.permissions'])->getKeys();
     $cache_entry = \Drupal::cache('render')->get('entity_view:block:powered:' . implode(':', $keys));
-    $this->assertIdentical($cache_entry->tags, $expected_cache_tags);
+    $this->assertSame($cache_entry->tags, $expected_cache_tags);
     $expected_cache_tags = [
       'block_view',
       'config:block.block.powered-2',
@@ -449,7 +449,7 @@ public function testBlockCacheTags() {
     sort($expected_cache_tags);
     $keys = \Drupal::service('cache_contexts_manager')->convertTokensToKeys(['languages:language_interface', 'theme', 'user.permissions'])->getKeys();
     $cache_entry = \Drupal::cache('render')->get('entity_view:block:powered-2:' . implode(':', $keys));
-    $this->assertIdentical($cache_entry->tags, $expected_cache_tags);
+    $this->assertSame($cache_entry->tags, $expected_cache_tags);
 
     // Now we should have a cache hit again.
     $this->drupalGet('<front>');
@@ -494,7 +494,7 @@ public function testUninstallTheme() {
     $theme_handler->uninstall(['seven']);
 
     // Ensure that the block configuration does not exist anymore.
-    $this->assertIdentical(NULL, Block::load($block->id()));
+    $this->assertSame(NULL, Block::load($block->id()));
   }
 
   /**
diff --git a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
index 0a18d7fa0f..30787166a8 100644
--- a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
+++ b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
@@ -372,8 +372,8 @@ public function testBlockContextualLinks() {
     $this->getSession()->getDriver()->getClient()->request('POST', $url, $post);
     $this->assertResponse(200);
     $json = Json::decode($this->getSession()->getPage()->getContent());
-    $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="entityviewedit-form"><a href="' . base_path() . 'admin/structure/views/view/test_view_block/edit/block_1">Edit view</a></li></ul>');
-    $this->assertIdentical($json[$cached_id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $cached_block->id() . '">Configure block</a></li><li class="entityviewedit-form"><a href="' . base_path() . 'admin/structure/views/view/test_view_block/edit/block_1">Edit view</a></li></ul>');
+    $this->assertSame($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="entityviewedit-form"><a href="' . base_path() . 'admin/structure/views/view/test_view_block/edit/block_1">Edit view</a></li></ul>');
+    $this->assertSame($json[$cached_id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $cached_block->id() . '">Configure block</a></li><li class="entityviewedit-form"><a href="' . base_path() . 'admin/structure/views/view/test_view_block/edit/block_1">Edit view</a></li></ul>');
   }
 
 }
diff --git a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
index 48d63a302d..a12f735e42 100644
--- a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
@@ -44,12 +44,12 @@ public function testBlockInterface() {
     // Initial configuration of the block at construction time.
     /** @var $display_block \Drupal\Core\Block\BlockPluginInterface */
     $display_block = $manager->createInstance('test_block_instantiation', $configuration);
-    $this->assertIdentical($display_block->getConfiguration(), $expected_configuration, 'The block was configured correctly.');
+    $this->assertSame($display_block->getConfiguration(), $expected_configuration, 'The block was configured correctly.');
 
     // Updating an element of the configuration.
     $display_block->setConfigurationValue('display_message', 'My custom display message.');
     $expected_configuration['display_message'] = 'My custom display message.';
-    $this->assertIdentical($display_block->getConfiguration(), $expected_configuration, 'The block configuration was updated correctly.');
+    $this->assertSame($display_block->getConfiguration(), $expected_configuration, 'The block configuration was updated correctly.');
     $definition = $display_block->getPluginDefinition();
 
     $expected_form = [
@@ -87,17 +87,17 @@ public function testBlockInterface() {
     $actual_form = $display_block->buildConfigurationForm([], $form_state);
     // Remove the visibility sections, as that just tests condition plugins.
     unset($actual_form['visibility'], $actual_form['visibility_tabs']);
-    $this->assertIdentical($this->castSafeStrings($actual_form), $this->castSafeStrings($expected_form), 'Only the expected form elements were present.');
+    $this->assertSame($this->castSafeStrings($actual_form), $this->castSafeStrings($expected_form), 'Only the expected form elements were present.');
 
     $expected_build = [
       '#children' => 'My custom display message.',
     ];
     // Ensure the build array is proper.
-    $this->assertIdentical($display_block->build(), $expected_build, 'The plugin returned the appropriate build array.');
+    $this->assertSame($display_block->build(), $expected_build, 'The plugin returned the appropriate build array.');
 
     // Ensure the machine name suggestion is correct. In truth, this is actually
     // testing BlockBase's implementation, not the interface itself.
-    $this->assertIdentical($display_block->getMachineNameSuggestion(), 'displaymessage', 'The plugin returned the expected machine name suggestion.');
+    $this->assertSame($display_block->getMachineNameSuggestion(), 'displaymessage', 'The plugin returned the expected machine name suggestion.');
   }
 
 }
diff --git a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
index 2a7c7710c3..db1a4ee885 100644
--- a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
@@ -100,7 +100,7 @@ protected function createTests() {
       'visibility' => [],
     ];
 
-    $this->assertIdentical($actual_properties, $expected_properties);
+    $this->assertSame($actual_properties, $expected_properties);
 
     $this->assertTrue($entity->getPlugin() instanceof TestHtmlBlock, 'The entity has an instance of the correct block plugin.');
   }
diff --git a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
index 71c4f55b8d..36a930e353 100644
--- a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
@@ -187,14 +187,14 @@ public function testBlockViewBuilderViewAlter() {
     // Establish baseline.
     $build = $this->getBlockRenderArray();
     $this->setRawContent((string) $this->renderer->renderRoot($build));
-    $this->assertIdentical(trim((string) $this->cssSelect('div')[0]), 'Llamas > unicorns!');
+    $this->assertSame(trim((string) $this->cssSelect('div')[0]), 'Llamas > unicorns!');
 
     // Enable the block view alter hook that adds a foo=bar attribute.
     \Drupal::state()->set('block_test_view_alter_suffix', TRUE);
     Cache::invalidateTags($this->block->getCacheTagsToInvalidate());
     $build = $this->getBlockRenderArray();
     $this->setRawContent((string) $this->renderer->renderRoot($build));
-    $this->assertIdentical(trim((string) $this->cssSelect('[foo=bar]')[0]), 'Llamas > unicorns!');
+    $this->assertSame(trim((string) $this->cssSelect('[foo=bar]')[0]), 'Llamas > unicorns!');
     \Drupal::state()->set('block_test_view_alter_suffix', FALSE);
 
     \Drupal::state()->set('block_test.content', NULL);
@@ -205,7 +205,7 @@ public function testBlockViewBuilderViewAlter() {
     \Drupal::state()->set('block_test_view_alter_append_pre_render_prefix', TRUE);
     $build = $this->getBlockRenderArray();
     $this->assertFalse(isset($build['#prefix']), 'The appended #pre_render callback has not yet run before rendering.');
-    $this->assertIdentical((string) $this->renderer->renderRoot($build), 'Hiya!<br>');
+    $this->assertSame((string) $this->renderer->renderRoot($build), 'Hiya!<br>');
     $this->assertTrue(isset($build['#prefix']) && $build['#prefix'] === 'Hiya!<br>', 'A cached block without content is altered.');
   }
 
@@ -266,7 +266,7 @@ public function testBlockViewBuilderBuildAlter() {
       \Drupal::state()->set('block_test_block_alter_create_placeholder', $value);
       $build = $this->getBlockRenderArray();
       $this->assertTrue(isset($build['#create_placeholder']));
-      $this->assertIdentical($value, $build['#create_placeholder']);
+      $this->assertSame($value, $build['#create_placeholder']);
     }
     \Drupal::state()->set('block_test_block_alter_create_placeholder', NULL);
 
@@ -293,10 +293,10 @@ protected function assertBlockRenderedWithExpectedCacheability(array $expected_k
     // - the built render array;
     $this->pass('Built render array');
     $build = $this->getBlockRenderArray();
-    $this->assertIdentical($expected_keys, $build['#cache']['keys']);
-    $this->assertIdentical($expected_contexts, $build['#cache']['contexts']);
-    $this->assertIdentical($expected_tags, $build['#cache']['tags']);
-    $this->assertIdentical($expected_max_age, $build['#cache']['max-age']);
+    $this->assertSame($expected_keys, $build['#cache']['keys']);
+    $this->assertSame($expected_contexts, $build['#cache']['contexts']);
+    $this->assertSame($expected_tags, $build['#cache']['tags']);
+    $this->assertSame($expected_max_age, $build['#cache']['max-age']);
     $this->assertFalse(isset($build['#create_placeholder']));
     // - the rendered render array;
     $this->pass('Rendered render array');
@@ -307,10 +307,10 @@ protected function assertBlockRenderedWithExpectedCacheability(array $expected_k
     $cid = implode(':', $expected_keys) . ':' . implode(':', \Drupal::service('cache_contexts_manager')->convertTokensToKeys($final_cache_contexts)->getKeys());
     $cache_item = $this->container->get('cache.render')->get($cid);
     $this->assertTrue($cache_item, 'The block render element has been cached with the expected cache ID.');
-    $this->assertIdentical(Cache::mergeTags($expected_tags, ['rendered']), $cache_item->tags);
-    $this->assertIdentical($final_cache_contexts, $cache_item->data['#cache']['contexts']);
-    $this->assertIdentical($expected_tags, $cache_item->data['#cache']['tags']);
-    $this->assertIdentical($expected_max_age, $cache_item->data['#cache']['max-age']);
+    $this->assertSame(Cache::mergeTags($expected_tags, ['rendered']), $cache_item->tags);
+    $this->assertSame($final_cache_contexts, $cache_item->data['#cache']['contexts']);
+    $this->assertSame($expected_tags, $cache_item->data['#cache']['tags']);
+    $this->assertSame($expected_max_age, $cache_item->data['#cache']['max-age']);
 
     $this->container->get('cache.render')->delete($cid);
   }
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
index aba60c366c..a356643e88 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
@@ -66,7 +66,7 @@ public function testListing() {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical($elements[0]->getText(), $label);
+    $this->assertSame($elements[0]->getText(), $label);
 
     // Edit the entity using the operations link.
     $blocks = $this->container
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
index 1c623be82e..920efa5ac2 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
@@ -44,10 +44,10 @@ public function testListing() {
     $expected_items = ['Block description', 'Block type', 'Updated Sort ascending', 'Operations'];
     foreach ($elements as $key => $element) {
       if ($element->find('xpath', 'a')) {
-        $this->assertIdentical(trim($element->find('xpath', 'a')->getText()), $expected_items[$key]);
+        $this->assertSame(trim($element->find('xpath', 'a')->getText()), $expected_items[$key]);
       }
       else {
-        $this->assertIdentical(trim($element->getText()), $expected_items[$key]);
+        $this->assertSame(trim($element->getText()), $expected_items[$key]);
       }
     }
 
@@ -73,7 +73,7 @@ public function testListing() {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical($elements[0]->find('xpath', 'a')->getText(), $label);
+    $this->assertSame($elements[0]->find('xpath', 'a')->getText(), $label);
 
     // Edit the entity using the operations link.
     $blocks = $this->container
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
index 0f7ae5a2e6..98d3f76db8 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
@@ -51,7 +51,7 @@ public function testImport() {
     // Test the import saved.
     $block_by_id = BlockContent::load($test_id);
     $this->assertTrue($block_by_id, 'Custom block load by block ID.');
-    $this->assertIdentical($block_by_id->body->value, $block_array['body']['value']);
+    $this->assertSame($block_by_id->body->value, $block_array['body']['value']);
   }
 
   /**
diff --git a/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php b/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php
index 8ff2fc05ca..0ce93b6e07 100644
--- a/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php
@@ -31,7 +31,7 @@ public function testFieldType() {
 
     $view = Views::getView('test_field_type');
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, $expected_result, $column_map, 'The correct block_content type was displayed.');
+    $this->assertSameResultset($view, $expected_result, $column_map, 'The correct block_content type was displayed.');
   }
 
 }
diff --git a/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php b/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
index 0ccebd2a9f..2b6734efe6 100644
--- a/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
@@ -74,7 +74,7 @@ public function testBlockContentRevisionRelationship() {
         'block_content_field_data_block_content_field_revision_id' => '1',
       ],
     ];
-    $this->assertIdenticalResultset($view_id, $resultset_id, $column_map);
+    $this->assertSameResultset($view_id, $resultset_id, $column_map);
 
     // There should be only one row with active revision 2.
     $view_revision_id = Views::getView('test_block_content_revision_revision_id');
@@ -86,7 +86,7 @@ public function testBlockContentRevisionRelationship() {
         'block_content_field_data_block_content_field_revision_id' => '1',
       ],
     ];
-    $this->assertIdenticalResultset($view_revision_id, $resultset_revision_id, $column_map);
+    $this->assertSameResultset($view_revision_id, $resultset_revision_id, $column_map);
   }
 
 }
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
index 7d343738c9..12eac454e5 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
@@ -37,17 +37,17 @@ public function testBlockContentBodyFieldMigration() {
     /** @var \Drupal\field\FieldStorageConfigInterface $storage */
     $storage = FieldStorageConfig::load('block_content.body');
     $this->assertTrue($storage instanceof FieldStorageConfigInterface);
-    $this->assertIdentical('block_content', $storage->getTargetEntityTypeId());
-    $this->assertIdentical(['basic'], array_values($storage->getBundles()));
-    $this->assertIdentical('body', $storage->getName());
+    $this->assertSame('block_content', $storage->getTargetEntityTypeId());
+    $this->assertSame(['basic'], array_values($storage->getBundles()));
+    $this->assertSame('body', $storage->getName());
 
     /** @var \Drupal\field\FieldConfigInterface $field */
     $field = FieldConfig::load('block_content.basic.body');
     $this->assertTrue($field instanceof FieldConfigInterface);
-    $this->assertIdentical('block_content', $field->getTargetEntityTypeId());
-    $this->assertIdentical('basic', $field->getTargetBundle());
-    $this->assertIdentical('body', $field->getName());
-    $this->assertIdentical('Body', $field->getLabel());
+    $this->assertSame('block_content', $field->getTargetEntityTypeId());
+    $this->assertSame('basic', $field->getTargetBundle());
+    $this->assertSame('body', $field->getName());
+    $this->assertSame('Body', $field->getLabel());
   }
 
 }
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
index 4accc2040b..32663f769d 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
@@ -32,7 +32,7 @@ public function testBlockContentTypeMigration() {
     /** @var \Drupal\block_content\BlockContentTypeInterface $entity */
     $entity = BlockContentType::load('basic');
     $this->assertTrue($entity instanceof BlockContentTypeInterface);
-    $this->assertIdentical('Basic', $entity->label());
+    $this->assertSame('Basic', $entity->label());
   }
 
 }
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
index bb5ba89eb9..b7e5b6d842 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
@@ -39,18 +39,18 @@ protected function setUp() {
   public function testBlockMigration() {
     /** @var BlockContent $block */
     $block = BlockContent::load(1);
-    $this->assertIdentical('My block 1', $block->label());
+    $this->assertSame('My block 1', $block->label());
     $this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time());
-    $this->assertIdentical('en', $block->language()->getId());
-    $this->assertIdentical('<h3>My first custom block body</h3>', $block->body->value);
-    $this->assertIdentical('full_html', $block->body->format);
+    $this->assertSame('en', $block->language()->getId());
+    $this->assertSame('<h3>My first custom block body</h3>', $block->body->value);
+    $this->assertSame('full_html', $block->body->format);
 
     $block = BlockContent::load(2);
-    $this->assertIdentical('My block 2', $block->label());
+    $this->assertSame('My block 2', $block->label());
     $this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time());
-    $this->assertIdentical('en', $block->language()->getId());
-    $this->assertIdentical('<h3>My second custom block body</h3>', $block->body->value);
-    $this->assertIdentical('full_html', $block->body->format);
+    $this->assertSame('en', $block->language()->getId());
+    $this->assertSame('<h3>My second custom block body</h3>', $block->body->value);
+    $this->assertSame('full_html', $block->body->format);
   }
 
 }
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
index 706a7ccf05..ed041e5d01 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
@@ -42,11 +42,11 @@ public function testCustomBlockMigration() {
     $block = BlockContent::load(1);
     $this->assertTrue($block instanceof BlockContentInterface);
     /** @var \Drupal\block_content\BlockContentInterface $block */
-    $this->assertIdentical('Limerick', $block->label());
+    $this->assertSame('Limerick', $block->label());
 
     $expected_body = "A fellow jumped off a high wall\r\nAnd had a most terrible fall\r\nHe went back to bed\r\nWith a bump on his head\r\nThat's why you don't jump off a wall";
-    $this->assertIdentical($expected_body, $block->body->value);
-    $this->assertIdentical('filtered_html', $block->body->format);
+    $this->assertSame($expected_body, $block->body->value);
+    $this->assertSame('filtered_html', $block->body->format);
   }
 
 }
diff --git a/core/modules/book/tests/src/Functional/BookTestTrait.php b/core/modules/book/tests/src/Functional/BookTestTrait.php
index f694406324..bcdfc9b0f7 100644
--- a/core/modules/book/tests/src/Functional/BookTestTrait.php
+++ b/core/modules/book/tests/src/Functional/BookTestTrait.php
@@ -133,7 +133,7 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE,
     }
 
     // Compare expected and got breadcrumbs.
-    $this->assertIdentical($expected_breadcrumb, $got_breadcrumb, 'The breadcrumb is correctly displayed on the page.');
+    $this->assertSame($expected_breadcrumb, $got_breadcrumb, 'The breadcrumb is correctly displayed on the page.');
 
     // Check printer friendly version.
     $this->drupalGet('book/export/html/' . $node->id());
diff --git a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php
index becf87d3c9..74e1e223a7 100644
--- a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php
+++ b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php
@@ -32,9 +32,9 @@ protected function setUp() {
    */
   public function testBookSettings() {
     $config = $this->config('book.settings');
-    $this->assertIdentical('book', $config->get('child_type'));
+    $this->assertSame('book', $config->get('child_type'));
     $this->assertSame('book pages', $config->get('block.navigation.mode'));
-    $this->assertIdentical(['book'], $config->get('allowed_types'));
+    $this->assertSame(['book'], $config->get('allowed_types'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'book.settings', $config->get());
   }
 
diff --git a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php
index cab65e39c2..1de2565dd4 100644
--- a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php
+++ b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php
@@ -33,28 +33,28 @@ protected function setUp() {
    */
   public function testBook() {
     $nodes = Node::loadMultiple([4, 5, 6, 7, 8]);
-    $this->assertIdentical('4', $nodes[4]->book['bid']);
-    $this->assertIdentical('0', $nodes[4]->book['pid']);
+    $this->assertSame('4', $nodes[4]->book['bid']);
+    $this->assertSame('0', $nodes[4]->book['pid']);
 
-    $this->assertIdentical('4', $nodes[5]->book['bid']);
-    $this->assertIdentical('4', $nodes[5]->book['pid']);
+    $this->assertSame('4', $nodes[5]->book['bid']);
+    $this->assertSame('4', $nodes[5]->book['pid']);
 
-    $this->assertIdentical('4', $nodes[6]->book['bid']);
-    $this->assertIdentical('5', $nodes[6]->book['pid']);
+    $this->assertSame('4', $nodes[6]->book['bid']);
+    $this->assertSame('5', $nodes[6]->book['pid']);
 
-    $this->assertIdentical('4', $nodes[7]->book['bid']);
-    $this->assertIdentical('5', $nodes[7]->book['pid']);
+    $this->assertSame('4', $nodes[7]->book['bid']);
+    $this->assertSame('5', $nodes[7]->book['pid']);
 
-    $this->assertIdentical('8', $nodes[8]->book['bid']);
-    $this->assertIdentical('0', $nodes[8]->book['pid']);
+    $this->assertSame('8', $nodes[8]->book['bid']);
+    $this->assertSame('0', $nodes[8]->book['pid']);
 
     $tree = \Drupal::service('book.manager')->bookTreeAllData(4);
-    $this->assertIdentical('4', $tree['49990 Node 4 4']['link']['nid']);
-    $this->assertIdentical('5', $tree['49990 Node 4 4']['below']['50000 Node 5 5']['link']['nid']);
-    $this->assertIdentical('6', $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 6 6']['link']['nid']);
-    $this->assertIdentical('7', $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 7 7']['link']['nid']);
-    $this->assertIdentical([], $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 6 6']['below']);
-    $this->assertIdentical([], $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 7 7']['below']);
+    $this->assertSame('4', $tree['49990 Node 4 4']['link']['nid']);
+    $this->assertSame('5', $tree['49990 Node 4 4']['below']['50000 Node 5 5']['link']['nid']);
+    $this->assertSame('6', $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 6 6']['link']['nid']);
+    $this->assertSame('7', $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 7 7']['link']['nid']);
+    $this->assertSame([], $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 6 6']['below']);
+    $this->assertSame([], $tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 7 7']['below']);
   }
 
 }
diff --git a/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php b/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
index dc8175787b..7ed2daf91a 100644
--- a/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
+++ b/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
@@ -85,7 +85,7 @@ public function testThemeBreakpoints() {
     }
 
     // Test that the order is as expected.
-    $this->assertIdentical(array_keys($expected_breakpoints), array_keys($breakpoints));
+    $this->assertSame(array_keys($expected_breakpoints), array_keys($breakpoints));
   }
 
   /**
@@ -188,7 +188,7 @@ public function testBreakpointGroups() {
     ];
     $breakpoint_groups = \Drupal::service('breakpoint.manager')->getGroups();
     // Ensure the order is as expected. Should be sorted by label.
-    $this->assertIdentical($expected, $this->castSafeStrings($breakpoint_groups));
+    $this->assertSame($expected, $this->castSafeStrings($breakpoint_groups));
 
     $expected = [
       'breakpoint_theme_test' => 'theme',
diff --git a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php
index eb02d37ada..b4bf518b83 100644
--- a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php
+++ b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php
@@ -57,13 +57,13 @@ public function testEnabledPlugins() {
     // Case 1: no CKEditor plugins.
     $definitions = array_keys($this->manager->getDefinitions());
     sort($definitions);
-    $this->assertIdentical(['drupalimage', 'drupalimagecaption', 'drupallink', 'internal', 'language', 'stylescombo'], $definitions, 'No CKEditor plugins found besides the built-in ones.');
+    $this->assertSame(['drupalimage', 'drupalimagecaption', 'drupallink', 'internal', 'language', 'stylescombo'], $definitions, 'No CKEditor plugins found besides the built-in ones.');
     $enabled_plugins = [
       'drupalimage' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/plugin.js',
       'drupallink' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink/plugin.js',
     ];
-    $this->assertIdentical($enabled_plugins, $this->manager->getEnabledPluginFiles($editor), 'Only built-in plugins are enabled.');
-    $this->assertIdentical(['internal' => NULL] + $enabled_plugins, $this->manager->getEnabledPluginFiles($editor, TRUE), 'Only the "internal" plugin is enabled.');
+    $this->assertSame($enabled_plugins, $this->manager->getEnabledPluginFiles($editor), 'Only built-in plugins are enabled.');
+    $this->assertSame(['internal' => NULL] + $enabled_plugins, $this->manager->getEnabledPluginFiles($editor, TRUE), 'Only the "internal" plugin is enabled.');
 
     // Enable the CKEditor Test module, which has the Llama plugin (plus four
     // variations of it, to cover all possible ways a plugin can be enabled) and
@@ -75,9 +75,9 @@ public function testEnabledPlugins() {
     // Case 2: CKEditor plugins are available.
     $plugin_ids = array_keys($this->manager->getDefinitions());
     sort($plugin_ids);
-    $this->assertIdentical(['drupalimage', 'drupalimagecaption', 'drupallink', 'internal', 'language', 'llama', 'llama_button', 'llama_contextual', 'llama_contextual_and_button', 'llama_css', 'stylescombo'], $plugin_ids, 'Additional CKEditor plugins found.');
-    $this->assertIdentical($enabled_plugins, $this->manager->getEnabledPluginFiles($editor), 'Only the internal plugins are enabled.');
-    $this->assertIdentical(['internal' => NULL] + $enabled_plugins, $this->manager->getEnabledPluginFiles($editor, TRUE), 'Only the "internal" plugin is enabled.');
+    $this->assertSame(['drupalimage', 'drupalimagecaption', 'drupallink', 'internal', 'language', 'llama', 'llama_button', 'llama_contextual', 'llama_contextual_and_button', 'llama_css', 'stylescombo'], $plugin_ids, 'Additional CKEditor plugins found.');
+    $this->assertSame($enabled_plugins, $this->manager->getEnabledPluginFiles($editor), 'Only the internal plugins are enabled.');
+    $this->assertSame(['internal' => NULL] + $enabled_plugins, $this->manager->getEnabledPluginFiles($editor, TRUE), 'Only the "internal" plugin is enabled.');
 
     // Case 3: enable each of the newly available plugins, if possible:
     // a. Llama: cannot be enabled, since it does not implement
@@ -106,27 +106,27 @@ public function testEnabledPlugins() {
     $file['cb'] = drupal_get_path('module', 'ckeditor_test') . '/js/llama_contextual_and_button.js';
     $file['css'] = drupal_get_path('module', 'ckeditor_test') . '/js/llama_css.js';
     $expected = $enabled_plugins + ['llama_button' => $file['b'], 'llama_contextual_and_button' => $file['cb']];
-    $this->assertIdentical($expected, $this->manager->getEnabledPluginFiles($editor), 'The LlamaButton and LlamaContextualAndButton plugins are enabled.');
-    $this->assertIdentical(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LlamaButton and LlamaContextualAndButton plugins are enabled.');
+    $this->assertSame($expected, $this->manager->getEnabledPluginFiles($editor), 'The LlamaButton and LlamaContextualAndButton plugins are enabled.');
+    $this->assertSame(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LlamaButton and LlamaContextualAndButton plugins are enabled.');
     $settings['toolbar'] = $original_toolbar;
     $settings['toolbar']['rows'][0][0]['items'][] = 'Strike';
     $editor->setSettings($settings);
     $editor->save();
     $expected = $enabled_plugins + ['llama_contextual' => $file['c'], 'llama_contextual_and_button' => $file['cb']];
-    $this->assertIdentical($expected, $this->manager->getEnabledPluginFiles($editor), 'The  LLamaContextual and LlamaContextualAndButton plugins are enabled.');
-    $this->assertIdentical(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LlamaContextual and LlamaContextualAndButton plugins are enabled.');
+    $this->assertSame($expected, $this->manager->getEnabledPluginFiles($editor), 'The  LLamaContextual and LlamaContextualAndButton plugins are enabled.');
+    $this->assertSame(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LlamaContextual and LlamaContextualAndButton plugins are enabled.');
     $settings['toolbar']['rows'][0][0]['items'][] = 'Llama';
     $editor->setSettings($settings);
     $editor->save();
     $expected = $enabled_plugins + ['llama_button' => $file['b'], 'llama_contextual' => $file['c'], 'llama_contextual_and_button' => $file['cb']];
-    $this->assertIdentical($expected, $this->manager->getEnabledPluginFiles($editor), 'The LlamaButton, LlamaContextual and LlamaContextualAndButton plugins are enabled.');
-    $this->assertIdentical(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LLamaButton, LlamaContextual and LlamaContextualAndButton plugins are enabled.');
+    $this->assertSame($expected, $this->manager->getEnabledPluginFiles($editor), 'The LlamaButton, LlamaContextual and LlamaContextualAndButton plugins are enabled.');
+    $this->assertSame(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LLamaButton, LlamaContextual and LlamaContextualAndButton plugins are enabled.');
     $settings['toolbar']['rows'][0][0]['items'][] = 'LlamaCSS';
     $editor->setSettings($settings);
     $editor->save();
     $expected = $enabled_plugins + ['llama_button' => $file['b'], 'llama_contextual' => $file['c'], 'llama_contextual_and_button' => $file['cb'], 'llama_css' => $file['css']];
-    $this->assertIdentical($expected, $this->manager->getEnabledPluginFiles($editor), 'The LlamaButton, LlamaContextual, LlamaContextualAndButton and LlamaCSS plugins are enabled.');
-    $this->assertIdentical(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LLamaButton, LlamaContextual, LlamaContextualAndButton and LlamaCSS plugins are enabled.');
+    $this->assertSame($expected, $this->manager->getEnabledPluginFiles($editor), 'The LlamaButton, LlamaContextual, LlamaContextualAndButton and LlamaCSS plugins are enabled.');
+    $this->assertSame(['internal' => NULL] + $expected, $this->manager->getEnabledPluginFiles($editor, TRUE), 'The LLamaButton, LlamaContextual, LlamaContextualAndButton and LlamaCSS plugins are enabled.');
   }
 
   /**
@@ -137,7 +137,7 @@ public function testCssFiles() {
     $editor = Editor::load('filtered_html');
 
     // Case 1: no CKEditor iframe instance CSS file.
-    $this->assertIdentical([], $this->manager->getCssFiles($editor), 'No iframe instance CSS file found.');
+    $this->assertSame([], $this->manager->getCssFiles($editor), 'No iframe instance CSS file found.');
 
     // Enable the CKEditor Test module, which has the LlamaCss plugin and
     // clear the editor manager's cache so it is picked up.
@@ -153,7 +153,7 @@ public function testCssFiles() {
     $expected = [
       'llama_css' => [drupal_get_path('module', 'ckeditor_test') . '/css/llama.css']
     ];
-    $this->assertIdentical($expected, $this->manager->getCssFiles($editor), 'Iframe instance CSS file found.');
+    $this->assertSame($expected, $this->manager->getCssFiles($editor), 'Iframe instance CSS file found.');
   }
 
 }
diff --git a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php
index 4f1da31834..bbed881bd8 100644
--- a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php
+++ b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php
@@ -92,7 +92,7 @@ public function testGetJSSettings() {
     $expected_config = $this->castSafeStrings($expected_config);
     ksort($expected_config);
     ksort($expected_config['allowedContent']);
-    $this->assertIdentical($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for default configuration.');
+    $this->assertSame($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for default configuration.');
 
     // Customize the configuration: add button, have two contextually enabled
     // buttons, and configure a CKEditor plugin setting.
@@ -113,7 +113,7 @@ public function testGetJSSettings() {
     $expected_config['drupalExternalPlugins']['llama_contextual_and_button'] = file_url_transform_relative(file_create_url('core/modules/ckeditor/tests/modules/js/llama_contextual_and_button.js'));
     $expected_config['contentsCss'][] = file_url_transform_relative(file_create_url('core/modules/ckeditor/tests/modules/ckeditor_test.css'));
     ksort($expected_config);
-    $this->assertIdentical($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
+    $this->assertSame($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
 
     // Change the allowed HTML tags; the "allowedContent" and "format_tags"
     // settings for CKEditor should automatically be updated as well.
@@ -127,7 +127,7 @@ public function testGetJSSettings() {
     $expected_config['allowedContent']['address'] = ['attributes' => 'class', 'styles' => FALSE, 'classes' => 'foo,bar-*'];
     $expected_config['format_tags'] = 'p;h1;h2;h3;h4;h5;h6;pre';
     ksort($expected_config['allowedContent']);
-    $this->assertIdentical($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
+    $this->assertSame($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
 
     // Disable the filter_html filter: allow *all *tags.
     $format->setFilterConfig('filter_html', ['status' => 0]);
@@ -136,7 +136,7 @@ public function testGetJSSettings() {
     $expected_config['allowedContent'] = TRUE;
     $expected_config['disallowedContent'] = FALSE;
     $expected_config['format_tags'] = 'p;h1;h2;h3;h4;h5;h6;pre';
-    $this->assertIdentical($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
+    $this->assertSame($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
 
     // Enable the filter_test_restrict_tags_and_attributes filter.
     $format->setFilterConfig('filter_test_restrict_tags_and_attributes', [
@@ -210,7 +210,7 @@ public function testGetJSSettings() {
     ksort($expected_config);
     ksort($expected_config['allowedContent']);
     ksort($expected_config['disallowedContent']);
-    $this->assertIdentical($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
+    $this->assertSame($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');
   }
 
   /**
@@ -221,7 +221,7 @@ public function testBuildToolbarJSSetting() {
 
     // Default toolbar.
     $expected = $this->getDefaultToolbarConfig();
-    $this->assertIdentical($expected, $this->castSafeStrings($this->ckeditor->buildToolbarJSSetting($editor)), '"toolbar" configuration part of JS settings built correctly for default toolbar.');
+    $this->assertSame($expected, $this->castSafeStrings($this->ckeditor->buildToolbarJSSetting($editor)), '"toolbar" configuration part of JS settings built correctly for default toolbar.');
 
     // Customize the configuration.
     $settings = $editor->getSettings();
@@ -229,7 +229,7 @@ public function testBuildToolbarJSSetting() {
     $editor->setSettings($settings);
     $editor->save();
     $expected[0]['items'][] = 'Strike';
-    $this->assertIdentical($expected, $this->castSafeStrings($this->ckeditor->buildToolbarJSSetting($editor)), '"toolbar" configuration part of JS settings built correctly for customized toolbar.');
+    $this->assertSame($expected, $this->castSafeStrings($this->ckeditor->buildToolbarJSSetting($editor)), '"toolbar" configuration part of JS settings built correctly for customized toolbar.');
 
     // Enable the editor_test module, customize further.
     $this->enableModules(['ckeditor_test']);
@@ -241,7 +241,7 @@ public function testBuildToolbarJSSetting() {
     $editor->save();
     $expected[0]['name'] = 'JunkScience';
     $expected[0]['items'][] = 'Llama';
-    $this->assertIdentical($expected, $this->castSafeStrings($this->ckeditor->buildToolbarJSSetting($editor)), '"toolbar" configuration part of JS settings built correctly for customized toolbar with contrib module-provided CKEditor plugin.');
+    $this->assertSame($expected, $this->castSafeStrings($this->ckeditor->buildToolbarJSSetting($editor)), '"toolbar" configuration part of JS settings built correctly for customized toolbar with contrib module-provided CKEditor plugin.');
   }
 
   /**
@@ -252,12 +252,12 @@ public function testBuildContentsCssJSSetting() {
 
     // Default toolbar.
     $expected = $this->getDefaultContentsCssConfig();
-    $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly for default toolbar.');
+    $this->assertSame($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly for default toolbar.');
 
     // Enable the editor_test module, which implements hook_ckeditor_css_alter().
     $this->enableModules(['ckeditor_test']);
     $expected[] = file_url_transform_relative(file_create_url(drupal_get_path('module', 'ckeditor_test') . '/ckeditor_test.css'));
-    $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a hook_ckeditor_css_alter() implementation exists.');
+    $this->assertSame($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a hook_ckeditor_css_alter() implementation exists.');
 
     // Enable LlamaCss plugin, which adds an additional CKEditor stylesheet.
     $this->container->get('plugin.manager.editor')->clearCachedDefinitions();
@@ -269,7 +269,7 @@ public function testBuildContentsCssJSSetting() {
     $editor->setSettings($settings);
     $editor->save();
     $expected[] = file_url_transform_relative(file_create_url(drupal_get_path('module', 'ckeditor_test') . '/css/llama.css'));
-    $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a CKEditorPluginInterface implementation exists.');
+    $this->assertSame($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a CKEditorPluginInterface implementation exists.');
 
     // Enable the Bartik theme, which specifies a CKEditor stylesheet.
     \Drupal::service('theme_handler')->install(['bartik']);
@@ -278,7 +278,7 @@ public function testBuildContentsCssJSSetting() {
     $expected[] = file_url_transform_relative(file_create_url('core/themes/bartik/css/components/captions.css'));
     $expected[] = file_url_transform_relative(file_create_url('core/themes/bartik/css/components/table.css'));
     $expected[] = file_url_transform_relative(file_create_url('core/themes/bartik/css/components/text-formatted.css'));
-    $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a theme providing a CKEditor stylesheet exists.');
+    $this->assertSame($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a theme providing a CKEditor stylesheet exists.');
   }
 
   /**
@@ -316,18 +316,18 @@ public function testStylesComboGetConfig() {
     $editor->setSettings($settings);
     $editor->save();
     $expected['stylesSet'] = [];
-    $this->assertIdentical($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
+    $this->assertSame($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
 
     // Configure the optional "styles" setting in odd ways that shouldn't affect
     // the end result.
     $settings['plugins']['stylescombo']['styles'] = "   \n";
     $editor->setSettings($settings);
     $editor->save();
-    $this->assertIdentical($expected, $stylescombo_plugin->getConfig($editor));
+    $this->assertSame($expected, $stylescombo_plugin->getConfig($editor));
     $settings['plugins']['stylescombo']['styles'] = "\r\n  \n  \r  \n ";
     $editor->setSettings($settings);
     $editor->save();
-    $this->assertIdentical($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
+    $this->assertSame($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
 
     // Now configure it properly, the end result should change.
     $settings['plugins']['stylescombo']['styles'] = "h1.title|Title\np.mAgical.Callout|Callout";
@@ -337,28 +337,28 @@ public function testStylesComboGetConfig() {
       ['name' => 'Title', 'element' => 'h1', 'attributes' => ['class' => 'title']],
       ['name' => 'Callout', 'element' => 'p', 'attributes' => ['class' => 'mAgical Callout']],
     ];
-    $this->assertIdentical($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
+    $this->assertSame($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
 
     // Same configuration, but now interspersed with nonsense. Should yield the
     // same result.
     $settings['plugins']['stylescombo']['styles'] = "  h1 .title   |  Title \r \n\r  \np.mAgical  .Callout|Callout\r";
     $editor->setSettings($settings);
     $editor->save();
-    $this->assertIdentical($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
+    $this->assertSame($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
 
     // Slightly different configuration: class names are optional.
     $settings['plugins']['stylescombo']['styles'] = "      h1 |  Title ";
     $editor->setSettings($settings);
     $editor->save();
     $expected['stylesSet'] = [['name' => 'Title', 'element' => 'h1']];
-    $this->assertIdentical($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
+    $this->assertSame($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
 
     // Invalid syntax should cause stylesSet to be set to FALSE.
     $settings['plugins']['stylescombo']['styles'] = "h1";
     $editor->setSettings($settings);
     $editor->save();
     $expected['stylesSet'] = FALSE;
-    $this->assertIdentical($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
+    $this->assertSame($expected, $stylescombo_plugin->getConfig($editor), '"StylesCombo" plugin configuration built correctly for customized toolbar.');
   }
 
   /**
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
index ce3411c30e..f68fa64e5f 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
@@ -107,7 +107,7 @@ public function testExistingFormat() {
       ],
       'plugins' => ['language' => ['language_list' => 'un']],
     ];
-    $this->assertIdentical($this->castSafeStrings($ckeditor->getDefaultSettings()), $expected_default_settings);
+    $this->assertSame($this->castSafeStrings($ckeditor->getDefaultSettings()), $expected_default_settings);
 
     // Keep the "CKEditor" editor selected and click the "Configure" button.
     $this->drupalPostForm(NULL, $edit, 'editor_configure');
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
index cad0947dcf..0bee050b6b 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
@@ -113,7 +113,7 @@ public function testLoading() {
       ],
     ];
     $this->assertTrue($editor_settings_present, "Text Editor module's JavaScript settings are on the page.");
-    $this->assertIdentical($expected, $this->castSafeStrings($settings['editor']), "Text Editor module's JavaScript settings on the page are correct.");
+    $this->assertSame($expected, $this->castSafeStrings($settings['editor']), "Text Editor module's JavaScript settings on the page are correct.");
     $this->assertTrue($editor_js_present, 'Text Editor JavaScript is present.');
     $this->assertTrue(count($body) === 1, 'A body field exists.');
     $this->assertTrue(count($format_selector) === 1, 'A single text format selector exists on the page.');
@@ -146,7 +146,7 @@ public function testLoading() {
       ],
     ];
     $this->assertTrue($editor_settings_present, "Text Editor module's JavaScript settings are on the page.");
-    $this->assertIdentical($expected, $this->castSafeStrings($settings['editor']), "Text Editor module's JavaScript settings on the page are correct.");
+    $this->assertSame($expected, $this->castSafeStrings($settings['editor']), "Text Editor module's JavaScript settings on the page are correct.");
     $this->assertTrue($editor_js_present, 'Text Editor JavaScript is present.');
     $this->assertTrue(in_array('ckeditor/drupal.ckeditor', explode(',', $settings['ajaxPageState']['libraries'])), 'CKEditor glue library is present.');
 
@@ -154,11 +154,11 @@ public function testLoading() {
     // comparing the setting sent with the page with the current query string.
     $settings = $this->getDrupalSettings();
     $expected = $settings['ckeditor']['timestamp'];
-    $this->assertIdentical($expected, \Drupal::state()->get('system.css_js_query_string'), "CKEditor scripts cache-busting string is correct before flushing all caches.");
+    $this->assertSame($expected, \Drupal::state()->get('system.css_js_query_string'), "CKEditor scripts cache-busting string is correct before flushing all caches.");
     // Flush all caches then make sure that $settings['ckeditor']['timestamp']
     // still matches.
     drupal_flush_all_caches();
-    $this->assertIdentical($expected, \Drupal::state()->get('system.css_js_query_string'), "CKEditor scripts cache-busting string is correct after flushing all caches.");
+    $this->assertSame($expected, \Drupal::state()->get('system.css_js_query_string'), "CKEditor scripts cache-busting string is correct after flushing all caches.");
   }
 
   /**
@@ -211,7 +211,7 @@ public function testExternalStylesheets() {
     $expected = [
       'https://fonts.googleapis.com/css?family=Open+Sans',
     ];
-    $this->assertIdentical($expected, _ckeditor_theme_css('test_ckeditor_stylesheets_external'));
+    $this->assertSame($expected, _ckeditor_theme_css('test_ckeditor_stylesheets_external'));
 
     // Case 2: Install theme which has an external protocol-relative CSS URL.
     $theme_handler->install(['test_ckeditor_stylesheets_protocol_relative']);
@@ -219,7 +219,7 @@ public function testExternalStylesheets() {
     $expected = [
       '//fonts.googleapis.com/css?family=Open+Sans',
     ];
-    $this->assertIdentical($expected, _ckeditor_theme_css('test_ckeditor_stylesheets_protocol_relative'));
+    $this->assertSame($expected, _ckeditor_theme_css('test_ckeditor_stylesheets_protocol_relative'));
 
     // Case 3: Install theme which has a relative CSS URL.
     $theme_handler->install(['test_ckeditor_stylesheets_relative']);
@@ -227,7 +227,7 @@ public function testExternalStylesheets() {
     $expected = [
       'core/modules/system/tests/themes/test_ckeditor_stylesheets_relative/css/yokotsoko.css',
     ];
-    $this->assertIdentical($expected, _ckeditor_theme_css('test_ckeditor_stylesheets_relative'));
+    $this->assertSame($expected, _ckeditor_theme_css('test_ckeditor_stylesheets_relative'));
   }
 
   protected function getThingsToCheck() {
diff --git a/core/modules/color/tests/src/Functional/ColorTest.php b/core/modules/color/tests/src/Functional/ColorTest.php
index c11a92262e..2db55fc9d7 100644
--- a/core/modules/color/tests/src/Functional/ColorTest.php
+++ b/core/modules/color/tests/src/Functional/ColorTest.php
@@ -186,7 +186,7 @@ public function testLogoSettingOverride() {
 
     // Ensure that the overridden logo is present in Bartik, which is colorable.
     $this->drupalGet('admin/appearance/settings/bartik');
-    $this->assertIdentical($GLOBALS['base_path'] . 'core/misc/druplicon.png', $this->getDrupalSettings()['color']['logo']);
+    $this->assertSame($GLOBALS['base_path'] . 'core/misc/druplicon.png', $this->getDrupalSettings()['color']['logo']);
   }
 
   /**
diff --git a/core/modules/comment/src/Tests/CommentCSSTest.php b/core/modules/comment/src/Tests/CommentCSSTest.php
index b50e9527a0..db44146ff5 100644
--- a/core/modules/comment/src/Tests/CommentCSSTest.php
+++ b/core/modules/comment/src/Tests/CommentCSSTest.php
@@ -80,7 +80,7 @@ public function testCommentClasses() {
 
       // Verify the data-history-node-id attribute, which is necessary for the
       // by-viewer class and the "new" indicator, see below.
-      $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-id="' . $node->id() . '"]')), 'data-history-node-id attribute is set on node.');
+      $this->assertSame(1, count($this->xpath('//*[@data-history-node-id="' . $node->id() . '"]')), 'data-history-node-id attribute is set on node.');
 
       // Verify classes if the comment is visible for the current user.
       if ($case['comment_status'] == CommentInterface::PUBLISHED || $case['user'] == 'admin') {
@@ -106,7 +106,7 @@ public function testCommentClasses() {
         // drupal.comment-by-viewer library to add a by-viewer when the current
         // user (the viewer) was the author of the comment. We do this in Java-
         // Script to prevent breaking the render cache.
-        $this->assertIdentical(1, count($this->xpath('//*[contains(@class, "comment") and @data-comment-user-id="' . $case['comment_uid'] . '"]')), 'data-comment-user-id attribute is set on comment.');
+        $this->assertSame(1, count($this->xpath('//*[contains(@class, "comment") and @data-comment-user-id="' . $case['comment_uid'] . '"]')), 'data-comment-user-id attribute is set on comment.');
         $this->assertRaw(drupal_get_path('module', 'comment') . '/js/comment-by-viewer.js', 'drupal.comment-by-viewer library is present.');
       }
 
@@ -124,9 +124,9 @@ public function testCommentClasses() {
       // comment that was created or changed after the last time the current
       // user read the corresponding node.
       if ($case['comment_status'] == CommentInterface::PUBLISHED || $case['user'] == 'admin') {
-        $this->assertIdentical(1, count($this->xpath('//*[contains(@class, "comment")]/*[@data-comment-timestamp="' . $comment->getChangedTime() . '"]')), 'data-comment-timestamp attribute is set on comment');
+        $this->assertSame(1, count($this->xpath('//*[contains(@class, "comment")]/*[@data-comment-timestamp="' . $comment->getChangedTime() . '"]')), 'data-comment-timestamp attribute is set on comment');
         $expectedJS = ($case['user'] !== 'anonymous');
-        $this->assertIdentical($expectedJS, isset($settings['ajaxPageState']['libraries']) && in_array('comment/drupal.comment-new-indicator', explode(',', $settings['ajaxPageState']['libraries'])), 'drupal.comment-new-indicator library is present.');
+        $this->assertSame($expectedJS, isset($settings['ajaxPageState']['libraries']) && in_array('comment/drupal.comment-new-indicator', explode(',', $settings['ajaxPageState']['libraries'])), 'drupal.comment-new-indicator library is present.');
       }
     }
   }
diff --git a/core/modules/comment/src/Tests/CommentFieldsTest.php b/core/modules/comment/src/Tests/CommentFieldsTest.php
index a463314a72..3cb14605c0 100644
--- a/core/modules/comment/src/Tests/CommentFieldsTest.php
+++ b/core/modules/comment/src/Tests/CommentFieldsTest.php
@@ -134,8 +134,8 @@ public function testCommentFieldLinksNonDefaultName() {
     $this->drupalGet('node');
 
     $link_info = $this->getDrupalSettings()['comment']['newCommentsLinks']['node']['comment2']['2'];
-    $this->assertIdentical($link_info['new_comment_count'], 1);
-    $this->assertIdentical($link_info['first_new_comment_link'], $node->url('canonical', ['fragment' => 'new']));
+    $this->assertSame($link_info['new_comment_count'], 1);
+    $this->assertSame($link_info['first_new_comment_link'], $node->url('canonical', ['fragment' => 'new']));
   }
 
   /**
diff --git a/core/modules/comment/src/Tests/CommentLinksTest.php b/core/modules/comment/src/Tests/CommentLinksTest.php
index 589a355663..f9c8a2405a 100644
--- a/core/modules/comment/src/Tests/CommentLinksTest.php
+++ b/core/modules/comment/src/Tests/CommentLinksTest.php
@@ -109,7 +109,7 @@ public function testCommentLinks() {
     $element = $this->cssSelect('article.js-comment > div');
     // Get last child element.
     $element = end($element[0]);
-    $this->assertIdentical($element[0]->getName(), 'div', 'Last element is comment body.');
+    $this->assertSame($element[0]->getName(), 'div', 'Last element is comment body.');
 
     // Change weight to make links go after comment body.
     entity_get_display('comment', 'comment', 'default')
@@ -119,7 +119,7 @@ public function testCommentLinks() {
     $element = $this->cssSelect('article.js-comment > div');
     // Get last child element.
     $element = end($element[0]);
-    $this->assertIdentical($element[0]->getName(), 'ul', 'Last element is comment links.');
+    $this->assertSame($element[0]->getName(), 'ul', 'Last element is comment links.');
 
     // Make sure we can hide node links.
     entity_get_display('node', $this->node->bundle(), 'default')
diff --git a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
index 318e17c57c..59ffa17916 100644
--- a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
+++ b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
@@ -76,7 +76,7 @@ public function testCommentNewCommentsIndicator() {
     // used by the drupal.node-new-comments-link library to determine whether
     // a "x new comments" link might be necessary or not. We do this in
     // JavaScript to prevent breaking the render cache.
-    $this->assertIdentical(0, count($this->xpath('//*[@data-history-node-last-comment-timestamp]')), 'data-history-node-last-comment-timestamp attribute is not set.');
+    $this->assertSame(0, count($this->xpath('//*[@data-history-node-last-comment-timestamp]')), 'data-history-node-last-comment-timestamp attribute is not set.');
 
     // Create a new comment. This helper function may be run with different
     // comment settings so use $comment->save() to avoid complex setup.
@@ -104,8 +104,8 @@ public function testCommentNewCommentsIndicator() {
     // value, the drupal.node-new-comments-link library would determine that the
     // node received a comment after the user last viewed it, and hence it would
     // perform an HTTP request to render the "new comments" node link.
-    $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-last-comment-timestamp="' . $comment->getChangedTime() . '"]')), 'data-history-node-last-comment-timestamp attribute is set to the correct value.');
-    $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-field-name="comment"]')), 'data-history-node-field-name attribute is set to the correct value.');
+    $this->assertSame(1, count($this->xpath('//*[@data-history-node-last-comment-timestamp="' . $comment->getChangedTime() . '"]')), 'data-history-node-last-comment-timestamp attribute is set to the correct value.');
+    $this->assertSame(1, count($this->xpath('//*[@data-history-node-field-name="comment"]')), 'data-history-node-field-name attribute is set to the correct value.');
     // The data will be pre-seeded on this particular page in drupalSettings, to
     // avoid the need for the client to make a separate request to the server.
     $settings = $this->getDrupalSettings();
@@ -135,7 +135,7 @@ public function testCommentNewCommentsIndicator() {
         'first_new_comment_link' => $this->node->url('canonical', ['fragment' => 'new']),
       ],
     ];
-    $this->assertIdentical($expected, $json);
+    $this->assertSame($expected, $json);
 
     // Failing to specify node IDs for the endpoint should return a 404.
     $this->renderNewCommentsNodeLinks([]);
diff --git a/core/modules/comment/src/Tests/CommentPagerTest.php b/core/modules/comment/src/Tests/CommentPagerTest.php
index 9c48978403..1e090f8079 100644
--- a/core/modules/comment/src/Tests/CommentPagerTest.php
+++ b/core/modules/comment/src/Tests/CommentPagerTest.php
@@ -278,7 +278,7 @@ public function testCommentNewPageIndicator() {
     foreach ($expected_pages as $new_replies => $expected_page) {
       $returned_page = \Drupal::entityManager()->getStorage('comment')
         ->getNewCommentPageNumber($node->get('comment')->comment_count, $new_replies, $node, 'comment');
-      $this->assertIdentical($expected_page, $returned_page, format_string('Flat mode, @new replies: expected page @expected, returned page @returned.', ['@new' => $new_replies, '@expected' => $expected_page, '@returned' => $returned_page]));
+      $this->assertSame($expected_page, $returned_page, format_string('Flat mode, @new replies: expected page @expected, returned page @returned.', ['@new' => $new_replies, '@expected' => $expected_page, '@returned' => $returned_page]));
     }
 
     $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Switched to threaded mode.');
diff --git a/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php b/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php
index d3526dc284..a7d9e1bd2e 100644
--- a/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php
+++ b/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php
@@ -45,7 +45,7 @@ public function testCommentUserUIDTest() {
       ],
     ];
     $column_map = ['nid' => 'nid'];
-    $this->assertIdenticalResultset($view, $result_set, $column_map);
+    $this->assertSameResultset($view, $result_set, $column_map);
   }
 
 }
diff --git a/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php b/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php
index 870a4f4f86..9cb315921c 100644
--- a/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php
+++ b/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php
@@ -76,7 +76,7 @@ public function testCommentFieldName() {
       'cid' => 'cid',
       'comment_field_data_field_name' => 'field_name',
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $column_map);
+    $this->assertSameResultset($view, $expected_result, $column_map);
 
     // Test that data rendered.
     $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
diff --git a/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php
index de8882e1e9..7ad4695bb4 100644
--- a/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php
+++ b/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php
@@ -127,7 +127,7 @@ public function testBlockDisplay() {
       $expected_result[$key]['cid'] = $comment->id();
       $expected_result[$key]['created'] = $comment->getCreatedTime();
     }
-    $this->assertIdenticalResultset($view, $expected_result, $map);
+    $this->assertSameResultset($view, $expected_result, $map);
 
     // Check the number of results given by the display is the expected.
     $this->assertEqual(count($view->result), $this->blockDisplayResults,
diff --git a/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php b/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php
index 442a0e762b..1611a47c9c 100644
--- a/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php
+++ b/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php
@@ -57,7 +57,7 @@ public function testCommentUserUIDTest() {
       ],
     ];
     $column_map = ['nid' => 'nid'];
-    $this->assertIdenticalResultset($view, $result_set, $column_map);
+    $this->assertSameResultset($view, $result_set, $column_map);
   }
 
 }
diff --git a/core/modules/comment/tests/src/Functional/Update/CommentUpdateTest.php b/core/modules/comment/tests/src/Functional/Update/CommentUpdateTest.php
index e623132bbb..0e57f019a1 100644
--- a/core/modules/comment/tests/src/Functional/Update/CommentUpdateTest.php
+++ b/core/modules/comment/tests/src/Functional/Update/CommentUpdateTest.php
@@ -42,12 +42,12 @@ public function testCommentUpdate8101() {
     // Check that 'node.article.default' entity view display setting 'view_mode'
     // has the value 'default'.
     $config = $this->config('core.entity_view_display.node.article.default');
-    $this->assertIdentical($config->get('content.comment.settings.view_mode'), 'default');
+    $this->assertSame($config->get('content.comment.settings.view_mode'), 'default');
 
     // Check that 'node.forum.default' entity view display setting 'view_mode'
     // has the value 'default'.
     $config = $this->config('core.entity_view_display.node.forum.default');
-    $this->assertIdentical($config->get('content.comment_forum.settings.view_mode'), 'default');
+    $this->assertSame($config->get('content.comment_forum.settings.view_mode'), 'default');
   }
 
   /**
diff --git a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
index bdea71df15..557fdaa9b0 100644
--- a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
@@ -149,8 +149,8 @@ public function testCacheTags() {
 
     // The entity itself was cached but the top-level element is max-age 0 due
     // to the bubbled up max age due to the lazy-built comment form.
-    $this->assertIdentical(Cache::PERMANENT, $build['entity']['#cache']['max-age']);
-    $this->assertIdentical(0, $build['#cache']['max-age'], 'Top level render array has max-age 0');
+    $this->assertSame(Cache::PERMANENT, $build['entity']['#cache']['max-age']);
+    $this->assertSame(0, $build['#cache']['max-age'], 'Top level render array has max-age 0');
 
     // The children (fields) of the entity render array are only built in case
     // of a cache miss.
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
index 0b256ea51a..81fd370bfd 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
@@ -61,7 +61,7 @@ public function testStub() {
       $this->fail('Expected exception has not been thrown.');
     }
     catch (MigrateException $e) {
-      $this->assertIdentical($e->getMessage(),
+      $this->assertSame($e->getMessage(),
         'Stubbing failed, unable to generate value for field entity_id');
     }
 
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
index 2a13178f67..e75e2719c9 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
@@ -53,24 +53,24 @@ public function testComments() {
     $comment_storage = $this->container->get('entity.manager')->getStorage('comment');
     /** @var \Drupal\comment\CommentInterface $comment */
     $comment = $comment_storage->load(1);
-    $this->assertIdentical('The first comment.', $comment->getSubject());
-    $this->assertIdentical('The first comment body.', $comment->comment_body->value);
-    $this->assertIdentical('filtered_html', $comment->comment_body->format);
-    $this->assertIdentical(NULL, $comment->pid->target_id);
-    $this->assertIdentical('1', $comment->getCommentedEntityId());
-    $this->assertIdentical('node', $comment->getCommentedEntityTypeId());
-    $this->assertIdentical('en', $comment->language()->getId());
-    $this->assertIdentical('comment_no_subject', $comment->getTypeId());
+    $this->assertSame('The first comment.', $comment->getSubject());
+    $this->assertSame('The first comment body.', $comment->comment_body->value);
+    $this->assertSame('filtered_html', $comment->comment_body->format);
+    $this->assertSame(NULL, $comment->pid->target_id);
+    $this->assertSame('1', $comment->getCommentedEntityId());
+    $this->assertSame('node', $comment->getCommentedEntityTypeId());
+    $this->assertSame('en', $comment->language()->getId());
+    $this->assertSame('comment_no_subject', $comment->getTypeId());
     $this->assertEquals('203.0.113.1', $comment->getHostname());
 
     $comment = $comment_storage->load(2);
-    $this->assertIdentical('The response to the second comment.', $comment->subject->value);
-    $this->assertIdentical('3', $comment->pid->target_id);
+    $this->assertSame('The response to the second comment.', $comment->subject->value);
+    $this->assertSame('3', $comment->pid->target_id);
     $this->assertEquals('203.0.113.2', $comment->getHostname());
 
     $comment = $comment_storage->load(3);
-    $this->assertIdentical('The second comment.', $comment->subject->value);
-    $this->assertIdentical(NULL, $comment->pid->target_id);
+    $this->assertSame('The second comment.', $comment->subject->value);
+    $this->assertSame(NULL, $comment->pid->target_id);
     $this->assertEquals('203.0.113.3', $comment->getHostname());
   }
 
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
index c28be63b97..b00e360e6a 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
@@ -33,9 +33,9 @@ protected function setUp() {
    */
   public function testCommentType() {
     $comment_type = CommentType::load('comment');
-    $this->assertIdentical('node', $comment_type->getTargetEntityTypeId());
+    $this->assertSame('node', $comment_type->getTargetEntityTypeId());
     $comment_type = CommentType::load('comment_no_subject');
-    $this->assertIdentical('node', $comment_type->getTargetEntityTypeId());
+    $this->assertSame('node', $comment_type->getTargetEntityTypeId());
   }
 
 }
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityDisplayTest.php
index baa28bc549..d9f7c1ab37 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityDisplayTest.php
@@ -30,9 +30,9 @@ protected function setUp() {
   public function testCommentEntityDisplay() {
     foreach (['page', 'story', 'article'] as $type) {
       $component = EntityViewDisplay::load('node.' . $type . '.default')->getComponent('comment');
-      $this->assertIdentical('hidden', $component['label']);
-      $this->assertIdentical('comment_default', $component['type']);
-      $this->assertIdentical(20, $component['weight']);
+      $this->assertSame('hidden', $component['label']);
+      $this->assertSame('comment_default', $component['type']);
+      $this->assertSame(20, $component['weight']);
     }
   }
 
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php
index 31e61e0a65..26b5144bd6 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php
@@ -35,8 +35,8 @@ protected function setUp() {
   public function testCommentEntityFormDisplay() {
     $component = EntityFormDisplay::load('comment.comment.default')
       ->getComponent('subject');
-    $this->assertIdentical('string_textfield', $component['type']);
-    $this->assertIdentical(10, $component['weight']);
+    $this->assertSame('string_textfield', $component['type']);
+    $this->assertSame(10, $component['weight']);
     $component = EntityFormDisplay::load('comment.comment_no_subject.default')
       ->getComponent('subject');
     $this->assertNull($component);
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplayTest.php
index 818f9b87ea..a062962a3f 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableEntityFormDisplayTest.php
@@ -31,8 +31,8 @@ public function testCommentEntityFormDisplay() {
     foreach (['page', 'article', 'story'] as $type) {
       $component = EntityFormDisplay::load('node.' . $type . '.default')
         ->getComponent('comment');
-      $this->assertIdentical('comment_default', $component['type']);
-      $this->assertIdentical(20, $component['weight']);
+      $this->assertSame('comment_default', $component['type']);
+      $this->assertSame(20, $component['weight']);
     }
   }
 
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableInstanceTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableInstanceTest.php
index 90b256fb14..8c77aa2a20 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableInstanceTest.php
@@ -37,21 +37,21 @@ protected function setUp() {
    */
   public function testCommentFieldInstance() {
     $node = Node::create(['type' => 'page']);
-    $this->assertIdentical(0, $node->comment->status);
-    $this->assertIdentical('comment', $node->comment->getFieldDefinition()->getName());
+    $this->assertSame(0, $node->comment->status);
+    $this->assertSame('comment', $node->comment->getFieldDefinition()->getName());
     $settings = $node->comment->getFieldDefinition()->getSettings();
-    $this->assertIdentical(CommentManagerInterface::COMMENT_MODE_THREADED, $settings['default_mode']);
-    $this->assertIdentical(50, $settings['per_page']);
+    $this->assertSame(CommentManagerInterface::COMMENT_MODE_THREADED, $settings['default_mode']);
+    $this->assertSame(50, $settings['per_page']);
     $this->assertFalse($settings['anonymous']);
     $this->assertFalse($settings['form_location']);
     $this->assertTrue($settings['preview']);
 
     $node = Node::create(['type' => 'story']);
-    $this->assertIdentical(2, $node->comment_no_subject->status);
-    $this->assertIdentical('comment_no_subject', $node->comment_no_subject->getFieldDefinition()->getName());
+    $this->assertSame(2, $node->comment_no_subject->status);
+    $this->assertSame('comment_no_subject', $node->comment_no_subject->getFieldDefinition()->getName());
     $settings = $node->comment_no_subject->getFieldDefinition()->getSettings();
-    $this->assertIdentical(CommentManagerInterface::COMMENT_MODE_FLAT, $settings['default_mode']);
-    $this->assertIdentical(70, $settings['per_page']);
+    $this->assertSame(CommentManagerInterface::COMMENT_MODE_FLAT, $settings['default_mode']);
+    $this->assertSame(70, $settings['per_page']);
     $this->assertTrue($settings['anonymous']);
     $this->assertFalse($settings['form_location']);
     $this->assertFalse($settings['preview']);
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
index 871765b834..19f5c04f27 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
@@ -40,9 +40,9 @@ protected function setUp() {
   protected function assertDisplay($id, $component_id) {
     $component = EntityViewDisplay::load($id)->getComponent($component_id);
     $this->assertTrue(is_array($component));
-    $this->assertIdentical('hidden', $component['label']);
-    $this->assertIdentical('comment_default', $component['type']);
-    $this->assertIdentical(20, $component['weight']);
+    $this->assertSame('hidden', $component['label']);
+    $this->assertSame('comment_default', $component['type']);
+    $this->assertSame(20, $component['weight']);
   }
 
   /**
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
index 8ce439a9cf..fdcdc62bb6 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
@@ -36,8 +36,8 @@ protected function setUp() {
   protected function assertDisplay($id) {
     $component = EntityFormDisplay::load($id)->getComponent('subject');
     $this->assertTrue(is_array($component));
-    $this->assertIdentical('string_textfield', $component['type']);
-    $this->assertIdentical(10, $component['weight']);
+    $this->assertSame('string_textfield', $component['type']);
+    $this->assertSame(10, $component['weight']);
   }
 
   /**
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
index 8568913b16..adf55d8a96 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
@@ -40,8 +40,8 @@ protected function setUp() {
   protected function assertDisplay($id, $component_id) {
     $component = EntityFormDisplay::load($id)->getComponent($component_id);
     $this->assertTrue(is_array($component));
-    $this->assertIdentical('comment_default', $component['type']);
-    $this->assertIdentical(20, $component['weight']);
+    $this->assertSame('comment_default', $component['type']);
+    $this->assertSame(20, $component['weight']);
   }
 
   /**
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
index cc82c82766..36a1cc579c 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
@@ -55,14 +55,14 @@ protected function assertEntity($id, $field_name, $bundle, $default_mode, $per_p
     $entity = FieldConfig::load($id);
     $this->assertTrue($entity instanceof FieldConfigInterface);
     /** @var \Drupal\field\FieldConfigInterface $entity */
-    $this->assertIdentical('node', $entity->getTargetEntityTypeId());
-    $this->assertIdentical('Comments', $entity->label());
+    $this->assertSame('node', $entity->getTargetEntityTypeId());
+    $this->assertSame('Comments', $entity->label());
     $this->assertTrue($entity->isRequired());
-    $this->assertIdentical($field_name, $entity->getFieldStorageDefinition()->getName());
-    $this->assertIdentical($bundle, $entity->getTargetBundle());
+    $this->assertSame($field_name, $entity->getFieldStorageDefinition()->getName());
+    $this->assertSame($bundle, $entity->getTargetBundle());
     $this->assertTrue($entity->get('default_value')[0]['status']);
     $this->assertEqual($default_mode, $entity->getSetting('default_mode'));
-    $this->assertIdentical($per_page, $entity->getSetting('per_page'));
+    $this->assertSame($per_page, $entity->getSetting('per_page'));
     $this->assertEqual($anonymous, $entity->getSetting('anonymous'));
     // This assertion fails because 1 !== TRUE. It's extremely strange that
     // the form_location setting is returning a boolean, but this appears to
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
index b995bdb0a5..077ae9d75a 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
@@ -41,9 +41,9 @@ protected function assertEntity($id, $comment_type) {
     $entity = FieldStorageConfig::load($id);
     $this->assertTrue($entity instanceof FieldStorageConfigInterface);
     /** @var \Drupal\field\FieldStorageConfigInterface $entity */
-    $this->assertIdentical('node', $entity->getTargetEntityTypeId());
-    $this->assertIdentical('comment', $entity->getType());
-    $this->assertIdentical($comment_type, $entity->getSetting('comment_type'));
+    $this->assertSame('node', $entity->getTargetEntityTypeId());
+    $this->assertSame('comment', $entity->getType());
+    $this->assertSame($comment_type, $entity->getSetting('comment_type'));
   }
 
   /**
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
index 42c2a308bb..9fa3e5544f 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
@@ -53,19 +53,19 @@ public function testCommentMigration() {
     $comment = Comment::load(1);
     $this->assertTrue($comment instanceof CommentInterface);
     /** @var \Drupal\comment\CommentInterface $comment */
-    $this->assertIdentical('A comment', $comment->getSubject());
-    $this->assertIdentical('1421727536', $comment->getCreatedTime());
-    $this->assertIdentical('1421727536', $comment->getChangedTime());
+    $this->assertSame('A comment', $comment->getSubject());
+    $this->assertSame('1421727536', $comment->getCreatedTime());
+    $this->assertSame('1421727536', $comment->getChangedTime());
     $this->assertTrue($comment->getStatus());
-    $this->assertIdentical('admin', $comment->getAuthorName());
-    $this->assertIdentical('admin@local.host', $comment->getAuthorEmail());
-    $this->assertIdentical('This is a comment', $comment->comment_body->value);
-    $this->assertIdentical('filtered_html', $comment->comment_body->format);
+    $this->assertSame('admin', $comment->getAuthorName());
+    $this->assertSame('admin@local.host', $comment->getAuthorEmail());
+    $this->assertSame('This is a comment', $comment->comment_body->value);
+    $this->assertSame('filtered_html', $comment->comment_body->format);
     $this->assertEquals('2001:db8:ffff:ffff:ffff:ffff:ffff:ffff', $comment->getHostname());
 
     $node = $comment->getCommentedEntity();
     $this->assertTrue($node instanceof NodeInterface);
-    $this->assertIdentical('1', $node->id());
+    $this->assertSame('1', $node->id());
   }
 
 }
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
index 60f640d297..8a8885fd9f 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
@@ -39,8 +39,8 @@ protected function assertEntity($id, $label) {
     $entity = CommentType::load($id);
     $this->assertTrue($entity instanceof CommentTypeInterface);
     /** @var \Drupal\comment\CommentTypeInterface $entity */
-    $this->assertIdentical($label, $entity->label());
-    $this->assertIdentical('node', $entity->getTargetEntityTypeId());
+    $this->assertSame($label, $entity->label());
+    $this->assertSame('node', $entity->getTargetEntityTypeId());
   }
 
   /**
@@ -56,7 +56,7 @@ public function testMigration() {
 
     $migration = $this->getMigration('d7_comment_type');
     // Validate that the source count and processed count match up.
-    $this->assertIdentical($migration->getSourcePlugin()->count(), $migration->getIdMap()->processedCount());
+    $this->assertSame($migration->getSourcePlugin()->count(), $migration->getIdMap()->processedCount());
   }
 
 }
diff --git a/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php b/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php
index 044144483a..38e25b6de1 100644
--- a/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php
+++ b/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php
@@ -31,7 +31,7 @@ public function assertConfigEntityImport(ConfigEntityInterface $entity) {
     $entity->delete();
     $this->configImporter()->reset()->import();
     $imported_entity = \Drupal::entityManager()->loadEntityByUuid($entity_type_id, $entity_uuid);
-    $this->assertIdentical($original_data, $imported_entity->toArray());
+    $this->assertSame($original_data, $imported_entity->toArray());
   }
 
 }
diff --git a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php b/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php
index 41419b031e..6412f178ab 100644
--- a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php
+++ b/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php
@@ -46,7 +46,7 @@ public function testFormsWithOverrides() {
     // Test that the original label on the editing page is intact.
     $this->drupalGet('admin/structure/config_test/manage/dotted.default');
     $elements = $this->xpath('//input[@name="label"]');
-    $this->assertIdentical((string) $elements[0]['value'], $original_label);
+    $this->assertSame((string) $elements[0]['value'], $original_label);
     $this->assertNoText($overridden_label);
 
     // Change to a new label and test that the listing now has the edited label.
@@ -61,7 +61,7 @@ public function testFormsWithOverrides() {
     // Test that the editing page now has the edited label.
     $this->drupalGet('admin/structure/config_test/manage/dotted.default');
     $elements = $this->xpath('//input[@name="label"]');
-    $this->assertIdentical((string) $elements[0]['value'], $edited_label);
+    $this->assertSame((string) $elements[0]['value'], $edited_label);
 
     // Test that the overridden label is still loaded with the entity.
     $this->assertEqual($config_test_storage->load('dotted.default')->label(), $overridden_label);
diff --git a/core/modules/config/src/Tests/ConfigEntityListTest.php b/core/modules/config/src/Tests/ConfigEntityListTest.php
index 46c0c064b6..7d2d19d24a 100644
--- a/core/modules/config/src/Tests/ConfigEntityListTest.php
+++ b/core/modules/config/src/Tests/ConfigEntityListTest.php
@@ -117,7 +117,7 @@ public function testList() {
     ]);
     $entity->save();
     $list = $controller->load();
-    $this->assertIdentical(array_keys($list), ['beta', 'dotted.default', 'alpha', 'omega']);
+    $this->assertSame(array_keys($list), ['beta', 'dotted.default', 'alpha', 'omega']);
 
     // Test that config entities that do not support status, do not have
     // enable/disable operations.
@@ -171,7 +171,7 @@ public function testListUI() {
     // Test the contents of each th cell.
     $expected_items = ['Label', 'Machine name', 'Operations'];
     foreach ($elements as $key => $element) {
-      $this->assertIdentical((string) $element[0], $expected_items[$key]);
+      $this->assertSame((string) $element[0], $expected_items[$key]);
     }
 
     // Check the number of table row cells.
@@ -181,8 +181,8 @@ public function testListUI() {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical((string) $elements[0], 'Default');
-    $this->assertIdentical((string) $elements[1], 'dotted.default');
+    $this->assertSame((string) $elements[0], 'Default');
+    $this->assertSame((string) $elements[1], 'dotted.default');
     $this->assertTrue($elements[2]->children()->xpath('//ul'), 'Operations list found.');
 
     // Add a new entity using the operations link.
diff --git a/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/src/Tests/ConfigEntityTest.php
index 2cd47ff8bf..c258f3531a 100644
--- a/core/modules/config/src/Tests/ConfigEntityTest.php
+++ b/core/modules/config/src/Tests/ConfigEntityTest.php
@@ -37,26 +37,26 @@ public function testCRUD() {
     // Verify default properties on a newly created empty entity.
     $empty = entity_create('config_test');
     $this->assertTrue($empty->uuid());
-    $this->assertIdentical($empty->label, NULL);
-    $this->assertIdentical($empty->style, NULL);
-    $this->assertIdentical($empty->language()->getId(), $default_langcode);
+    $this->assertSame($empty->label, NULL);
+    $this->assertSame($empty->style, NULL);
+    $this->assertSame($empty->language()->getId(), $default_langcode);
 
     // Verify ConfigEntity properties/methods on the newly created empty entity.
-    $this->assertIdentical($empty->isNew(), TRUE);
-    $this->assertIdentical($empty->getOriginalId(), NULL);
-    $this->assertIdentical($empty->bundle(), 'config_test');
-    $this->assertIdentical($empty->id(), NULL);
+    $this->assertSame($empty->isNew(), TRUE);
+    $this->assertSame($empty->getOriginalId(), NULL);
+    $this->assertSame($empty->bundle(), 'config_test');
+    $this->assertSame($empty->id(), NULL);
     $this->assertTrue($empty->uuid());
-    $this->assertIdentical($empty->label(), NULL);
+    $this->assertSame($empty->label(), NULL);
 
-    $this->assertIdentical($empty->get('id'), NULL);
+    $this->assertSame($empty->get('id'), NULL);
     $this->assertTrue($empty->get('uuid'));
-    $this->assertIdentical($empty->get('label'), NULL);
-    $this->assertIdentical($empty->get('style'), NULL);
-    $this->assertIdentical($empty->language()->getId(), $default_langcode);
+    $this->assertSame($empty->get('label'), NULL);
+    $this->assertSame($empty->get('style'), NULL);
+    $this->assertSame($empty->language()->getId(), $default_langcode);
 
     // Verify Entity properties/methods on the newly created empty entity.
-    $this->assertIdentical($empty->getEntityTypeId(), 'config_test');
+    $this->assertSame($empty->getEntityTypeId(), 'config_test');
     // The URI can only be checked after saving.
     try {
       $empty->urlInfo();
@@ -79,7 +79,7 @@ public function testCRUD() {
     $empty_id = entity_create('config_test', [
       'id' => '',
     ]);
-    $this->assertIdentical($empty_id->isNew(), TRUE);
+    $this->assertSame($empty_id->isNew(), TRUE);
     try {
       $empty_id->save();
       $this->fail('EntityMalformedException was thrown.');
@@ -96,17 +96,17 @@ public function testCRUD() {
     ]);
     $this->assertTrue($config_test->uuid());
     $this->assertNotEqual($config_test->uuid(), $empty->uuid());
-    $this->assertIdentical($config_test->label, $expected['label']);
-    $this->assertIdentical($config_test->style, $expected['style']);
-    $this->assertIdentical($config_test->language()->getId(), $default_langcode);
+    $this->assertSame($config_test->label, $expected['label']);
+    $this->assertSame($config_test->style, $expected['style']);
+    $this->assertSame($config_test->language()->getId(), $default_langcode);
 
     // Verify methods on the newly created entity.
-    $this->assertIdentical($config_test->isNew(), TRUE);
-    $this->assertIdentical($config_test->getOriginalId(), $expected['id']);
-    $this->assertIdentical($config_test->id(), $expected['id']);
+    $this->assertSame($config_test->isNew(), TRUE);
+    $this->assertSame($config_test->getOriginalId(), $expected['id']);
+    $this->assertSame($config_test->id(), $expected['id']);
     $this->assertTrue($config_test->uuid());
     $expected['uuid'] = $config_test->uuid();
-    $this->assertIdentical($config_test->label(), $expected['label']);
+    $this->assertSame($config_test->label(), $expected['label']);
 
     // Verify that the entity can be saved.
     try {
@@ -118,24 +118,24 @@ public function testCRUD() {
     }
 
     // The entity path can only be checked after saving.
-    $this->assertIdentical($config_test->url(), Url::fromRoute('entity.config_test.edit_form', ['config_test' => $expected['id']])->toString());
+    $this->assertSame($config_test->url(), Url::fromRoute('entity.config_test.edit_form', ['config_test' => $expected['id']])->toString());
 
     // Verify that the correct status is returned and properties did not change.
-    $this->assertIdentical($status, SAVED_NEW);
-    $this->assertIdentical($config_test->id(), $expected['id']);
-    $this->assertIdentical($config_test->uuid(), $expected['uuid']);
-    $this->assertIdentical($config_test->label(), $expected['label']);
-    $this->assertIdentical($config_test->isNew(), FALSE);
-    $this->assertIdentical($config_test->getOriginalId(), $expected['id']);
+    $this->assertSame($status, SAVED_NEW);
+    $this->assertSame($config_test->id(), $expected['id']);
+    $this->assertSame($config_test->uuid(), $expected['uuid']);
+    $this->assertSame($config_test->label(), $expected['label']);
+    $this->assertSame($config_test->isNew(), FALSE);
+    $this->assertSame($config_test->getOriginalId(), $expected['id']);
 
     // Save again, and verify correct status and properties again.
     $status = $config_test->save();
-    $this->assertIdentical($status, SAVED_UPDATED);
-    $this->assertIdentical($config_test->id(), $expected['id']);
-    $this->assertIdentical($config_test->uuid(), $expected['uuid']);
-    $this->assertIdentical($config_test->label(), $expected['label']);
-    $this->assertIdentical($config_test->isNew(), FALSE);
-    $this->assertIdentical($config_test->getOriginalId(), $expected['id']);
+    $this->assertSame($status, SAVED_UPDATED);
+    $this->assertSame($config_test->id(), $expected['id']);
+    $this->assertSame($config_test->uuid(), $expected['uuid']);
+    $this->assertSame($config_test->label(), $expected['label']);
+    $this->assertSame($config_test->isNew(), FALSE);
+    $this->assertSame($config_test->getOriginalId(), $expected['id']);
 
     // Verify that a configuration entity can be saved with an ID of the
     // maximum allowed length, but not longer.
@@ -191,7 +191,7 @@ public function testCRUD() {
     $same_id = entity_create('config_test', [
       'id' => $config_test->id(),
     ]);
-    $this->assertIdentical($same_id->isNew(), TRUE);
+    $this->assertSame($same_id->isNew(), TRUE);
     try {
       $same_id->save();
       $this->fail('Not possible to overwrite an entity entity.');
@@ -206,19 +206,19 @@ public function testCRUD() {
       $old_id = $ids[$i - 1];
       $new_id = $ids[$i];
       // Before renaming, everything should point to the current ID.
-      $this->assertIdentical($config_test->id(), $old_id);
-      $this->assertIdentical($config_test->getOriginalId(), $old_id);
+      $this->assertSame($config_test->id(), $old_id);
+      $this->assertSame($config_test->getOriginalId(), $old_id);
 
       // Rename.
       $config_test->set('id', $new_id);
-      $this->assertIdentical($config_test->id(), $new_id);
+      $this->assertSame($config_test->id(), $new_id);
       $status = $config_test->save();
-      $this->assertIdentical($status, SAVED_UPDATED);
-      $this->assertIdentical($config_test->isNew(), FALSE);
+      $this->assertSame($status, SAVED_UPDATED);
+      $this->assertSame($config_test->isNew(), FALSE);
 
       // Verify that originalID points to new ID directly after renaming.
-      $this->assertIdentical($config_test->id(), $new_id);
-      $this->assertIdentical($config_test->getOriginalId(), $new_id);
+      $this->assertSame($config_test->id(), $new_id);
+      $this->assertSame($config_test->getOriginalId(), $new_id);
     }
 
     // Test config entity prepopulation.
diff --git a/core/modules/config/src/Tests/ConfigExportUITest.php b/core/modules/config/src/Tests/ConfigExportUITest.php
index c9f53b36fd..3c3740d55b 100644
--- a/core/modules/config/src/Tests/ConfigExportUITest.php
+++ b/core/modules/config/src/Tests/ConfigExportUITest.php
@@ -76,10 +76,10 @@ public function testExport() {
     }
     // Assert that the downloaded archive file contents are the same as the test
     // site active store.
-    $this->assertIdentical($archive_contents, $config_files);
+    $this->assertSame($archive_contents, $config_files);
 
     // Ensure the test configuration override is in effect but was not exported.
-    $this->assertIdentical(\Drupal::config('system.maintenance')->get('message'), 'Foo');
+    $this->assertSame(\Drupal::config('system.maintenance')->get('message'), 'Foo');
     $archiver->extract(file_directory_temp(), ['system.maintenance.yml']);
     $file_contents = file_get_contents(file_directory_temp() . '/' . 'system.maintenance.yml');
     $exported = Yaml::decode($file_contents);
diff --git a/core/modules/config/src/Tests/ConfigFormOverrideTest.php b/core/modules/config/src/Tests/ConfigFormOverrideTest.php
index f721eeba74..afb8a328f4 100644
--- a/core/modules/config/src/Tests/ConfigFormOverrideTest.php
+++ b/core/modules/config/src/Tests/ConfigFormOverrideTest.php
@@ -32,7 +32,7 @@ public function testFormsWithOverrides() {
     $this->drupalGet('admin/config/system/site-information');
     $this->assertTitle('Basic site settings | ' . $overridden_name);
     $elements = $this->xpath('//input[@name="site_name"]');
-    $this->assertIdentical((string) $elements[0]['value'], 'Drupal');
+    $this->assertSame((string) $elements[0]['value'], 'Drupal');
 
     // Submit the form and ensure the site name is not changed.
     $edit = [
@@ -41,7 +41,7 @@ public function testFormsWithOverrides() {
     $this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration'));
     $this->assertTitle('Basic site settings | ' . $overridden_name);
     $elements = $this->xpath('//input[@name="site_name"]');
-    $this->assertIdentical((string) $elements[0]['value'], $edit['site_name']);
+    $this->assertSame((string) $elements[0]['value'], $edit['site_name']);
   }
 
 }
diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/src/Tests/ConfigImportAllTest.php
index 459be7a24f..8bed0d9ccf 100644
--- a/core/modules/config/src/Tests/ConfigImportAllTest.php
+++ b/core/modules/config/src/Tests/ConfigImportAllTest.php
@@ -129,7 +129,7 @@ public function testInstallUninstall() {
     $this->rebuildContainer();
 
     // Check that there are no errors.
-    $this->assertIdentical($this->configImporter()->getErrors(), []);
+    $this->assertSame($this->configImporter()->getErrors(), []);
 
     // Check that all modules that were uninstalled are now reinstalled.
     $this->assertModules(array_keys($modules_to_uninstall), TRUE);
@@ -144,7 +144,7 @@ public function testInstallUninstall() {
       $this->container->get('config.storage'),
       $this->container->get('config.manager')
     );
-    $this->assertIdentical($storage_comparer->createChangelist()->getChangelist(), $storage_comparer->getEmptyChangelist());
+    $this->assertSame($storage_comparer->createChangelist()->getChangelist(), $storage_comparer->getEmptyChangelist());
 
     // Now we have all configuration imported, test all of them for schema
     // conformance. Ensures all imported default configuration is valid when
diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php
index 772dadadd2..411474bb68 100644
--- a/core/modules/config/src/Tests/ConfigImportUITest.php
+++ b/core/modules/config/src/Tests/ConfigImportUITest.php
@@ -52,7 +52,7 @@ public function testImport() {
     // Create updated configuration object.
     $new_site_name = 'Config import test ' . $this->randomString();
     $this->prepareSiteNameUpdate($new_site_name);
-    $this->assertIdentical($sync->exists($name), TRUE, $name . ' found.');
+    $this->assertSame($sync->exists($name), TRUE, $name . ' found.');
 
     // Create new config entity.
     $original_dynamic_data = [
@@ -69,7 +69,7 @@ public function testImport() {
       'protected_property' => '',
     ];
     $sync->write($dynamic_name, $original_dynamic_data);
-    $this->assertIdentical($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.');
+    $this->assertSame($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.');
 
     // Enable the Action and Ban modules during import. The Ban
     // module is used because it creates a table during the install. The Action
@@ -131,10 +131,10 @@ public function testImport() {
     $this->assertText(t('There are no configuration changes to import.'));
 
     // Verify site name has changed.
-    $this->assertIdentical($new_site_name, $this->config('system.site')->get('name'));
+    $this->assertSame($new_site_name, $this->config('system.site')->get('name'));
 
     // Verify that new config entity exists.
-    $this->assertIdentical($original_dynamic_data, $this->config($dynamic_name)->get());
+    $this->assertSame($original_dynamic_data, $this->config($dynamic_name)->get());
 
     // Verify the cache got cleared.
     $this->assertTrue(isset($GLOBALS['hook_cache_flush']));
@@ -153,7 +153,7 @@ public function testImport() {
     $installed = \Drupal::state()->get('ConfigImportUITest.core.extension.modules_installed', []);
     $uninstalled = \Drupal::state()->get('ConfigImportUITest.core.extension.modules_uninstalled', []);
     $expected = ['action', 'ban', 'text', 'options'];
-    $this->assertIdentical($expected, $installed, 'Action, Ban, Text and Options modules installed in the correct order.');
+    $this->assertSame($expected, $installed, 'Action, Ban, Text and Options modules installed in the correct order.');
     $this->assertTrue(empty($uninstalled), 'No modules uninstalled during import');
 
     // Verify that the action.settings configuration object was only written
@@ -162,7 +162,7 @@ public function testImport() {
     // used during configuration import and, additionally, that after installing
     // a module, that configuration is not synced twice.
     $recursion_limit_values = \Drupal::state()->get('ConfigImportUITest.action.settings.recursion_limit', []);
-    $this->assertIdentical($recursion_limit_values, [50]);
+    $this->assertSame($recursion_limit_values, [50]);
 
     $core_extension = $this->config('core.extension')->get();
     unset($core_extension['module']['action']);
@@ -206,7 +206,7 @@ public function testImport() {
     $installed = \Drupal::state()->get('ConfigImportUITest.core.extension.modules_installed', []);
     $uninstalled = \Drupal::state()->get('ConfigImportUITest.core.extension.modules_uninstalled', []);
     $expected = ['options', 'text', 'ban', 'action'];
-    $this->assertIdentical($expected, $uninstalled, 'Options, Text, Ban and Action modules uninstalled in the correct order.');
+    $this->assertSame($expected, $uninstalled, 'Options, Text, Ban and Action modules uninstalled in the correct order.');
     $this->assertTrue(empty($installed), 'No modules installed during import');
 
     $theme_info = \Drupal::service('theme_handler')->listInfo();
@@ -215,7 +215,7 @@ public function testImport() {
     // Verify that the action.settings configuration object was only deleted
     // once during the import process.
     $delete_called = \Drupal::state()->get('ConfigImportUITest.action.settings.delete', 0);
-    $this->assertIdentical($delete_called, 1, "The action.settings configuration was deleted once during configuration import.");
+    $this->assertSame($delete_called, 1, "The action.settings configuration was deleted once during configuration import.");
   }
 
   /**
diff --git a/core/modules/config/src/Tests/ConfigInstallWebTest.php b/core/modules/config/src/Tests/ConfigInstallWebTest.php
index 63ecb5bb68..762844457d 100644
--- a/core/modules/config/src/Tests/ConfigInstallWebTest.php
+++ b/core/modules/config/src/Tests/ConfigInstallWebTest.php
@@ -45,9 +45,9 @@ public function testIntegrationModuleReinstallation() {
 
     // Verify the configuration does not exist prior to installation.
     $config_static = $this->config($default_config);
-    $this->assertIdentical($config_static->isNew(), TRUE);
+    $this->assertSame($config_static->isNew(), TRUE);
     $config_entity = $this->config($default_configuration_entity);
-    $this->assertIdentical($config_entity->isNew(), TRUE);
+    $this->assertSame($config_entity->isNew(), TRUE);
 
     // Install the integration module.
     \Drupal::service('module_installer')->install(['config_integration_test']);
@@ -56,11 +56,11 @@ public function testIntegrationModuleReinstallation() {
     \Drupal::configFactory()->reset($default_config);
     \Drupal::configFactory()->reset($default_configuration_entity);
     $config_static = $this->config($default_config);
-    $this->assertIdentical($config_static->isNew(), FALSE);
-    $this->assertIdentical($config_static->get('foo'), 'default setting');
+    $this->assertSame($config_static->isNew(), FALSE);
+    $this->assertSame($config_static->get('foo'), 'default setting');
     $config_entity = $this->config($default_configuration_entity);
-    $this->assertIdentical($config_entity->isNew(), FALSE);
-    $this->assertIdentical($config_entity->get('label'), 'Default integration config label');
+    $this->assertSame($config_entity->isNew(), FALSE);
+    $this->assertSame($config_entity->get('label'), 'Default integration config label');
 
     // Customize both configuration objects.
     $config_static->set('foo', 'customized setting')->save();
@@ -77,12 +77,12 @@ public function testIntegrationModuleReinstallation() {
 
     // Verify the integration module's config was uninstalled.
     $config_static = $this->config($default_config);
-    $this->assertIdentical($config_static->isNew(), TRUE);
+    $this->assertSame($config_static->isNew(), TRUE);
 
     // Verify the integration config still exists.
     $config_entity = $this->config($default_configuration_entity);
-    $this->assertIdentical($config_entity->isNew(), FALSE);
-    $this->assertIdentical($config_entity->get('label'), 'Customized integration config label');
+    $this->assertSame($config_entity->isNew(), FALSE);
+    $this->assertSame($config_entity->get('label'), 'Customized integration config label');
 
     // Reinstall the integration module.
     try {
@@ -103,13 +103,13 @@ public function testIntegrationModuleReinstallation() {
     \Drupal::configFactory()->reset($default_config);
     \Drupal::configFactory()->reset($default_configuration_entity);
     $config_static = $this->config($default_config);
-    $this->assertIdentical($config_static->isNew(), FALSE);
-    $this->assertIdentical($config_static->get('foo'), 'default setting');
+    $this->assertSame($config_static->isNew(), FALSE);
+    $this->assertSame($config_static->get('foo'), 'default setting');
 
     // Verify the integration config is using the default.
     $config_entity = \Drupal::config($default_configuration_entity);
-    $this->assertIdentical($config_entity->isNew(), FALSE);
-    $this->assertIdentical($config_entity->get('label'), 'Default integration config label');
+    $this->assertSame($config_entity->isNew(), FALSE);
+    $this->assertSame($config_entity->get('label'), 'Default integration config label');
   }
 
   /**
diff --git a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php b/core/modules/config/src/Tests/ConfigSingleImportExportTest.php
index 607e80c23b..3d67a1e015 100644
--- a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php
+++ b/core/modules/config/src/Tests/ConfigSingleImportExportTest.php
@@ -72,8 +72,8 @@ public function testImport() {
     $this->assertRaw(t('Are you sure you want to create a new %name @type?', ['%name' => 'first', '@type' => 'test configuration']));
     $this->drupalPostForm(NULL, [], t('Confirm'));
     $entity = $storage->load('first');
-    $this->assertIdentical($entity->label(), 'First');
-    $this->assertIdentical($entity->id(), 'first');
+    $this->assertSame($entity->label(), 'First');
+    $this->assertSame($entity->id(), 'first');
     $this->assertTrue($entity->status());
     $this->assertRaw(t('The configuration was imported successfully.'));
 
@@ -112,10 +112,10 @@ public function testImport() {
     $this->drupalPostForm(NULL, [], t('Confirm'));
     $entity = $storage->load('second');
     $this->assertRaw(t('The configuration was imported successfully.'));
-    $this->assertIdentical($entity->label(), 'Second');
-    $this->assertIdentical($entity->id(), 'second');
+    $this->assertSame($entity->label(), 'Second');
+    $this->assertSame($entity->id(), 'second');
     $this->assertFalse($entity->status());
-    $this->assertIdentical($entity->uuid(), $second_uuid);
+    $this->assertSame($entity->uuid(), $second_uuid);
 
     // Perform an update.
     $import = <<<EOD
@@ -135,7 +135,7 @@ public function testImport() {
     $this->drupalPostForm(NULL, [], t('Confirm'));
     $entity = $storage->load('second');
     $this->assertRaw(t('The configuration was imported successfully.'));
-    $this->assertIdentical($entity->label(), 'Second updated');
+    $this->assertSame($entity->label(), 'Second updated');
 
     // Try to perform an update which adds missing dependencies.
     $import = <<<EOD
@@ -231,7 +231,7 @@ public function testExport() {
     foreach ($options as &$option) {
       $option = (string) $option;
     }
-    $this->assertIdentical($expected_options, array_intersect($expected_options, $options), 'The expected configuration files are listed.');
+    $this->assertSame($expected_options, array_intersect($expected_options, $options), 'The expected configuration files are listed.');
 
     $this->drupalGet('admin/config/development/configuration/single/export/system.simple/system.image');
     $this->assertFieldByXPath('//textarea[@name="export"]', "toolkit: gd\n_core:\n  default_config_hash: durWHaKeBaq4d9Wpi4RqwADj1OufDepcnJuhVLmKN24\n", 'The expected system configuration is displayed.');
diff --git a/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php
index 1f5232c939..66e5be3d24 100644
--- a/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php
@@ -55,12 +55,12 @@ public function testInstallProfileConfigOverwrite() {
     $this->assertTrue(is_dir($config_dir));
     $source_storage = new FileStorage($config_dir);
     $data = $source_storage->read($config_name);
-    $this->assertIdentical($data, $expected_original_data);
+    $this->assertSame($data, $expected_original_data);
 
     // Verify that active configuration matches the expected data, which was
     // created from the testing install profile's system.cron.yml file.
     $config = $this->config($config_name);
-    $this->assertIdentical($config->get(), $expected_profile_data);
+    $this->assertSame($config->get(), $expected_profile_data);
 
     // Ensure that the configuration entity has the expected dependencies and
     // overrides.
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
index 55b02dca75..4aee428f82 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
@@ -77,7 +77,7 @@ public function testMapperListPage() {
     // Make sure there is only a single operation for each dropbutton, either
     // 'List' or 'Translate'.
     foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-      $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
+      $this->assertSame(1, count($dropbutton->find('xpath', 'li')));
       $this->assertTrue(($dropbutton->getText() === 'Translate') || ($dropbutton->getText() === 'List'));
     }
 
@@ -102,8 +102,8 @@ public function testMapperListPage() {
       // Make sure there is only a single 'Translate' operation for each
       // dropbutton.
       foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-        $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
-        $this->assertIdentical('Translate', $dropbutton->getText());
+        $this->assertSame(1, count($dropbutton->find('xpath', 'li')));
+        $this->assertSame('Translate', $dropbutton->getText());
       }
 
       $entity_type = \Drupal::entityManager()->getDefinition($test_entity->getEntityTypeId());
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
index 37cd4a9ec2..ed662557cb 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
@@ -27,7 +27,7 @@ protected function setUp() {
    */
   public function testSystemMaintenance() {
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'system.maintenance');
-    $this->assertIdentical('fr - Drupal is currently under maintenance. We should be back shortly. Thank you for your patience.', $config->get('message'));
+    $this->assertSame('fr - Drupal is currently under maintenance. We should be back shortly. Thank you for your patience.', $config->get('message'));
   }
 
 }
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php
index 326e1bb7e4..218380ec3d 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php
@@ -27,22 +27,22 @@ protected function setUp() {
    */
   public function testSystemSite() {
     $config_translation = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'system.site');
-    $this->assertIdentical('fr site name', $config_translation->get('name'));
-    $this->assertIdentical('fr_site_mail@example.com', $config_translation->get('mail'));
-    $this->assertIdentical('fr Migrate rocks', $config_translation->get('slogan'));
-    $this->assertIdentical('/fr-user', $config_translation->get('page.403'));
-    $this->assertIdentical('/fr-page-not-found', $config_translation->get('page.404'));
-    $this->assertIdentical('/node', $config_translation->get('page.front'));
-    $this->assertIdentical(NULL, $config_translation->get('admin_compact_mode'));
+    $this->assertSame('fr site name', $config_translation->get('name'));
+    $this->assertSame('fr_site_mail@example.com', $config_translation->get('mail'));
+    $this->assertSame('fr Migrate rocks', $config_translation->get('slogan'));
+    $this->assertSame('/fr-user', $config_translation->get('page.403'));
+    $this->assertSame('/fr-page-not-found', $config_translation->get('page.404'));
+    $this->assertSame('/node', $config_translation->get('page.front'));
+    $this->assertSame(NULL, $config_translation->get('admin_compact_mode'));
 
     $config_translation = \Drupal::service('language_manager')->getLanguageConfigOverride('zu', 'system.site');
-    $this->assertIdentical('zu - site_name', $config_translation->get('name'));
-    $this->assertIdentical('site_mail@example.com', $config_translation->get('mail'));
-    $this->assertIdentical('Migrate rocks', $config_translation->get('slogan'));
-    $this->assertIdentical('/zu-user', $config_translation->get('page.403'));
-    $this->assertIdentical('/zu-page-not-found', $config_translation->get('page.404'));
-    $this->assertIdentical('/node', $config_translation->get('page.front'));
-    $this->assertIdentical(NULL, $config_translation->get('admin_compact_mode'));
+    $this->assertSame('zu - site_name', $config_translation->get('name'));
+    $this->assertSame('site_mail@example.com', $config_translation->get('mail'));
+    $this->assertSame('Migrate rocks', $config_translation->get('slogan'));
+    $this->assertSame('/zu-user', $config_translation->get('page.403'));
+    $this->assertSame('/zu-page-not-found', $config_translation->get('page.404'));
+    $this->assertSame('/node', $config_translation->get('page.front'));
+    $this->assertSame(NULL, $config_translation->get('admin_compact_mode'));
   }
 
 }
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php
index bc622e1b6a..9c5b413b1b 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php
@@ -32,25 +32,25 @@ protected function setUp() {
    */
   public function testUserMail() {
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'user.mail');
-    $this->assertIdentical('fr - Account details for [user:name] at [site:name] (approved)', $config->get('status_activated.subject'));
-    $this->assertIdentical("fr - [user:name],\r\n\r\nYour account at [site:name] has been activated.\r\n\r\nYou may now log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\nOnce you have set your own password, you will be able to log in to [site:login-url] in the future using:\r\n\r\nusername: [user:name]\r\n", $config->get('status_activated.body'));
-    $this->assertIdentical('fr - Replacement login information for [user:name] at [site:name]', $config->get('password_reset.subject'));
-    $this->assertIdentical("fr - [user:name],\r\n\r\nA request to reset the password for your account has been made at [site:name].\r\n\r\nYou may now log in to [site:url-brief] by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.", $config->get('password_reset.body'));
-    $this->assertIdentical('fr - Account details for [user:name] at [site:name] (deleted)', $config->get('cancel_confirm.subject'));
-    $this->assertIdentical("fr - [user:name],\r\n\r\nYour account on [site:name] has been deleted.", $config->get('cancel_confirm.body'));
-    $this->assertIdentical('fr - An administrator created an account for you at [site:name]', $config->get('register_admin_created.subject'));
-    $this->assertIdentical("fr - [user:name],\r\n\r\nA site administrator at [site:name] has created an account for you. You may now log in to [site:login-url] using the following username and password:\r\n\r\nusername: [user:name]\r\npassword: \r\n\r\nYou may also log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\n\r\n--  [site:name] team", $config->get('register_admin_created.body'));
-    $this->assertIdentical('fr - Account details for [user:name] at [site:name]', $config->get('register_no_approval_required.subject'));
-    $this->assertIdentical("fr - [user:name],\r\n\r\nThank you for registering at [site:name]. You may now log in to [site:login-url] using the following username and password:\r\n\r\nusername: [user:name]\r\npassword: \r\n\r\nYou may also log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\n\r\n--  [site:name] team", $config->get('register_no_approval_required.body'));
-    $this->assertIdentical('fr - Account details for [user:name] at [site:name] (pending admin approval)', $config->get('register_pending_approval.subject'));
-    $this->assertIdentical("fr - [user:name],\r\n\r\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\r\n\r\n\r\n--  [site:name] team", $config->get('register_pending_approval.body'));
-    $this->assertIdentical('fr - Account details for [user:name] at [site:name] (blocked)', $config->get('status_blocked.subject'));
-    $this->assertIdentical("fr - [user:name],\r\n\r\nYour account on [site:name] has been blocked.", $config->get('status_blocked.body'));
+    $this->assertSame('fr - Account details for [user:name] at [site:name] (approved)', $config->get('status_activated.subject'));
+    $this->assertSame("fr - [user:name],\r\n\r\nYour account at [site:name] has been activated.\r\n\r\nYou may now log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\nOnce you have set your own password, you will be able to log in to [site:login-url] in the future using:\r\n\r\nusername: [user:name]\r\n", $config->get('status_activated.body'));
+    $this->assertSame('fr - Replacement login information for [user:name] at [site:name]', $config->get('password_reset.subject'));
+    $this->assertSame("fr - [user:name],\r\n\r\nA request to reset the password for your account has been made at [site:name].\r\n\r\nYou may now log in to [site:url-brief] by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.", $config->get('password_reset.body'));
+    $this->assertSame('fr - Account details for [user:name] at [site:name] (deleted)', $config->get('cancel_confirm.subject'));
+    $this->assertSame("fr - [user:name],\r\n\r\nYour account on [site:name] has been deleted.", $config->get('cancel_confirm.body'));
+    $this->assertSame('fr - An administrator created an account for you at [site:name]', $config->get('register_admin_created.subject'));
+    $this->assertSame("fr - [user:name],\r\n\r\nA site administrator at [site:name] has created an account for you. You may now log in to [site:login-url] using the following username and password:\r\n\r\nusername: [user:name]\r\npassword: \r\n\r\nYou may also log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\n\r\n--  [site:name] team", $config->get('register_admin_created.body'));
+    $this->assertSame('fr - Account details for [user:name] at [site:name]', $config->get('register_no_approval_required.subject'));
+    $this->assertSame("fr - [user:name],\r\n\r\nThank you for registering at [site:name]. You may now log in to [site:login-url] using the following username and password:\r\n\r\nusername: [user:name]\r\npassword: \r\n\r\nYou may also log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\n\r\n--  [site:name] team", $config->get('register_no_approval_required.body'));
+    $this->assertSame('fr - Account details for [user:name] at [site:name] (pending admin approval)', $config->get('register_pending_approval.subject'));
+    $this->assertSame("fr - [user:name],\r\n\r\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\r\n\r\n\r\n--  [site:name] team", $config->get('register_pending_approval.body'));
+    $this->assertSame('fr - Account details for [user:name] at [site:name] (blocked)', $config->get('status_blocked.subject'));
+    $this->assertSame("fr - [user:name],\r\n\r\nYour account on [site:name] has been blocked.", $config->get('status_blocked.body'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'user.mail', $config->get());
 
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('zu', 'user.mail');
-    $this->assertIdentical('zu - An administrator created an account for you at [site:name]', $config->get('register_admin_created.subject'));
-    $this->assertIdentical("zu - [user:name],\r\n\r\nA site administrator at [site:name] has created an account for you. You may now log in to [site:login-url] using the following username and password:\r\n\r\nusername: [user:name]\r\npassword: \r\n\r\nYou may also log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\n\r\n--  [site:name] team", $config->get('register_admin_created.body'));
+    $this->assertSame('zu - An administrator created an account for you at [site:name]', $config->get('register_admin_created.subject'));
+    $this->assertSame("zu - [user:name],\r\n\r\nA site administrator at [site:name] has created an account for you. You may now log in to [site:login-url] using the following username and password:\r\n\r\nusername: [user:name]\r\npassword: \r\n\r\nYou may also log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\n\r\n--  [site:name] team", $config->get('register_admin_created.body'));
   }
 
   /**
@@ -58,18 +58,18 @@ public function testUserMail() {
    */
   public function testUserSettings() {
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'user.settings');
-    $this->assertIdentical(1, $config->get('notify.status_blocked'));
-    $this->assertIdentical(0, $config->get('notify.status_activated'));
-    $this->assertIdentical(0, $config->get('verify_mail'));
-    $this->assertIdentical('admin_only', $config->get('register'));
-    $this->assertIdentical('fr Guest', $config->get('anonymous'));
+    $this->assertSame(1, $config->get('notify.status_blocked'));
+    $this->assertSame(0, $config->get('notify.status_activated'));
+    $this->assertSame(0, $config->get('verify_mail'));
+    $this->assertSame('admin_only', $config->get('register'));
+    $this->assertSame('fr Guest', $config->get('anonymous'));
 
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('zu', 'user.settings');
-    $this->assertIdentical(1, $config->get('notify.status_blocked'));
-    $this->assertIdentical(0, $config->get('notify.status_activated'));
-    $this->assertIdentical(0, $config->get('verify_mail'));
-    $this->assertIdentical('admin_only', $config->get('register'));
-    $this->assertIdentical('Guest', $config->get('anonymous'));
+    $this->assertSame(1, $config->get('notify.status_blocked'));
+    $this->assertSame(0, $config->get('notify.status_activated'));
+    $this->assertSame(0, $config->get('verify_mail'));
+    $this->assertSame('admin_only', $config->get('register'));
+    $this->assertSame('Guest', $config->get('anonymous'));
   }
 
 }
diff --git a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
index ffadad409c..921f365eab 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
@@ -46,10 +46,10 @@ protected function assertEntity($id, $expected_label, array $expected_recipients
     /** @var \Drupal\contact\ContactFormInterface $entity */
     $entity = ContactForm::load($id);
     $this->assertTrue($entity instanceof ContactFormInterface);
-    $this->assertIdentical($expected_label, $entity->label());
-    $this->assertIdentical($expected_recipients, $entity->getRecipients());
-    $this->assertIdentical($expected_reply, $entity->getReply());
-    $this->assertIdentical($expected_weight, $entity->getWeight());
+    $this->assertSame($expected_label, $entity->label());
+    $this->assertSame($expected_recipients, $entity->getRecipients());
+    $this->assertSame($expected_reply, $entity->getReply());
+    $this->assertSame($expected_weight, $entity->getWeight());
   }
 
   /**
diff --git a/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
index 073a670283..f85bbc5aad 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
@@ -32,9 +32,9 @@ protected function setUp() {
    */
   public function testContactSettings() {
     $config = $this->config('contact.settings');
-    $this->assertIdentical(TRUE, $config->get('user_default_enabled'));
-    $this->assertIdentical(3, $config->get('flood.limit'));
-    $this->assertIdentical('some_other_category', $config->get('default_form'));
+    $this->assertSame(TRUE, $config->get('user_default_enabled'));
+    $this->assertSame(3, $config->get('flood.limit'));
+    $this->assertSame('some_other_category', $config->get('default_form'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'contact.settings', $config->get());
   }
 
diff --git a/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
index 22385f0e56..bd52b371a8 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
@@ -31,7 +31,7 @@ protected function setUp() {
   public function testContactSettings() {
     $config = $this->config('contact.settings');
     $this->assertTrue($config->get('user_default_enabled'));
-    $this->assertIdentical(33, $config->get('flood.limit'));
+    $this->assertSame(33, $config->get('flood.limit'));
     $this->assertEqual('website_testing', $config->get('default_form'));
   }
 
diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
index 125d68fbd2..10f1893289 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
@@ -81,7 +81,7 @@ public function testContentModerationStateRevisionJoin() {
         'moderation_state' => 'draft',
       ],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, ['vid' => 'vid', 'moderation_state' => 'moderation_state']);
+    $this->assertSameResultset($view, $expected_result, ['vid' => 'vid', 'moderation_state' => 'moderation_state']);
   }
 
   /**
@@ -121,7 +121,7 @@ public function testContentModerationStateBaseJoin() {
         'moderation_state_2' => 'published',
       ],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, ['nid' => 'nid', 'moderation_state' => 'moderation_state', 'moderation_state_1' => 'moderation_state_1', 'moderation_state_2' => 'moderation_state_2']);
+    $this->assertSameResultset($view, $expected_result, ['nid' => 'nid', 'moderation_state' => 'moderation_state', 'moderation_state_1' => 'moderation_state_1', 'moderation_state_2' => 'moderation_state_2']);
   }
 
 }
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
index b8776a26a1..b6bb45e478 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
@@ -66,7 +66,7 @@ public function testConfigImportUpdates() {
     $sync = $this->container->get('config.storage.sync');
 
     // Verify the configuration to create does not exist yet.
-    $this->assertIdentical($storage->exists($config_name), FALSE, $config_name . ' not found.');
+    $this->assertSame($storage->exists($config_name), FALSE, $config_name . ' not found.');
 
     // Create new config entity.
     $data = [
@@ -86,14 +86,14 @@ public function testConfigImportUpdates() {
       ],
     ];
     $sync->write($config_name, $data);
-    $this->assertIdentical($sync->exists($config_name), TRUE, $config_name . ' found.');
+    $this->assertSame($sync->exists($config_name), TRUE, $config_name . ' found.');
 
     // Import.
     $this->configImporter->reset()->import();
 
     // Verify the values appeared.
     $config = $this->config($config_name);
-    $this->assertIdentical($config->get('id'), $config_id);
+    $this->assertSame($config->get('id'), $config_id);
 
     // Verify that updates were performed.
     $entity_type = $this->container->get('entity.manager')->getDefinition($entity_type_id);
diff --git a/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php b/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php
index 00ade5a5ac..caadd25f3a 100644
--- a/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php
+++ b/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php
@@ -95,10 +95,10 @@ public function testDifferentPermissions() {
     $response = $this->renderContextualLinks($ids, 'node');
     $this->assertResponse(200);
     $json = Json::decode($response);
-    $this->assertIdentical($json[$ids[0]], '<ul class="contextual-links"><li class="entitynodeedit-form"><a href="' . base_path() . 'node/1/edit">Edit</a></li></ul>');
-    $this->assertIdentical($json[$ids[1]], '');
-    $this->assertIdentical($json[$ids[2]], '<ul class="contextual-links"><li class="entitynodeedit-form"><a href="' . base_path() . 'node/3/edit">Edit</a></li></ul>');
-    $this->assertIdentical($json[$ids[3]], '');
+    $this->assertSame($json[$ids[0]], '<ul class="contextual-links"><li class="entitynodeedit-form"><a href="' . base_path() . 'node/1/edit">Edit</a></li></ul>');
+    $this->assertSame($json[$ids[1]], '');
+    $this->assertSame($json[$ids[2]], '<ul class="contextual-links"><li class="entitynodeedit-form"><a href="' . base_path() . 'node/3/edit">Edit</a></li></ul>');
+    $this->assertSame($json[$ids[3]], '');
 
     // Verify that link language is properly handled.
     $node3->addTranslation('it')->set('title', $this->randomString())->save();
@@ -118,10 +118,10 @@ public function testDifferentPermissions() {
     $response = $this->renderContextualLinks($ids, 'node');
     $this->assertResponse(200);
     $json = Json::decode($response);
-    $this->assertIdentical($json[$ids[0]], '');
-    $this->assertIdentical($json[$ids[1]], '');
-    $this->assertIdentical($json[$ids[2]], '');
-    $this->assertIdentical($json[$ids[3]], '');
+    $this->assertSame($json[$ids[0]], '');
+    $this->assertSame($json[$ids[1]], '');
+    $this->assertSame($json[$ids[2]], '');
+    $this->assertSame($json[$ids[3]], '');
 
     // Anonymous user: cannot access contextual links.
     $this->drupalLogin($this->anonymousUser);
diff --git a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
index f42bf20f80..9a3acd652b 100644
--- a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
+++ b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
@@ -113,7 +113,7 @@ public function _contextual_links_id_testcases() {
   public function testContextualLinksToId() {
     $tests = $this->_contextual_links_id_testcases();
     foreach ($tests as $test) {
-      $this->assertIdentical(_contextual_links_to_id($test['links']), $test['id']);
+      $this->assertSame(_contextual_links_to_id($test['links']), $test['id']);
     }
   }
 
@@ -123,7 +123,7 @@ public function testContextualLinksToId() {
   public function testContextualIdToLinks() {
     $tests = $this->_contextual_links_id_testcases();
     foreach ($tests as $test) {
-      $this->assertIdentical(_contextual_id_to_links($test['id']), $test['links']);
+      $this->assertSame(_contextual_id_to_links($test['id']), $test['links']);
     }
   }
 
diff --git a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php
index 6145483958..98ef36963d 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php
@@ -55,14 +55,14 @@ public function testDatetimeArgumentYear() {
     $this->executeView($view, ['2000']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[0]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
 
     $view->setDisplay('default');
     $this->executeView($view, ['2002']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[2]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
   }
 
@@ -80,14 +80,14 @@ public function testDatetimeArgumentMonth() {
     $expected = [];
     $expected[] = ['nid' => $this->nodes[0]->id()];
     $expected[] = ['nid' => $this->nodes[1]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
 
     $view->setDisplay('embed_1');
     $this->executeView($view, ['01']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[2]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
   }
 
@@ -105,14 +105,14 @@ public function testDatetimeArgumentDay() {
     $expected = [];
     $expected[] = ['nid' => $this->nodes[0]->id()];
     $expected[] = ['nid' => $this->nodes[1]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
 
     $view->setDisplay('embed_2');
     $this->executeView($view, ['01']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[2]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
   }
 
@@ -127,14 +127,14 @@ public function testDatetimeArgumentAll() {
     $this->executeView($view, ['2000', '10', '10']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[0]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
 
     $view->setDisplay('embed_3');
     $this->executeView($view, ['2002', '01', '01']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[2]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
   }
 
@@ -150,14 +150,14 @@ public function testDatetimeArgumentWeek() {
     $expected = [];
     $expected[] = ['nid' => $this->nodes[0]->id()];
     $expected[] = ['nid' => $this->nodes[1]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
 
     $view->setDisplay('embed_4');
     $this->executeView($view, ['01']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[2]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
   }
 
@@ -172,14 +172,14 @@ public function testDatetimeArgumentFullDate() {
     $this->executeView($view, ['20001010']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[0]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
 
     $view->setDisplay('embed_5');
     $this->executeView($view, ['20020101']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[2]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
   }
 
@@ -194,14 +194,14 @@ public function testDatetimeArgumentYearMonth() {
     $this->executeView($view, ['200010']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[0]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
 
     $view->setDisplay('embed_6');
     $this->executeView($view, ['200201']);
     $expected = [];
     $expected[] = ['nid' => $this->nodes[2]->id()];
-    $this->assertIdenticalResultset($view, $expected, $this->map);
+    $this->assertSameResultset($view, $expected, $this->map);
     $view->destroy();
   }
 
diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php
index 566285e256..a7dd54f61a 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php
@@ -83,7 +83,7 @@ public function testDateOffsets() {
       ['nid' => $this->nodes[0]->id()],
       ['nid' => $this->nodes[1]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Only dates in the past.
@@ -96,7 +96,7 @@ public function testDateOffsets() {
     $expected_result = [
       ['nid' => $this->nodes[2]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test offset for between operator. Only the 'tomorrow' node should appear.
@@ -110,7 +110,7 @@ public function testDateOffsets() {
     $expected_result = [
       ['nid' => $this->nodes[0]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
   }
 
 }
diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
index 1e8e929f33..cac17e44ec 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
@@ -87,7 +87,7 @@ protected function _testOffset() {
     $expected_result = [
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test offset for between operator.
@@ -101,7 +101,7 @@ protected function _testOffset() {
     $expected_result = [
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
   }
 
   /**
@@ -121,7 +121,7 @@ protected function _testBetween() {
     $expected_result = [
       ['nid' => $this->nodes[1]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test between with just max.
@@ -134,7 +134,7 @@ protected function _testBetween() {
       ['nid' => $this->nodes[0]->id()],
       ['nid' => $this->nodes[1]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test not between with min and max.
@@ -150,7 +150,7 @@ protected function _testBetween() {
       ['nid' => $this->nodes[2]->id()],
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test not between with just max.
@@ -164,7 +164,7 @@ protected function _testBetween() {
       ['nid' => $this->nodes[2]->id()],
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
   }
 
   /**
@@ -187,7 +187,7 @@ protected function _testExact() {
     $expected_result = [
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
   }
diff --git a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php
index 7375c4db29..a34399ba05 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php
@@ -68,7 +68,7 @@ public function testDateTimeSort() {
       ['nid' => $this->nodes[2]->id()],
       ['nid' => $this->nodes[1]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Check ASC.
@@ -86,7 +86,7 @@ public function testDateTimeSort() {
       ['nid' => $this->nodes[6]->id()],
       ['nid' => $this->nodes[0]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Change granularity to 'year', and the secondary node ID order should
@@ -105,7 +105,7 @@ public function testDateTimeSort() {
       ['nid' => $this->nodes[5]->id()],
       ['nid' => $this->nodes[6]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Change granularity to 'second'.
@@ -123,7 +123,7 @@ public function testDateTimeSort() {
       ['nid' => $this->nodes[2]->id()],
       ['nid' => $this->nodes[1]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
   }
 
diff --git a/core/modules/dblog/tests/src/Functional/Update/DblogRecentLogsUsingViewsUpdateTest.php b/core/modules/dblog/tests/src/Functional/Update/DblogRecentLogsUsingViewsUpdateTest.php
index 851c15ee71..72da8e6672 100644
--- a/core/modules/dblog/tests/src/Functional/Update/DblogRecentLogsUsingViewsUpdateTest.php
+++ b/core/modules/dblog/tests/src/Functional/Update/DblogRecentLogsUsingViewsUpdateTest.php
@@ -34,7 +34,7 @@ public function testUpdate() {
     $view = \Drupal::entityTypeManager()->getStorage('view')->load('watchdog');
     $displays = $view->get('display');
 
-    $this->assertIdentical($displays['page']['display_options']['path'], 'admin/reports/dblog', 'Recent logs message view exists.');
+    $this->assertSame($displays['page']['display_options']['path'], 'admin/reports/dblog', 'Recent logs message view exists.');
   }
 
 }
diff --git a/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php b/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
index 73a6d83d22..164b8613cd 100644
--- a/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
@@ -32,7 +32,7 @@ protected function setUp() {
    */
   public function testBookSettings() {
     $config = $this->config('dblog.settings');
-    $this->assertIdentical(10000, $config->get('row_limit'));
+    $this->assertSame(10000, $config->get('row_limit'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'dblog.settings', $config->get());
   }
 
diff --git a/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php b/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
index d9708309b2..963b26abed 100644
--- a/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
@@ -30,7 +30,7 @@ protected function setUp() {
    */
   public function testDblogSettings() {
     $config = $this->config('dblog.settings');
-    $this->assertIdentical(10000, $config->get('row_limit'));
+    $this->assertSame(10000, $config->get('row_limit'));
   }
 
 }
diff --git a/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php b/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
index 67d693fb8b..b4eade42fd 100644
--- a/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
@@ -133,7 +133,7 @@ public function testFiltering() {
     $this->executeView($view);
 
     $resultset = [['message' => 'Warning message']];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
 
     $view = Views::getView('dblog_integration_test');
 
@@ -163,7 +163,7 @@ public function testFiltering() {
     $this->executeView($view);
 
     $resultset = [['message' => 'My module message']];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   /**
diff --git a/core/modules/editor/src/Tests/EditorAdminTest.php b/core/modules/editor/src/Tests/EditorAdminTest.php
index 4315a6dabd..e9325e2c35 100644
--- a/core/modules/editor/src/Tests/EditorAdminTest.php
+++ b/core/modules/editor/src/Tests/EditorAdminTest.php
@@ -221,8 +221,8 @@ protected function selectUnicornEditor() {
   protected function verifyUnicornEditorConfiguration($format_id, $ponies_too = TRUE) {
     $editor = editor_load($format_id);
     $settings = $editor->getSettings();
-    $this->assertIdentical($editor->getEditor(), 'unicorn', 'The text editor is configured correctly.');
-    $this->assertIdentical($settings['ponies_too'], $ponies_too, 'The text editor settings are stored correctly.');
+    $this->assertSame($editor->getEditor(), 'unicorn', 'The text editor is configured correctly.');
+    $this->assertSame($settings['ponies_too'], $ponies_too, 'The text editor settings are stored correctly.');
     $this->drupalGet('admin/config/content/formats/manage/' . $format_id);
     $select = $this->xpath('//select[@name="editor[editor]"]');
     $select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]');
diff --git a/core/modules/editor/src/Tests/EditorLoadingTest.php b/core/modules/editor/src/Tests/EditorLoadingTest.php
index aa6ce24837..8dab8c7214 100644
--- a/core/modules/editor/src/Tests/EditorLoadingTest.php
+++ b/core/modules/editor/src/Tests/EditorLoadingTest.php
@@ -152,7 +152,7 @@ public function testLoading() {
       ],
     ];
     $this->assertTrue($editor_settings_present, "Text Editor module's JavaScript settings are on the page.");
-    $this->assertIdentical($expected, $settings['editor'], "Text Editor module's JavaScript settings on the page are correct.");
+    $this->assertSame($expected, $settings['editor'], "Text Editor module's JavaScript settings on the page are correct.");
     $this->assertTrue($editor_js_present, 'Text Editor JavaScript is present.');
     $this->assertTrue(count($body) === 1, 'A body field exists.');
     $this->assertTrue(count($format_selector) === 1, 'A single text format selector exists on the page.');
@@ -190,7 +190,7 @@ public function testLoading() {
       ],
     ];
     $this->assertTrue($editor_settings_present, "Text Editor module's JavaScript settings are on the page.");
-    $this->assertIdentical($expected, $settings['editor'], "Text Editor module's JavaScript settings on the page are correct.");
+    $this->assertSame($expected, $settings['editor'], "Text Editor module's JavaScript settings on the page are correct.");
     $this->assertTrue($editor_js_present, 'Text Editor JavaScript is present.');
     $this->assertTrue(count($body) === 1, 'A body field exists.');
     $this->assertTrue(count($format_selector) === 0, 'No text format selector exists on the page.');
diff --git a/core/modules/editor/src/Tests/EditorSecurityTest.php b/core/modules/editor/src/Tests/EditorSecurityTest.php
index d00fe0e684..cf97aa1efd 100644
--- a/core/modules/editor/src/Tests/EditorSecurityTest.php
+++ b/core/modules/editor/src/Tests/EditorSecurityTest.php
@@ -284,7 +284,7 @@ public function testInitialSecurity() {
         $this->drupalLogin($account);
         $this->drupalGet('node/' . $case['node_id'] . '/edit');
         $dom_node = $this->xpath('//textarea[@id="edit-body-0-value"]');
-        $this->assertIdentical($case['value'], (string) $dom_node[0], 'The value was correctly filtered for XSS attack vectors.');
+        $this->assertSame($case['value'], (string) $dom_node[0], 'The value was correctly filtered for XSS attack vectors.');
       }
     }
   }
@@ -390,8 +390,8 @@ public function testSwitchingSecurity() {
 
       // Verify data- attributes.
       $dom_node = $this->xpath('//textarea[@id="edit-body-0-value"]');
-      $this->assertIdentical(self::$sampleContent, (string) $dom_node[0]['data-editor-value-original'], 'The data-editor-value-original attribute is correctly set.');
-      $this->assertIdentical('false', (string) $dom_node[0]['data-editor-value-is-changed'], 'The data-editor-value-is-changed attribute is correctly set.');
+      $this->assertSame(self::$sampleContent, (string) $dom_node[0]['data-editor-value-original'], 'The data-editor-value-original attribute is correctly set.');
+      $this->assertSame('false', (string) $dom_node[0]['data-editor-value-is-changed'], 'The data-editor-value-is-changed attribute is correctly set.');
 
       // Switch to every other text format/editor and verify the results.
       foreach ($case['switch_to'] as $format => $expected_filtered_value) {
@@ -407,7 +407,7 @@ public function testSwitchingSecurity() {
         $response = $this->drupalPostWithFormat('editor/filter_xss/' . $format, 'json', $post);
         $this->assertResponse(200);
         $json = Json::decode($response);
-        $this->assertIdentical($json, $expected_filtered_value, 'The value was correctly filtered for XSS attack vectors.');
+        $this->assertSame($json, $expected_filtered_value, 'The value was correctly filtered for XSS attack vectors.');
       }
     }
   }
@@ -420,7 +420,7 @@ public function testEditorXssFilterOverride() {
     $this->drupalLogin($this->normalUser);
     $this->drupalGet('node/2/edit');
     $dom_node = $this->xpath('//textarea[@id="edit-body-0-value"]');
-    $this->assertIdentical(self::$sampleContentSecured, (string) $dom_node[0], 'The value was filtered by the Standard text editor XSS filter.');
+    $this->assertSame(self::$sampleContentSecured, (string) $dom_node[0], 'The value was filtered by the Standard text editor XSS filter.');
 
     // Enable editor_test.module's hook_editor_xss_filter_alter() implementation
     // to alter the text editor XSS filter class being used.
@@ -429,7 +429,7 @@ public function testEditorXssFilterOverride() {
     // First: the Insecure text editor XSS filter.
     $this->drupalGet('node/2/edit');
     $dom_node = $this->xpath('//textarea[@id="edit-body-0-value"]');
-    $this->assertIdentical(self::$sampleContent, (string) $dom_node[0], 'The value was filtered by the Insecure text editor XSS filter.');
+    $this->assertSame(self::$sampleContent, (string) $dom_node[0], 'The value was filtered by the Insecure text editor XSS filter.');
   }
 
 }
diff --git a/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php b/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php
index a4515d5673..f26a736415 100644
--- a/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php
+++ b/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php
@@ -94,7 +94,7 @@ public function testUsersWithoutPermission() {
       else {
         $message = '';
       }
-      $this->assertIdentical(Json::encode(['message' => $message]), $response);
+      $this->assertSame(Json::encode(['message' => $message]), $response);
     }
   }
 
@@ -112,9 +112,9 @@ public function testUserWithPermission() {
     $response = $this->drupalPost('editor/' . 'node/1/body/en/full', '', [], ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
     $this->assertResponse(200);
     $ajax_commands = Json::decode($response);
-    $this->assertIdentical(1, count($ajax_commands), 'The untransformed text POST request results in one AJAX command.');
-    $this->assertIdentical('editorGetUntransformedText', $ajax_commands[0]['command'], 'The first AJAX command is an editorGetUntransformedText command.');
-    $this->assertIdentical('<p>Do you also love Drupal?</p><img src="druplicon.png" data-caption="Druplicon" />', $ajax_commands[0]['data'], 'The editorGetUntransformedText command contains the expected data.');
+    $this->assertSame(1, count($ajax_commands), 'The untransformed text POST request results in one AJAX command.');
+    $this->assertSame('editorGetUntransformedText', $ajax_commands[0]['command'], 'The first AJAX command is an editorGetUntransformedText command.');
+    $this->assertSame('<p>Do you also love Drupal?</p><img src="druplicon.png" data-caption="Druplicon" />', $ajax_commands[0]['data'], 'The editorGetUntransformedText command contains the expected data.');
   }
 
 }
diff --git a/core/modules/editor/tests/src/Functional/Update/EditorUpdateTest.php b/core/modules/editor/tests/src/Functional/Update/EditorUpdateTest.php
index a143c053d3..51c6f3d597 100644
--- a/core/modules/editor/tests/src/Functional/Update/EditorUpdateTest.php
+++ b/core/modules/editor/tests/src/Functional/Update/EditorUpdateTest.php
@@ -59,12 +59,12 @@ public function testEditorUpdate8001() {
     // Checks if the 'basic_html' format and editor statuses are in sync.
     $this->assertTrue($format_basic_html->get('status'));
     $this->assertTrue($editor_basic_html->get('status'));
-    $this->assertIdentical($format_basic_html->get('status'), $editor_basic_html->get('status'));
+    $this->assertSame($format_basic_html->get('status'), $editor_basic_html->get('status'));
 
     // Checks if the 'full_html' format and editor statuses are in sync.
     $this->assertFalse($format_full_html->get('status'));
     $this->assertFalse($editor_full_html->get('status'));
-    $this->assertIdentical($format_full_html->get('status'), $editor_full_html->get('status'));
+    $this->assertSame($format_full_html->get('status'), $editor_full_html->get('status'));
   }
 
 }
diff --git a/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php b/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
index c68ae48e6e..9224925379 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
@@ -67,38 +67,38 @@ public function testEditorFileReferenceFilter() {
     $this->pass('No data-entity-type and no data-entity-uuid attribute.');
     $input = '<img src="llama.jpg" />';
     $output = $test($input);
-    $this->assertIdentical($input, $output->getProcessedText());
+    $this->assertSame($input, $output->getProcessedText());
 
     $this->pass('A non-file data-entity-type attribute value.');
     $input = '<img src="llama.jpg" data-entity-type="invalid-entity-type-value" data-entity-uuid="' . $uuid . '" />';
     $output = $test($input);
-    $this->assertIdentical($input, $output->getProcessedText());
+    $this->assertSame($input, $output->getProcessedText());
 
     $this->pass('One data-entity-uuid attribute.');
     $input = '<img src="llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '" />';
     $expected_output = '<img src="/' . $this->siteDirectory . '/files/llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '" />';
     $output = $test($input);
-    $this->assertIdentical($expected_output, $output->getProcessedText());
+    $this->assertSame($expected_output, $output->getProcessedText());
     $this->assertEqual($cache_tag, $output->getCacheTags());
 
     $this->pass('One data-entity-uuid attribute with odd capitalization.');
     $input = '<img src="llama.jpg" data-entity-type="file" DATA-entity-UUID =   "' . $uuid . '" />';
     $expected_output = '<img src="/' . $this->siteDirectory . '/files/llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '" />';
     $output = $test($input);
-    $this->assertIdentical($expected_output, $output->getProcessedText());
+    $this->assertSame($expected_output, $output->getProcessedText());
     $this->assertEqual($cache_tag, $output->getCacheTags());
 
     $this->pass('One data-entity-uuid attribute on a non-image tag.');
     $input = '<video src="llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '" />';
     $expected_output = '<video src="/' . $this->siteDirectory . '/files/llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '"></video>';
     $output = $test($input);
-    $this->assertIdentical($expected_output, $output->getProcessedText());
+    $this->assertSame($expected_output, $output->getProcessedText());
     $this->assertEqual($cache_tag, $output->getCacheTags());
 
     $this->pass('One data-entity-uuid attribute with an invalid value.');
     $input = '<img src="llama.jpg" data-entity-type="file" data-entity-uuid="invalid-' . $uuid . '" />';
     $output = $test($input);
-    $this->assertIdentical($input, $output->getProcessedText());
+    $this->assertSame($input, $output->getProcessedText());
     $this->assertEqual([], $output->getCacheTags());
 
     $this->pass('Two different data-entity-uuid attributes.');
@@ -107,7 +107,7 @@ public function testEditorFileReferenceFilter() {
     $expected_output = '<img src="/' . $this->siteDirectory . '/files/llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '" />';
     $expected_output .= '<img src="/' . $this->siteDirectory . '/files/alpaca.jpg" data-entity-type="file" data-entity-uuid="' . $uuid_2 . '" />';
     $output = $test($input);
-    $this->assertIdentical($expected_output, $output->getProcessedText());
+    $this->assertSame($expected_output, $output->getProcessedText());
     $this->assertEqual(Cache::mergeTags($cache_tag, $cache_tag_2), $output->getCacheTags());
 
     $this->pass('Two identical  data-entity-uuid attributes.');
@@ -116,7 +116,7 @@ public function testEditorFileReferenceFilter() {
     $expected_output = '<img src="/' . $this->siteDirectory . '/files/llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '" />';
     $expected_output .= '<img src="/' . $this->siteDirectory . '/files/llama.jpg" data-entity-type="file" data-entity-uuid="' . $uuid . '" />';
     $output = $test($input);
-    $this->assertIdentical($expected_output, $output->getProcessedText());
+    $this->assertSame($expected_output, $output->getProcessedText());
     $this->assertEqual($cache_tag, $output->getCacheTags());
   }
 
diff --git a/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php b/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
index aac665d61b..848a95188d 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
@@ -77,7 +77,7 @@ public function testEditorEntityHooks() {
       $image->save();
 
       $file_usage = $this->container->get('file.usage');
-      $this->assertIdentical([], $file_usage->listUsage($image), 'The image ' . $image_paths[$key] . ' has zero usages.');
+      $this->assertSame([], $file_usage->listUsage($image), 'The image ' . $image_paths[$key] . ' has zero usages.');
 
       $image_entities[] = $image;
     }
@@ -111,7 +111,7 @@ public function testEditorEntityHooks() {
     ]);
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '1']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 1 usage.');
+      $this->assertSame(['editor' => ['node' => [1 => '1']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 1 usage.');
     }
 
     // Test editor_entity_update(): increment, twice, by creating new revisions.
@@ -121,7 +121,7 @@ public function testEditorEntityHooks() {
     $node->setNewRevision(TRUE);
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '3']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 3 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '3']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 3 usages.');
     }
 
     // Test hook_entity_update(): decrement, by modifying the last revision:
@@ -135,7 +135,7 @@ public function testEditorEntityHooks() {
     }
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
     }
 
     // Test editor_entity_update(): increment again by creating a new revision:
@@ -146,7 +146,7 @@ public function testEditorEntityHooks() {
     }
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '3']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 3 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '3']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 3 usages.');
     }
 
     // Test hook_entity_update(): decrement, by modifying the last revision:
@@ -158,7 +158,7 @@ public function testEditorEntityHooks() {
     }
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
     }
 
     // Test hook_entity_update(): increment, by modifying the last revision:
@@ -168,13 +168,13 @@ public function testEditorEntityHooks() {
     }
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '3']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 3 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '3']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 3 usages.');
     }
 
     // Test editor_entity_revision_delete(): decrement, by deleting a revision.
     $this->container->get('entity_type.manager')->getStorage('node')->deleteRevision($second_revision_id);
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
     }
 
     // Populate both the body and summary. Because this will be the same
@@ -185,7 +185,7 @@ public function testEditorEntityHooks() {
     }
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
     }
 
     // Empty out the body value, but keep the summary. The number of usages
@@ -196,13 +196,13 @@ public function testEditorEntityHooks() {
     }
     $node->save();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
+      $this->assertSame(['editor' => ['node' => [1 => '2']]], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has 2 usages.');
     }
 
     // Test editor_entity_delete().
     $node->delete();
     foreach ($image_entities as $key => $image_entity) {
-      $this->assertIdentical([], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has zero usages again.');
+      $this->assertSame([], $file_usage->listUsage($image_entity), 'The image ' . $image_paths[$key] . ' has zero usages again.');
     }
   }
 
diff --git a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
index d1d6eafa18..10f1fdab96 100644
--- a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
@@ -59,9 +59,9 @@ public function testManager() {
     // - listOptions() should return an empty list of options
     // - getAttachments() should return an empty #attachments array (and not
     //   a JS settings structure that is empty)
-    $this->assertIdentical([], $this->editorManager->listOptions(), 'When no text editor is enabled, the manager works correctly.');
-    $this->assertIdentical([], $this->editorManager->getAttachments([]), 'No attachments when no text editor is enabled and retrieving attachments for zero text formats.');
-    $this->assertIdentical([], $this->editorManager->getAttachments(['filtered_html', 'full_html']), 'No attachments when no text editor is enabled and retrieving attachments for multiple text formats.');
+    $this->assertSame([], $this->editorManager->listOptions(), 'When no text editor is enabled, the manager works correctly.');
+    $this->assertSame([], $this->editorManager->getAttachments([]), 'No attachments when no text editor is enabled and retrieving attachments for zero text formats.');
+    $this->assertSame([], $this->editorManager->getAttachments(['filtered_html', 'full_html']), 'No attachments when no text editor is enabled and retrieving attachments for multiple text formats.');
 
     // Enable the Text Editor Test module, which has the Unicorn Editor and
     // clear the editor manager's cache so it is picked up.
@@ -70,7 +70,7 @@ public function testManager() {
     $this->editorManager->clearCachedDefinitions();
 
     // Case 2: a text editor available.
-    $this->assertIdentical('Unicorn Editor', (string) $this->editorManager->listOptions()['unicorn'], 'When some text editor is enabled, the manager works correctly.');
+    $this->assertSame('Unicorn Editor', (string) $this->editorManager->listOptions()['unicorn'], 'When some text editor is enabled, the manager works correctly.');
 
     // Case 3: a text editor available & associated (but associated only with
     // the 'Full HTML' text format).
@@ -80,7 +80,7 @@ public function testManager() {
       'editor' => 'unicorn',
     ]);
     $editor->save();
-    $this->assertIdentical([], $this->editorManager->getAttachments([]), 'No attachments when one text editor is enabled and retrieving attachments for zero text formats.');
+    $this->assertSame([], $this->editorManager->getAttachments([]), 'No attachments when one text editor is enabled and retrieving attachments for zero text formats.');
     $expected = [
       'library' => [
         0 => 'editor_test/unicorn',
@@ -99,13 +99,13 @@ public function testManager() {
         ],
       ],
     ];
-    $this->assertIdentical($expected, $this->editorManager->getAttachments(['filtered_html', 'full_html']), 'Correct attachments when one text editor is enabled and retrieving attachments for multiple text formats.');
+    $this->assertSame($expected, $this->editorManager->getAttachments(['filtered_html', 'full_html']), 'Correct attachments when one text editor is enabled and retrieving attachments for multiple text formats.');
 
     // Case 4: a text editor available associated, but now with its JS settings
     // being altered via hook_editor_js_settings_alter().
     \Drupal::state()->set('editor_test_js_settings_alter_enabled', TRUE);
     $expected['drupalSettings']['editor']['formats']['full_html']['editorSettings']['ponyModeEnabled'] = FALSE;
-    $this->assertIdentical($expected, $this->editorManager->getAttachments(['filtered_html', 'full_html']), 'hook_editor_js_settings_alter() works correctly.');
+    $this->assertSame($expected, $this->editorManager->getAttachments(['filtered_html', 'full_html']), 'hook_editor_js_settings_alter() works correctly.');
   }
 
 }
diff --git a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php
index 276f559225..7babd0ab6b 100644
--- a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php
+++ b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php
@@ -199,7 +199,7 @@ public function testAttachments() {
 
     $editors = ['editor'];
     $attachments = $this->editorSelector->getEditorAttachments($editors);
-    $this->assertIdentical($attachments, ['library' => ['editor/quickedit.inPlaceEditor.formattedText']], "Expected attachments for Editor module's in-place editor found.");
+    $this->assertSame($attachments, ['library' => ['editor/quickedit.inPlaceEditor.formattedText']], "Expected attachments for Editor module's in-place editor found.");
   }
 
   /**
diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
index fa68cb6150..dbb494cdc4 100644
--- a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
@@ -343,7 +343,7 @@ public function testFieldAdminHandler() {
     $this->drupalPostForm(NULL, $edit, t('Save settings'));
     // The term should now exist.
     $term = taxonomy_term_load_multiple_by_name($term_name, 'tags')[1];
-    $this->assertIdentical(1, count($term), 'Taxonomy term was auto created when set as field default.');
+    $this->assertSame(1, count($term), 'Taxonomy term was auto created when set as field default.');
   }
 
   /**
@@ -455,7 +455,7 @@ public function testMultipleTargetBundles() {
     $vocabularies[0]->delete();
     $field_config = FieldConfig::load($field_id);
     $this->assertTrue($field_config->getSetting('handler_settings')['auto_create']);
-    $this->assertIdentical($field_config->getSetting('handler_settings')['auto_create_bundle'], $vocabularies[1]->id());
+    $this->assertSame($field_config->getSetting('handler_settings')['auto_create_bundle'], $vocabularies[1]->id());
 
     // Delete the bundle set for entity auto-creation. Auto-created settings
     // should be reset (no auto-creation).
@@ -516,7 +516,7 @@ protected function assertFieldSelectOptions($name, array $expected_options) {
       sort($options);
       sort($expected_options);
 
-      return $this->assertIdentical($options, $expected_options);
+      return $this->assertSame($options, $expected_options);
     }
     else {
       return $this->fail('Unable to find field ' . $name);
diff --git a/core/modules/field/src/Tests/FormTest.php b/core/modules/field/src/Tests/FormTest.php
index ff1b3ee67b..d0711ed857 100644
--- a/core/modules/field/src/Tests/FormTest.php
+++ b/core/modules/field/src/Tests/FormTest.php
@@ -303,7 +303,7 @@ public function testFieldFormUnlimited() {
     $entity = EntityTest::load($id);
     ksort($field_values);
     $field_values = array_values($field_values);
-    $this->assertIdentical($entity->{$field_name}->getValue(), $field_values, 'Field values were saved in the correct order');
+    $this->assertSame($entity->{$field_name}->getValue(), $field_values, 'Field values were saved in the correct order');
 
     // Display edit form: check that the expected number of widgets is
     // displayed, with correct values change values, reorder, leave an empty
diff --git a/core/modules/field/tests/src/Functional/Update/FieldUpdateTest.php b/core/modules/field/tests/src/Functional/Update/FieldUpdateTest.php
index 577da7147c..ba2f0a9c98 100644
--- a/core/modules/field/tests/src/Functional/Update/FieldUpdateTest.php
+++ b/core/modules/field/tests/src/Functional/Update/FieldUpdateTest.php
@@ -70,7 +70,7 @@ public function testFieldUpdate8002() {
     // Check that 'entity_reference' is the provider and a dependency of the
     // test field storage .
     $field_storage = $this->configFactory->get('field.storage.node.field_ref_views_select_2429191');
-    $this->assertIdentical($field_storage->get('module'), 'entity_reference');
+    $this->assertSame($field_storage->get('module'), 'entity_reference');
     $this->assertEntityRefDependency($field_storage, TRUE);
 
     // Check that 'entity_reference' is a dependency of the test field.
@@ -87,7 +87,7 @@ public function testFieldUpdate8002() {
     // Check that 'entity_reference' is no longer a dependency of the test field
     // and view.
     $field_storage = $this->configFactory->get('field.storage.node.field_ref_views_select_2429191');
-    $this->assertIdentical($field_storage->get('module'), 'core');
+    $this->assertSame($field_storage->get('module'), 'core');
     $this->assertEntityRefDependency($field_storage, FALSE);
     $field = $this->configFactory->get('field.field.node.article.field_ref_views_select_2429191');
     $this->assertEntityRefDependency($field, FALSE);
diff --git a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
index 05fdfae386..df435c8000 100644
--- a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
@@ -352,13 +352,13 @@ public function testEntityFormDisplayExtractFormValues() {
         $expected_values[] = ['value' => $values[$key]['value']];
       }
     }
-    $this->assertIdentical($entity->{$this->fieldTestData->field_name}->getValue(), $expected_values, 'Submit filters empty values');
+    $this->assertSame($entity->{$this->fieldTestData->field_name}->getValue(), $expected_values, 'Submit filters empty values');
     foreach ($weights_2 as $key => $value) {
       if ($key != 1) {
         $expected_values_2[] = ['value' => $values_2[$key]['value']];
       }
     }
-    $this->assertIdentical($entity->{$this->fieldTestData->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values');
+    $this->assertSame($entity->{$this->fieldTestData->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values');
 
     // Call EntityFormDisplayInterface::extractFormValues() for a single field (the second field).
     foreach ($display->getComponents() as $name => $options) {
@@ -375,7 +375,7 @@ public function testEntityFormDisplayExtractFormValues() {
       }
     }
     $this->assertTrue($entity->{$this->fieldTestData->field_name}->isEmpty(), 'The first field is empty in the entity object');
-    $this->assertIdentical($entity->{$this->fieldTestData->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values');
+    $this->assertSame($entity->{$this->fieldTestData->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values');
   }
 
 }
diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
index 6407be7520..1e4aa1a2a5 100644
--- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
@@ -89,8 +89,8 @@ public function testCreateField() {
 
     // Check that default values are set.
     $this->assertEqual($config['required'], FALSE, 'Required defaults to false.');
-    $this->assertIdentical($config['label'], $this->fieldDefinition['field_name'], 'Label defaults to field name.');
-    $this->assertIdentical($config['description'], '', 'Description defaults to empty string.');
+    $this->assertSame($config['label'], $this->fieldDefinition['field_name'], 'Label defaults to field name.');
+    $this->assertSame($config['description'], '', 'Description defaults to empty string.');
 
     // Check that default settings are set.
     $this->assertEqual($config['settings'], $field_type_manager->getDefaultFieldSettings($this->fieldStorageDefinition['type']), 'Default field settings have been written.');
@@ -225,7 +225,7 @@ public function testCreateFieldCustomStorage() {
     // Save an entity with a value in the custom storage field and verify no
     // data is retrieved on load.
     $entity = EntityTest::create(['name' => $this->randomString(), $field_name => 'Test value']);
-    $this->assertIdentical('Test value', $entity->{$field_name}->value, 'The test value is set on the field.');
+    $this->assertSame('Test value', $entity->{$field_name}->value, 'The test value is set on the field.');
 
     $entity->save();
     $entity = EntityTest::load($entity->id());
diff --git a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
index 69b84a9c1d..bd86338b18 100644
--- a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
@@ -62,16 +62,16 @@ public function testEntityCountAndHasData() {
       'bundle' => 'entity_test',
     ])->save();
 
-    $this->assertIdentical($field_storage->hasdata(), FALSE, 'There are no entities with field data.');
-    $this->assertIdentical($this->storage->countFieldData($field_storage), 0, 'There are 0 entities with field data.');
+    $this->assertSame($field_storage->hasdata(), FALSE, 'There are no entities with field data.');
+    $this->assertSame($this->storage->countFieldData($field_storage), 0, 'There are 0 entities with field data.');
 
     // Create 1 entity without the field.
     $entity = EntityTest::create();
     $entity->name->value = $this->randomMachineName();
     $entity->save();
 
-    $this->assertIdentical($field_storage->hasdata(), FALSE, 'There are no entities with field data.');
-    $this->assertIdentical($this->storage->countFieldData($field_storage), 0, 'There are 0 entities with field data.');
+    $this->assertSame($field_storage->hasdata(), FALSE, 'There are no entities with field data.');
+    $this->assertSame($this->storage->countFieldData($field_storage), 0, 'There are 0 entities with field data.');
 
     // Create 12 entities to ensure that the purging works as expected.
     for ($i = 0; $i < 12; $i++) {
@@ -95,16 +95,16 @@ public function testEntityCountAndHasData() {
       $this->assertEqual($result, 24, 'The field table has 24 rows.');
     }
 
-    $this->assertIdentical($field_storage->hasdata(), TRUE, 'There are entities with field data.');
+    $this->assertSame($field_storage->hasdata(), TRUE, 'There are entities with field data.');
     $this->assertEqual($this->storage->countFieldData($field_storage), 12, 'There are 12 entities with field data.');
 
     // Ensure the methods work on deleted fields.
     $field_storage->delete();
-    $this->assertIdentical($field_storage->hasdata(), TRUE, 'There are entities with deleted field data.');
+    $this->assertSame($field_storage->hasdata(), TRUE, 'There are entities with deleted field data.');
     $this->assertEqual($this->storage->countFieldData($field_storage), 12, 'There are 12 entities with deleted field data.');
 
     field_purge_batch(6);
-    $this->assertIdentical($field_storage->hasdata(), TRUE, 'There are entities with deleted field data.');
+    $this->assertSame($field_storage->hasdata(), TRUE, 'There are entities with deleted field data.');
     $this->assertEqual($this->storage->countFieldData($field_storage), 6, 'There are 6 entities with deleted field data.');
 
     $entity_type = 'entity_test_rev';
@@ -115,8 +115,8 @@ public function testEntityCountAndHasData() {
       ->create(['type' => $entity_type]);
     $cardinality = $this->fieldTestData->field_storage_2->getCardinality();
 
-    $this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), FALSE, 'There are no entities with field data.');
-    $this->assertIdentical($this->storageRev->countFieldData($this->fieldTestData->field_storage_2), 0, 'There are 0 entities with field data.');
+    $this->assertSame($this->fieldTestData->field_storage_2->hasData(), FALSE, 'There are no entities with field data.');
+    $this->assertSame($this->storageRev->countFieldData($this->fieldTestData->field_storage_2), 0, 'There are 0 entities with field data.');
 
     // Create 1 entity with the field.
     $entity = clone($entity_init);
@@ -126,14 +126,14 @@ public function testEntityCountAndHasData() {
     $entity->save();
     $first_revision = $entity->getRevisionId();
 
-    $this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), TRUE, 'There are entities with field data.');
-    $this->assertIdentical($this->storageRev->countFieldData($this->fieldTestData->field_storage_2), 1, 'There is 1 entity with field data.');
+    $this->assertSame($this->fieldTestData->field_storage_2->hasData(), TRUE, 'There are entities with field data.');
+    $this->assertSame($this->storageRev->countFieldData($this->fieldTestData->field_storage_2), 1, 'There is 1 entity with field data.');
 
     $entity->{$this->fieldTestData->field_name_2} = [];
     $entity->setNewRevision();
     $entity->save();
 
-    $this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), TRUE, 'There are entities with field data.');
+    $this->assertSame($this->fieldTestData->field_storage_2->hasData(), TRUE, 'There are entities with field data.');
 
     $storage = $this->container->get('entity.manager')->getStorage($entity_type);
     $entity = $storage->loadRevision($first_revision);
@@ -171,11 +171,11 @@ public function testCountWithIndex0() {
 
     // Test shared table storage.
     $storage = $user->getFieldDefinition('name')->getFieldStorageDefinition();
-    $this->assertIdentical(TRUE, $this->storageUser->countFieldData($storage, TRUE));
+    $this->assertSame(TRUE, $this->storageUser->countFieldData($storage, TRUE));
 
     // Test dedicated table storage.
     $storage = $user->getFieldDefinition('field_int')->getFieldStorageDefinition();
-    $this->assertIdentical(TRUE, $this->storageUser->countFieldData($storage, TRUE));
+    $this->assertSame(TRUE, $this->storageUser->countFieldData($storage, TRUE));
   }
 
 }
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
index f3408a52a0..8a4b48b7c3 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
@@ -100,11 +100,11 @@ public function testImportDelete() {
 
     // Check that all config files are gone.
     $active = $this->container->get('config.storage');
-    $this->assertIdentical($active->listAll($field_storage_config_name), []);
-    $this->assertIdentical($active->listAll($field_storage_config_name_2), []);
-    $this->assertIdentical($active->listAll($field_config_name), []);
-    $this->assertIdentical($active->listAll($field_config_name_2a), []);
-    $this->assertIdentical($active->listAll($field_config_name_2b), []);
+    $this->assertSame($active->listAll($field_storage_config_name), []);
+    $this->assertSame($active->listAll($field_storage_config_name_2), []);
+    $this->assertSame($active->listAll($field_config_name), []);
+    $this->assertSame($active->listAll($field_config_name_2a), []);
+    $this->assertSame($active->listAll($field_config_name_2b), []);
 
     // Check that only the first storage definition is preserved in state.
     $deleted_storages = \Drupal::state()->get('field.storage.deleted') ?: [];
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
index c3a4d3c1d5..f3913ae697 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
@@ -93,7 +93,7 @@ public function testImportDeleteUninstall() {
     $sync->delete('field.field.entity_test.entity_test.field_test');
 
     $steps = $this->configImporter()->initialize();
-    $this->assertIdentical($steps[0], ['\Drupal\field\ConfigImporterFieldPurger', 'process'], 'The additional process configuration synchronization step has been added.');
+    $this->assertSame($steps[0], ['\Drupal\field\ConfigImporterFieldPurger', 'process'], 'The additional process configuration synchronization step has been added.');
 
     // This will purge all the data, delete the field and uninstall the
     // Telephone module.
@@ -154,7 +154,7 @@ public function testImportAlreadyDeletedUninstall() {
     $this->assertTrue(isset($deleted_storages[$field_storage_uuid]), 'Field has been deleted and needs purging before configuration synchronization.');
 
     $steps = $this->configImporter()->initialize();
-    $this->assertIdentical($steps[0], ['\Drupal\field\ConfigImporterFieldPurger', 'process'], 'The additional process configuration synchronization step has been added.');
+    $this->assertSame($steps[0], ['\Drupal\field\ConfigImporterFieldPurger', 'process'], 'The additional process configuration synchronization step has been added.');
 
     // This will purge all the data, delete the field and uninstall the
     // Telephone module.
diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
index dfc50f21aa..6a5c4be308 100644
--- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
@@ -46,8 +46,8 @@ public function testCreate() {
     $this->assertNull($field_storage->getSetting('config_data_from_storage_setting'));
 
     $mem = field_test_memorize();
-    $this->assertIdentical($mem['field_test_field_storage_config_create'][0][0]->getName(), $field_storage_definition['field_name'], 'hook_entity_create() called with correct arguments.');
-    $this->assertIdentical($mem['field_test_field_storage_config_create'][0][0]->getType(), $field_storage_definition['type'], 'hook_entity_create() called with correct arguments.');
+    $this->assertSame($mem['field_test_field_storage_config_create'][0][0]->getName(), $field_storage_definition['field_name'], 'hook_entity_create() called with correct arguments.');
+    $this->assertSame($mem['field_test_field_storage_config_create'][0][0]->getType(), $field_storage_definition['type'], 'hook_entity_create() called with correct arguments.');
 
     // Read the configuration. Check against raw configuration data rather than
     // the loaded ConfigEntity, to be sure we check that the defaults are
@@ -357,7 +357,7 @@ public function testDeleteNoData() {
     $entity = $this->entitySaveReload($entity);
 
     // Verify the field is present on load
-    $this->assertIdentical(count($entity->{$field_storage->getName()}), count($values), "Data in previously deleted field saves and loads correctly");
+    $this->assertSame(count($entity->{$field_storage->getName()}), count($values), "Data in previously deleted field saves and loads correctly");
     foreach ($values as $delta => $value) {
       $this->assertEqual($entity->{$field_storage->getName()}[$delta]->value, $values[$delta]['value'], "Data in previously deleted field saves and loads correctly");
     }
diff --git a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
index 32b2964809..0dd8c88915 100644
--- a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
@@ -21,8 +21,8 @@ public function testDefaultSettings() {
     $field_type_manager = \Drupal::service('plugin.manager.field.field_type');
     foreach (['test_field', 'shape', 'hidden_test_field'] as $type) {
       $definition = $field_type_manager->getDefinition($type);
-      $this->assertIdentical($field_type_manager->getDefaultStorageSettings($type), $definition['class']::defaultStorageSettings(), format_string("%type storage settings were returned", ['%type' => $type]));
-      $this->assertIdentical($field_type_manager->getDefaultFieldSettings($type), $definition['class']::defaultFieldSettings(), format_string(" %type field settings were returned", ['%type' => $type]));
+      $this->assertSame($field_type_manager->getDefaultStorageSettings($type), $definition['class']::defaultStorageSettings(), format_string("%type storage settings were returned", ['%type' => $type]));
+      $this->assertSame($field_type_manager->getDefaultFieldSettings($type), $definition['class']::defaultFieldSettings(), format_string(" %type field settings were returned", ['%type' => $type]));
     }
   }
 
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
index aa47c90f0b..621b77076c 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
@@ -55,23 +55,23 @@ public function testEntityDisplaySettings() {
 
     // Can we load any entity display.
     $display = EntityViewDisplay::load('node.story.teaser');
-    $this->assertIdentical($expected, $display->getComponent($field_name));
+    $this->assertSame($expected, $display->getComponent($field_name));
 
     // Test migrate worked with multiple bundles.
     $display = EntityViewDisplay::load('node.test_page.teaser');
     $expected['weight'] = 35;
-    $this->assertIdentical($expected, $display->getComponent($field_name));
+    $this->assertSame($expected, $display->getComponent($field_name));
 
     // Test RSS because that has been converted from 4 to rss.
     $display = EntityViewDisplay::load('node.story.rss');
     $expected['weight'] = 1;
-    $this->assertIdentical($expected, $display->getComponent($field_name));
+    $this->assertSame($expected, $display->getComponent($field_name));
 
     // Test the default format with text_default which comes from a static map.
     $expected['type'] = 'text_default';
     $expected['settings'] = [];
     $display = EntityViewDisplay::load('node.story.default');
-    $this->assertIdentical($expected, $display->getComponent($field_name));
+    $this->assertSame($expected, $display->getComponent($field_name));
 
     // Check that we can migrate multiple fields.
     $content = $display->get('content');
@@ -89,7 +89,7 @@ public function testEntityDisplaySettings() {
       'prefix_suffix' => TRUE,
     ];
     $component = $display->getComponent('field_test_two');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     $expected['weight'] = 2;
     $expected['type'] = 'number_decimal';
     $expected['settings'] = [
@@ -99,14 +99,14 @@ public function testEntityDisplaySettings() {
        'prefix_suffix' => TRUE,
     ];
     $component = $display->getComponent('field_test_three');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test the email field formatter settings are correct.
     $expected['weight'] = 6;
     $expected['type'] = 'email_mailto';
     $expected['settings'] = [];
     $component = $display->getComponent('field_test_email');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test the link field formatter settings.
     $expected['weight'] = 7;
@@ -119,41 +119,41 @@ public function testEntityDisplaySettings() {
       'target' => '0',
     ];
     $component = $display->getComponent('field_test_link');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     $expected['settings']['url_only'] = FALSE;
     $expected['settings']['url_plain'] = FALSE;
     $display = EntityViewDisplay::load('node.story.teaser');
     $component = $display->getComponent('field_test_link');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test the file field formatter settings.
     $expected['weight'] = 8;
     $expected['type'] = 'file_default';
     $expected['settings'] = [];
     $component = $display->getComponent('field_test_filefield');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     $display = EntityViewDisplay::load('node.story.default');
     $expected['type'] = 'file_url_plain';
     $component = $display->getComponent('field_test_filefield');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test the image field formatter settings.
     $expected['weight'] = 9;
     $expected['type'] = 'image';
     $expected['settings'] = ['image_style' => '', 'image_link' => ''];
     $component = $display->getComponent('field_test_imagefield');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     $display = EntityViewDisplay::load('node.story.teaser');
     $expected['settings']['image_link'] = 'file';
     $component = $display->getComponent('field_test_imagefield');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test phone field.
     $expected['weight'] = 13;
     $expected['type'] = 'basic_string';
     $expected['settings'] = [];
     $component = $display->getComponent('field_test_phone');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test date field.
     $defaults = ['format_type' => 'fallback', 'timezone_override' => ''];
@@ -161,40 +161,40 @@ public function testEntityDisplaySettings() {
     $expected['type'] = 'datetime_default';
     $expected['settings'] = ['format_type' => 'fallback'] + $defaults;
     $component = $display->getComponent('field_test_date');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     $display = EntityViewDisplay::load('node.story.default');
     $expected['settings']['format_type'] = 'long';
     $component = $display->getComponent('field_test_date');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test date stamp field.
     $expected['weight'] = 11;
     $expected['settings']['format_type'] = 'fallback';
     $component = $display->getComponent('field_test_datestamp');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     $display = EntityViewDisplay::load('node.story.teaser');
     $expected['settings'] = ['format_type' => 'medium'] + $defaults;
     $component = $display->getComponent('field_test_datestamp');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test datetime field.
     $expected['weight'] = 12;
     $expected['settings'] = ['format_type' => 'short'] + $defaults;
     $component = $display->getComponent('field_test_datetime');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     $display = EntityViewDisplay::load('node.story.default');
     $expected['settings']['format_type'] = 'fallback';
     $component = $display->getComponent('field_test_datetime');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Test a date field with a random format which should be mapped
     // to datetime_default.
     $display = EntityViewDisplay::load('node.story.rss');
     $expected['settings']['format_type'] = 'fallback';
     $component = $display->getComponent('field_test_datetime');
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
     // Test that our Id map has the correct data.
-    $this->assertIdentical(['node', 'story', 'teaser', 'field_test'], $this->getMigration('d6_field_formatter_settings')->getIdMap()->lookupDestinationID(['story', 'teaser', 'node', 'field_test']));
+    $this->assertSame(['node', 'story', 'teaser', 'field_test'], $this->getMigration('d6_field_formatter_settings')->getIdMap()->lookupDestinationID(['story', 'teaser', 'node', 'field_test']));
 
     // Test hidden field.
     $this->assertComponentNotExists('node.test_planet.teaser', 'field_test_text_single_checkbox');
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
index 6c4e29c4be..b12f99780e 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
@@ -29,14 +29,14 @@ public function testFieldInstanceMigration() {
     // Test a text field.
     /** @var \Drupal\field\FieldConfigInterface $field */
     $field = FieldConfig::load('node.story.field_test');
-    $this->assertIdentical('Text Field', $field->label());
+    $this->assertSame('Text Field', $field->label());
     // field_test is a text_long field, which have no settings.
-    $this->assertIdentical([], $field->getSettings());
-    $this->assertIdentical('text for default value', $entity->field_test->value);
+    $this->assertSame([], $field->getSettings());
+    $this->assertSame('text for default value', $entity->field_test->value);
 
     // Test a number field.
     $field = FieldConfig::load('node.story.field_test_two');
-    $this->assertIdentical('Integer Field', $field->label());
+    $this->assertSame('Integer Field', $field->label());
     $expected = [
       'min' => 10,
       'max' => 100,
@@ -45,36 +45,36 @@ public function testFieldInstanceMigration() {
       'unsigned' => FALSE,
       'size' => 'normal',
     ];
-    $this->assertIdentical($expected, $field->getSettings());
+    $this->assertSame($expected, $field->getSettings());
 
     $field = FieldConfig::load('node.story.field_test_four');
-    $this->assertIdentical('Float Field', $field->label());
+    $this->assertSame('Float Field', $field->label());
     $expected = [
       'min' => 100.0,
       'max' => 200.0,
       'prefix' => 'id-',
       'suffix' => '',
     ];
-    $this->assertIdentical($expected, $field->getSettings());
+    $this->assertSame($expected, $field->getSettings());
 
     // Test email field.
     $field = FieldConfig::load('node.story.field_test_email');
-    $this->assertIdentical('Email Field', $field->label());
-    $this->assertIdentical('benjy@example.com', $entity->field_test_email->value);
+    $this->assertSame('Email Field', $field->label());
+    $this->assertSame('benjy@example.com', $entity->field_test_email->value);
 
     // Test image field.
     $field = FieldConfig::load('node.story.field_test_imagefield');
-    $this->assertIdentical('Image Field', $field->label());
+    $this->assertSame('Image Field', $field->label());
     $field_settings = $field->getSettings();
-    $this->assertIdentical('', $field_settings['max_resolution']);
-    $this->assertIdentical('', $field_settings['min_resolution']);
-    $this->assertIdentical('', $field_settings['file_directory']);
-    $this->assertIdentical('png gif jpg jpeg', $field_settings['file_extensions']);
-    $this->assertIdentical('public', $field_settings['uri_scheme']);
+    $this->assertSame('', $field_settings['max_resolution']);
+    $this->assertSame('', $field_settings['min_resolution']);
+    $this->assertSame('', $field_settings['file_directory']);
+    $this->assertSame('png gif jpg jpeg', $field_settings['file_extensions']);
+    $this->assertSame('public', $field_settings['uri_scheme']);
 
     // Test a filefield.
     $field = FieldConfig::load('node.story.field_test_filefield');
-    $this->assertIdentical('File Field', $field->label());
+    $this->assertSame('File Field', $field->label());
     $expected = [
       'file_extensions' => 'txt pdf doc',
       'file_directory' => 'images',
@@ -91,16 +91,16 @@ public function testFieldInstanceMigration() {
     ksort($expected);
     ksort($field_settings);
     // This is the only way to compare arrays.
-    $this->assertIdentical($expected, $field_settings);
+    $this->assertSame($expected, $field_settings);
 
     // Test a link field.
     $field = FieldConfig::load('node.story.field_test_link');
-    $this->assertIdentical('Link Field', $field->label());
+    $this->assertSame('Link Field', $field->label());
     $expected = ['title' => 2, 'link_type' => LinkItemInterface::LINK_GENERIC];
-    $this->assertIdentical($expected, $field->getSettings());
-    $this->assertIdentical('default link title', $entity->field_test_link->title, 'Field field_test_link default title is correct.');
-    $this->assertIdentical('https://www.drupal.org', $entity->field_test_link->url, 'Field field_test_link default title is correct.');
-    $this->assertIdentical([], $entity->field_test_link->options['attributes']);
+    $this->assertSame($expected, $field->getSettings());
+    $this->assertSame('default link title', $entity->field_test_link->title, 'Field field_test_link default title is correct.');
+    $this->assertSame('https://www.drupal.org', $entity->field_test_link->url, 'Field field_test_link default title is correct.');
+    $this->assertSame([], $entity->field_test_link->options['attributes']);
 
     // Test date field.
     $field = FieldConfig::load('node.story.field_test_date');
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
index 6e8e040d94..36d218582d 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
@@ -31,7 +31,7 @@ protected function setUp() {
   public function testWidgetSettings() {
     // Test the config can be loaded.
     $form_display = EntityFormDisplay::load('node.story.default');
-    $this->assertIdentical(FALSE, is_null($form_display), "Form display node.story.default loaded with config.");
+    $this->assertSame(FALSE, is_null($form_display), "Form display node.story.default loaded with config.");
 
     // Text field.
     $component = $form_display->getComponent('field_test');
@@ -39,31 +39,31 @@ public function testWidgetSettings() {
     $expected['settings'] = ['size' => 60, 'placeholder' => ''];
     $expected['third_party_settings'] = [];
     $expected['region'] = 'content';
-    $this->assertIdentical($expected, $component, 'Text field settings are correct.');
+    $this->assertSame($expected, $component, 'Text field settings are correct.');
 
     // Integer field.
     $component = $form_display->getComponent('field_test_two');
     $expected['type'] = 'number';
     $expected['weight'] = 1;
     $expected['settings'] = ['placeholder' => ''];
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Float field.
     $component = $form_display->getComponent('field_test_three');
     $expected['weight'] = 2;
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Email field.
     $component = $form_display->getComponent('field_test_email');
     $expected['type'] = 'email_default';
     $expected['weight'] = 6;
     $expected['settings'] = ['placeholder' => '', 'size' => 60];
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Link field.
     $component = $form_display->getComponent('field_test_link');
-    $this->assertIdentical('link_default', $component['type']);
-    $this->assertIdentical(7, $component['weight']);
+    $this->assertSame('link_default', $component['type']);
+    $this->assertSame(7, $component['weight']);
     $this->assertFalse(array_filter($component['settings']));
 
     // File field.
@@ -71,36 +71,36 @@ public function testWidgetSettings() {
     $expected['type'] = 'file_generic';
     $expected['weight'] = 8;
     $expected['settings'] = ['progress_indicator' => 'bar'];
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Image field.
     $component = $form_display->getComponent('field_test_imagefield');
     $expected['type'] = 'image_image';
     $expected['weight'] = 9;
     $expected['settings'] = ['progress_indicator' => 'bar', 'preview_image_style' => 'thumbnail'];
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Phone field.
     $component = $form_display->getComponent('field_test_phone');
     $expected['type'] = 'telephone_default';
     $expected['weight'] = 13;
     $expected['settings'] = ['placeholder' => ''];
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     // Date fields.
     $component = $form_display->getComponent('field_test_date');
     $expected['type'] = 'datetime_default';
     $expected['weight'] = 10;
     $expected['settings'] = [];
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     $component = $form_display->getComponent('field_test_datestamp');
     $expected['weight'] = 11;
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     $component = $form_display->getComponent('field_test_datetime');
     $expected['weight'] = 12;
-    $this->assertIdentical($expected, $component);
+    $this->assertSame($expected, $component);
 
     $component = entity_get_form_display('node', 'employee', 'default')
       ->getComponent('field_company');
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
index d1e2c3395d..f8f2af6070 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
@@ -182,9 +182,9 @@ protected function assertEntity($id) {
   protected function assertComponent($display_id, $component_id, $type, $label, $weight) {
     $component = EntityViewDisplay::load($display_id)->getComponent($component_id);
     $this->assertTrue(is_array($component));
-    $this->assertIdentical($type, $component['type']);
-    $this->assertIdentical($label, $component['label']);
-    $this->assertIdentical($weight, $component['weight']);
+    $this->assertSame($type, $component['type']);
+    $this->assertSame($label, $component['label']);
+    $this->assertSame($weight, $component['weight']);
   }
 
   /**
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
index ee4d204af3..59dcf52134 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
@@ -67,8 +67,8 @@ protected function assertEntity($id, $expected_entity_type, $expected_bundle) {
     /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $entity */
     $entity = EntityFormDisplay::load($id);
     $this->assertTrue($entity instanceof EntityFormDisplayInterface);
-    $this->assertIdentical($expected_entity_type, $entity->getTargetEntityTypeId());
-    $this->assertIdentical($expected_bundle, $entity->getTargetBundle());
+    $this->assertSame($expected_entity_type, $entity->getTargetEntityTypeId());
+    $this->assertSame($expected_bundle, $entity->getTargetBundle());
   }
 
   /**
@@ -86,8 +86,8 @@ protected function assertEntity($id, $expected_entity_type, $expected_bundle) {
   protected function assertComponent($display_id, $component_id, $widget_type, $weight) {
     $component = EntityFormDisplay::load($display_id)->getComponent($component_id);
     $this->assertTrue(is_array($component));
-    $this->assertIdentical($widget_type, $component['type']);
-    $this->assertIdentical($weight, $component['weight']);
+    $this->assertSame($widget_type, $component['type']);
+    $this->assertSame($weight, $component['weight']);
   }
 
   /**
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
index 0a7e9dcc0d..4527904469 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
@@ -39,8 +39,8 @@ protected function assertEntity($id, $label, $entity_type) {
     /** @var \Drupal\Core\Entity\EntityViewModeInterface $view_mode */
     $view_mode = EntityViewMode::load($id);
     $this->assertTrue($view_mode instanceof EntityViewModeInterface);
-    $this->assertIdentical($label, $view_mode->label());
-    $this->assertIdentical($entity_type, $view_mode->getTargetType());
+    $this->assertSame($label, $view_mode->label());
+    $this->assertSame($entity_type, $view_mode->getTargetType());
   }
 
   /**
diff --git a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
index 578eeda9c6..2f0c1d9aa2 100644
--- a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
+++ b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
@@ -53,7 +53,7 @@ public function testNumberItem() {
     $entity->field_float = $float;
     $entity->field_decimal = '20-40';
     $violations = $entity->validate();
-    $this->assertIdentical(1, count($violations), 'Wrong decimal value causes validation error');
+    $this->assertSame(1, count($violations), 'Wrong decimal value causes validation error');
     $decimal = '31.3';
     $entity->field_decimal = $decimal;
     $entity->name->value = $this->randomMachineName();
diff --git a/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php b/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
index 0eeb778076..2252344f2b 100644
--- a/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
@@ -42,14 +42,14 @@ public function testUuidStringFormatter() {
 
     // Verify default render.
     $render_array = $uuid_field->view([]);
-    $this->assertIdentical($render_array[0]['#context']['value'], $entity->uuid(), 'The rendered UUID matches the entity UUID.');
+    $this->assertSame($render_array[0]['#context']['value'], $entity->uuid(), 'The rendered UUID matches the entity UUID.');
     $this->assertTrue(strpos($this->render($render_array), $entity->uuid()), 'The rendered UUID found.');
 
     // Verify customized render.
     $render_array = $uuid_field->view(['settings' => ['link_to_entity' => TRUE]]);
-    $this->assertIdentical($render_array[0]['#type'], 'link');
-    $this->assertIdentical($render_array[0]['#title']['#context']['value'], $entity->uuid());
-    $this->assertIdentical($render_array[0]['#url']->toString(), $entity->url());
+    $this->assertSame($render_array[0]['#type'], 'link');
+    $this->assertSame($render_array[0]['#title']['#context']['value'], $entity->uuid());
+    $this->assertSame($render_array[0]['#url']->toString(), $entity->url());
     $rendered = $this->render($render_array);
     $this->assertTrue(strpos($rendered, $entity->uuid()), 'The rendered UUID found.');
     $this->assertTrue(strpos($rendered, $entity->url()), 'The rendered entity URL found.');
diff --git a/core/modules/field_ui/src/Tests/ManageDisplayTest.php b/core/modules/field_ui/src/Tests/ManageDisplayTest.php
index 7ba011e08e..f36fc03083 100644
--- a/core/modules/field_ui/src/Tests/ManageDisplayTest.php
+++ b/core/modules/field_ui/src/Tests/ManageDisplayTest.php
@@ -552,7 +552,7 @@ protected function assertFieldSelectOptions($name, array $expected_options) {
       sort($options);
       sort($expected_options);
 
-      return $this->assertIdentical($options, $expected_options);
+      return $this->assertSame($options, $expected_options);
     }
     else {
       return $this->fail('Unable to find field ' . $name);
diff --git a/core/modules/field_ui/src/Tests/ManageFieldsTest.php b/core/modules/field_ui/src/Tests/ManageFieldsTest.php
index d08ab03ba4..a017bc0ba7 100644
--- a/core/modules/field_ui/src/Tests/ManageFieldsTest.php
+++ b/core/modules/field_ui/src/Tests/ManageFieldsTest.php
@@ -155,15 +155,15 @@ public function manageFieldsPage($type = '') {
     foreach ($operation_links as $link) {
       switch ($link['title']) {
         case 'Edit field settings.':
-          $this->assertIdentical($url, (string) $link['href']);
+          $this->assertSame($url, (string) $link['href']);
           $number_of_links_found++;
           break;
         case 'Edit storage settings.':
-          $this->assertIdentical("$url/storage", (string) $link['href']);
+          $this->assertSame("$url/storage", (string) $link['href']);
           $number_of_links_found++;
           break;
         case 'Delete field.':
-          $this->assertIdentical("$url/delete", (string) $link['href']);
+          $this->assertSame("$url/delete", (string) $link['href']);
           $number_of_links_found++;
           break;
       }
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
index 4a0e533be3..765642997a 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
@@ -130,7 +130,7 @@ public function testEntityDisplayCRUDSort() {
     $components = array_keys($display->getComponents());
     // The name field is not configurable so will be added automatically.
     $expected = [ 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name'];
-    $this->assertIdentical($components, $expected);
+    $this->assertSame($components, $expected);
   }
 
   /**
diff --git a/core/modules/file/src/Tests/FileFieldWidgetTest.php b/core/modules/file/src/Tests/FileFieldWidgetTest.php
index ad47d77841..33c59be5a5 100644
--- a/core/modules/file/src/Tests/FileFieldWidgetTest.php
+++ b/core/modules/file/src/Tests/FileFieldWidgetTest.php
@@ -191,7 +191,7 @@ public function testMultiValuedWidget() {
               $check_field_name = $field_name;
             }
 
-            $this->assertIdentical((string) $button['name'], $check_field_name . '_' . $key . '_remove_button');
+            $this->assertSame((string) $button['name'], $check_field_name . '_' . $key . '_remove_button');
           }
 
           // "Click" the remove button (emulating either a nojs or js submission).
@@ -472,7 +472,7 @@ public function testWidgetElement() {
     $elements = $this->xpath($xpath);
 
     // If the field has no item, the table should not be visible.
-    $this->assertIdentical(count($elements), 0);
+    $this->assertSame(count($elements), 0);
 
     // Upload a file.
     $edit['files[' . $field_name . '_0][]'] = $this->container->get('file_system')->realpath($file->getFileUri());
@@ -481,7 +481,7 @@ public function testWidgetElement() {
     $elements = $this->xpath($xpath);
 
     // If the field has at least a item, the table should be visible.
-    $this->assertIdentical(count($elements), 1);
+    $this->assertSame(count($elements), 1);
 
     // Test for AJAX error when using progress bar on file field widget
     $key = $this->randomMachineName();
diff --git a/core/modules/file/src/Tests/Views/RelationshipUserFileDataTest.php b/core/modules/file/src/Tests/Views/RelationshipUserFileDataTest.php
index 6a5f53b5d3..6b46aa8722 100644
--- a/core/modules/file/src/Tests/Views/RelationshipUserFileDataTest.php
+++ b/core/modules/file/src/Tests/Views/RelationshipUserFileDataTest.php
@@ -82,7 +82,7 @@ public function testViewsHandlerRelationshipUserFileData() {
         'user',
       ],
     ];
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
     $this->executeView($view);
     $expected_result = [
       [
@@ -90,7 +90,7 @@ public function testViewsHandlerRelationshipUserFileData() {
       ],
     ];
     $column_map = ['file_managed_user__user_file_fid' => 'file_managed_user__user_file_fid'];
-    $this->assertIdenticalResultset($view, $expected_result, $column_map);
+    $this->assertSameResultset($view, $expected_result, $column_map);
   }
 
 }
diff --git a/core/modules/file/tests/src/Functional/Update/FileUsageTemporaryDeletionConfigurationUpdateTest.php b/core/modules/file/tests/src/Functional/Update/FileUsageTemporaryDeletionConfigurationUpdateTest.php
index e9973def61..5a71312c17 100644
--- a/core/modules/file/tests/src/Functional/Update/FileUsageTemporaryDeletionConfigurationUpdateTest.php
+++ b/core/modules/file/tests/src/Functional/Update/FileUsageTemporaryDeletionConfigurationUpdateTest.php
@@ -31,9 +31,9 @@ protected function setDatabaseDumpFiles() {
    * Tests that block context mapping is updated properly.
    */
   public function testUpdateHookN() {
-    $this->assertIdentical($this->config('file.settings')->get('make_unused_managed_files_temporary'), NULL);
+    $this->assertSame($this->config('file.settings')->get('make_unused_managed_files_temporary'), NULL);
     $this->runUpdates();
-    $this->assertIdentical($this->config('file.settings')->get('make_unused_managed_files_temporary'), FALSE);
+    $this->assertSame($this->config('file.settings')->get('make_unused_managed_files_temporary'), FALSE);
     $this->assertResponse('200');
   }
 
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php
index 6788d7c697..a64a66e0fb 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php
@@ -27,9 +27,9 @@ protected function setUp() {
    */
   public function testFileSettings() {
     $config = $this->config('file.settings');
-    $this->assertIdentical('textfield', $config->get('description.type'));
-    $this->assertIdentical(128, $config->get('description.length'));
-    $this->assertIdentical('sites/default/files/icons', $config->get('icon.directory'));
+    $this->assertSame('textfield', $config->get('description.type'));
+    $this->assertSame(128, $config->get('description.length'));
+    $this->assertSame('sites/default/files/icons', $config->get('icon.directory'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'file.settings', $config->get());
   }
 
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php
index 989eb15900..52d17f7518 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php
@@ -55,11 +55,11 @@ protected function assertEntity($fid, $name, $size, $uri, $type, $uid) {
     /** @var \Drupal\file\FileInterface $file */
     $file = File::load($fid);
     $this->assertTrue($file instanceof FileInterface);
-    $this->assertIdentical($name, $file->getFilename());
-    $this->assertIdentical($size, $file->getSize());
-    $this->assertIdentical($uri, $file->getFileUri());
-    $this->assertIdentical($type, $file->getMimeType());
-    $this->assertIdentical($uid, $file->getOwnerId());
+    $this->assertSame($name, $file->getFilename());
+    $this->assertSame($size, $file->getSize());
+    $this->assertSame($uri, $file->getFileUri());
+    $this->assertSame($type, $file->getMimeType());
+    $this->assertSame($uid, $file->getOwnerId());
   }
 
   /**
@@ -112,7 +112,7 @@ public function testFiles() {
     // File 2, when migrated for the second time, is treated as a different file
     // (due to having a different uri this time) and is given fid 6.
     $file = File::load(6);
-    $this->assertIdentical('public://core/modules/simpletest/files/image-2.jpg', $file->getFileUri());
+    $this->assertSame('public://core/modules/simpletest/files/image-2.jpg', $file->getFileUri());
 
     $map_table = $this->getMigration('d6_file')->getIdMap()->mapTableName();
     $map = \Drupal::database()
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
index 200dc8617a..a99498e2ec 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
@@ -33,18 +33,18 @@ public function testUploadEntityDisplay() {
 
     $display = EntityViewDisplay::load('node.page.default');
     $component = $display->getComponent('upload');
-    $this->assertIdentical('file_default', $component['type']);
+    $this->assertSame('file_default', $component['type']);
 
     $display = EntityViewDisplay::load('node.story.default');
     $component = $display->getComponent('upload');
-    $this->assertIdentical('file_default', $component['type']);
+    $this->assertSame('file_default', $component['type']);
 
     // Assure this doesn't exist.
     $display = EntityViewDisplay::load('node.article.default');
     $component = $display->getComponent('upload');
     $this->assertTrue(is_null($component));
 
-    $this->assertIdentical(['node', 'page', 'default', 'upload'], $this->getMigration('d6_upload_entity_display')->getIdMap()->lookupDestinationID(['page']));
+    $this->assertSame(['node', 'page', 'default', 'upload'], $this->getMigration('d6_upload_entity_display')->getIdMap()->lookupDestinationID(['page']));
   }
 
   /**
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
index 36e9f1da20..9483efd2b3 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
@@ -33,18 +33,18 @@ public function testUploadEntityFormDisplay() {
 
     $display = EntityFormDisplay::load('node.page.default');
     $component = $display->getComponent('upload');
-    $this->assertIdentical('file_generic', $component['type']);
+    $this->assertSame('file_generic', $component['type']);
 
     $display = EntityFormDisplay::load('node.story.default');
     $component = $display->getComponent('upload');
-    $this->assertIdentical('file_generic', $component['type']);
+    $this->assertSame('file_generic', $component['type']);
 
     // Assure this doesn't exist.
     $display = EntityFormDisplay::load('node.article.default');
     $component = $display->getComponent('upload');
     $this->assertTrue(is_null($component));
 
-    $this->assertIdentical(['node', 'page', 'default', 'upload'], $this->getMigration('d6_upload_entity_form_display')->getIdMap()->lookupDestinationID(['page']));
+    $this->assertSame(['node', 'page', 'default', 'upload'], $this->getMigration('d6_upload_entity_form_display')->getIdMap()->lookupDestinationID(['page']));
   }
 
   /**
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
index 9ea8cce424..48639207be 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
@@ -30,8 +30,8 @@ protected function setUp() {
    */
   public function testUpload() {
     $field_storage = FieldStorageConfig::load('node.upload');
-    $this->assertIdentical('node.upload', $field_storage->id());
-    $this->assertIdentical(['node', 'upload'], $this->getMigration('d6_upload_field')->getIdMap()->lookupDestinationID(['']));
+    $this->assertSame('node.upload', $field_storage->id());
+    $this->assertSame(['node', 'upload'], $this->getMigration('d6_upload_field')->getIdMap()->lookupDestinationID(['']));
   }
 
 }
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
index 84bd4eb087..e3ae40e0c5 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
@@ -31,19 +31,19 @@ protected function setUp() {
   public function testUploadFieldInstance() {
     $field = FieldConfig::load('node.page.upload');
     $settings = $field->getSettings();
-    $this->assertIdentical('node.page.upload', $field->id());
-    $this->assertIdentical('jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp', $settings['file_extensions']);
-    $this->assertIdentical('1MB', $settings['max_filesize']);
-    $this->assertIdentical(TRUE, $settings['description_field']);
+    $this->assertSame('node.page.upload', $field->id());
+    $this->assertSame('jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp', $settings['file_extensions']);
+    $this->assertSame('1MB', $settings['max_filesize']);
+    $this->assertSame(TRUE, $settings['description_field']);
 
     $field = FieldConfig::load('node.story.upload');
-    $this->assertIdentical('node.story.upload', $field->id());
+    $this->assertSame('node.story.upload', $field->id());
 
     // Shouldn't exist.
     $field = FieldConfig::load('node.article.upload');
     $this->assertTrue(is_null($field));
 
-    $this->assertIdentical(['node', 'page', 'upload'], $this->getMigration('d6_upload_field_instance')->getIdMap()->lookupDestinationID(['page']));
+    $this->assertSame(['node', 'page', 'upload'], $this->getMigration('d6_upload_field_instance')->getIdMap()->lookupDestinationID(['page']));
   }
 
 }
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
index fc379e5386..22856dd51e 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
@@ -69,19 +69,19 @@ public function testUpload() {
 
     $nodes = Node::loadMultiple([1, 2]);
     $node = $nodes[1];
-    $this->assertIdentical(1, count($node->upload));
-    $this->assertIdentical('1', $node->upload[0]->target_id);
-    $this->assertIdentical('file 1-1-1', $node->upload[0]->description);
-    $this->assertIdentical(FALSE, $node->upload[0]->isDisplayed());
+    $this->assertSame(1, count($node->upload));
+    $this->assertSame('1', $node->upload[0]->target_id);
+    $this->assertSame('file 1-1-1', $node->upload[0]->description);
+    $this->assertSame(FALSE, $node->upload[0]->isDisplayed());
 
     $node = $nodes[2];
-    $this->assertIdentical(2, count($node->upload));
-    $this->assertIdentical('3', $node->upload[0]->target_id);
-    $this->assertIdentical('file 2-3-3', $node->upload[0]->description);
-    $this->assertIdentical(FALSE, $node->upload[0]->isDisplayed());
-    $this->assertIdentical('2', $node->upload[1]->target_id);
-    $this->assertIdentical(TRUE, $node->upload[1]->isDisplayed());
-    $this->assertIdentical('file 2-3-2', $node->upload[1]->description);
+    $this->assertSame(2, count($node->upload));
+    $this->assertSame('3', $node->upload[0]->target_id);
+    $this->assertSame('file 2-3-3', $node->upload[0]->description);
+    $this->assertSame(FALSE, $node->upload[0]->isDisplayed());
+    $this->assertSame('2', $node->upload[1]->target_id);
+    $this->assertSame(TRUE, $node->upload[1]->isDisplayed());
+    $this->assertSame('file 2-3-2', $node->upload[1]->description);
   }
 
 }
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
index 88d7c79e55..2cd6cd7f5f 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
@@ -50,16 +50,16 @@ protected function assertEntity($id, $name, $uri, $mime, $size, $created, $chang
     /** @var \Drupal\file\FileInterface $file */
     $file = File::load($id);
     $this->assertTrue($file instanceof FileInterface);
-    $this->assertIdentical($name, $file->getFilename());
-    $this->assertIdentical($uri, $file->getFileUri());
+    $this->assertSame($name, $file->getFilename());
+    $this->assertSame($uri, $file->getFileUri());
     $this->assertTrue(file_exists($uri));
-    $this->assertIdentical($mime, $file->getMimeType());
-    $this->assertIdentical($size, $file->getSize());
+    $this->assertSame($mime, $file->getMimeType());
+    $this->assertSame($size, $file->getSize());
     // isPermanent(), isTemporary(), etc. are determined by the status column.
     $this->assertTrue($file->isPermanent());
-    $this->assertIdentical($created, $file->getCreatedTime());
-    $this->assertIdentical($changed, $file->getChangedTime());
-    $this->assertIdentical($uid, $file->getOwnerId());
+    $this->assertSame($created, $file->getCreatedTime());
+    $this->assertSame($changed, $file->getChangedTime());
+    $this->assertSame($uid, $file->getOwnerId());
   }
 
   /**
diff --git a/core/modules/file/tests/src/Kernel/UsageTest.php b/core/modules/file/tests/src/Kernel/UsageTest.php
index f95e9cd488..a08dbc97ca 100644
--- a/core/modules/file/tests/src/Kernel/UsageTest.php
+++ b/core/modules/file/tests/src/Kernel/UsageTest.php
@@ -129,7 +129,7 @@ public function doTestRemoveUsage() {
       ->condition('f.fid', $file->id())
       ->execute()
       ->fetchField();
-    $this->assertIdentical(FALSE, $count, 'The count was removed entirely when empty.');
+    $this->assertSame(FALSE, $count, 'The count was removed entirely when empty.');
 
     // Non-existent decrement.
     $file_usage->delete($file, 'testing', 'bar', 2);
@@ -138,7 +138,7 @@ public function doTestRemoveUsage() {
       ->condition('f.fid', $file->id())
       ->execute()
       ->fetchField();
-    $this->assertIdentical(FALSE, $count, 'Decrementing non-exist record complete.');
+    $this->assertSame(FALSE, $count, 'Decrementing non-exist record complete.');
     return $file;
   }
 
diff --git a/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php b/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php
index f5423e7dd7..e5c431c23c 100644
--- a/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php
@@ -90,7 +90,7 @@ public function testCaptionFilter() {
     // No data-caption attribute.
     $input = '<img src="llama.jpg" />';
     $expected = $input;
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
 
     // Data-caption attribute.
     $input = '<img src="llama.jpg" data-caption="Loquacious llama!" />';
diff --git a/core/modules/filter/tests/src/Kernel/FilterAPITest.php b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
index 2203bbec1f..521ef7210a 100644
--- a/core/modules/filter/tests/src/Kernel/FilterAPITest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
@@ -101,7 +101,7 @@ public function testCheckMarkupFilterSubset() {
   public function testFilterFormatAPI() {
     // Test on filtered_html.
     $filtered_html_format = FilterFormat::load('filtered_html');
-    $this->assertIdentical(
+    $this->assertSame(
       $filtered_html_format->getHtmlRestrictions(),
       [
         'allowed' => [
@@ -114,7 +114,7 @@ public function testFilterFormatAPI() {
       ],
       'FilterFormatInterface::getHtmlRestrictions() works as expected for the filtered_html format.'
     );
-    $this->assertIdentical(
+    $this->assertSame(
       $filtered_html_format->getFilterTypes(),
       [FilterInterface::TYPE_HTML_RESTRICTOR, FilterInterface::TYPE_MARKUP_LANGUAGE],
       'FilterFormatInterface::getFilterTypes() works as expected for the filtered_html format.'
@@ -122,12 +122,12 @@ public function testFilterFormatAPI() {
 
     // Test on full_html.
     $full_html_format = FilterFormat::load('full_html');
-    $this->assertIdentical(
+    $this->assertSame(
       $full_html_format->getHtmlRestrictions(),
       FALSE, // Every tag is allowed.
       'FilterFormatInterface::getHtmlRestrictions() works as expected for the full_html format.'
     );
-    $this->assertIdentical(
+    $this->assertSame(
       $full_html_format->getFilterTypes(),
       [],
       'FilterFormatInterface::getFilterTypes() works as expected for the full_html format.'
@@ -147,12 +147,12 @@ public function testFilterFormatAPI() {
       ],
     ]);
     $stupid_filtered_html_format->save();
-    $this->assertIdentical(
+    $this->assertSame(
       $stupid_filtered_html_format->getHtmlRestrictions(),
       ['allowed' => []], // No tag is allowed.
       'FilterFormatInterface::getHtmlRestrictions() works as expected for the stupid_filtered_html format.'
     );
-    $this->assertIdentical(
+    $this->assertSame(
       $stupid_filtered_html_format->getFilterTypes(),
       [FilterInterface::TYPE_HTML_RESTRICTOR],
       'FilterFormatInterface::getFilterTypes() works as expected for the stupid_filtered_html format.'
@@ -186,7 +186,7 @@ public function testFilterFormatAPI() {
       ]
     ]);
     $very_restricted_html_format->save();
-    $this->assertIdentical(
+    $this->assertSame(
       $very_restricted_html_format->getHtmlRestrictions(),
       [
         'allowed' => [
@@ -198,7 +198,7 @@ public function testFilterFormatAPI() {
       ],
       'FilterFormatInterface::getHtmlRestrictions() works as expected for the very_restricted_html format.'
     );
-    $this->assertIdentical(
+    $this->assertSame(
       $very_restricted_html_format->getFilterTypes(),
       [FilterInterface::TYPE_HTML_RESTRICTOR],
       'FilterFormatInterface::getFilterTypes() works as expected for the very_restricted_html format.'
@@ -220,7 +220,7 @@ public function testFilterFormatAPI() {
       ]
     ]);
     $nonsensical_restricted_html->save();
-    $this->assertIdentical(
+    $this->assertSame(
       $nonsensical_restricted_html->getHtmlRestrictions(),
       [
         'allowed' => [
@@ -233,7 +233,7 @@ public function testFilterFormatAPI() {
       ],
       'FilterFormatInterface::getHtmlRestrictions() works as expected for the nonsensical_restricted_html format.'
     );
-    $this->assertIdentical(
+    $this->assertSame(
       $very_restricted_html_format->getFilterTypes(),
       [FilterInterface::TYPE_HTML_RESTRICTOR],
       'FilterFormatInterface::getFilterTypes() works as expected for the very_restricted_html format.'
diff --git a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
index b73b180bfe..726c2297c8 100644
--- a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
@@ -81,7 +81,7 @@ public function testDisableFallbackFormat() {
       $this->fail($message);
     }
     catch (\LogicException $e) {
-      $this->assertIdentical($e->getMessage(), "The fallback text format 'plain_text' cannot be disabled.", $message);
+      $this->assertSame($e->getMessage(), "The fallback text format 'plain_text' cannot be disabled.", $message);
     }
   }
 
diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
index cf72bbee45..d20a8d3b3f 100644
--- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
@@ -51,46 +51,46 @@ public function testAlignFilter() {
     // No data-align attribute.
     $input = '<img src="llama.jpg" />';
     $expected = $input;
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
 
     // Data-align attribute: all 3 allowed values.
     $input = '<img src="llama.jpg" data-align="left" />';
     $expected = '<img src="llama.jpg" class="align-left" />';
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
     $input = '<img src="llama.jpg" data-align="center" />';
     $expected = '<img src="llama.jpg" class="align-center" />';
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
     $input = '<img src="llama.jpg" data-align="right" />';
     $expected = '<img src="llama.jpg" class="align-right" />';
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
 
     // Data-align attribute: a disallowed value.
     $input = '<img src="llama.jpg" data-align="left foobar" />';
     $expected = '<img src="llama.jpg" />';
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
 
     // Empty data-align attribute.
     $input = '<img src="llama.jpg" data-align="" />';
     $expected = '<img src="llama.jpg" />';
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
 
     // Ensure the filter also works with uncommon yet valid attribute quoting.
     $input = '<img src=llama.jpg data-align=right />';
     $expected = '<img src="llama.jpg" class="align-right" />';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
+    $this->assertSame($expected, $output->getProcessedText());
 
     // Security test: attempt to inject an additional class.
     $input = '<img src="llama.jpg" data-align="center another-class-here" />';
     $expected = '<img src="llama.jpg" />';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
+    $this->assertSame($expected, $output->getProcessedText());
 
     // Security test: attempt an XSS.
     $input = '<img src="llama.jpg" data-align="center \'onclick=\'alert(foo);" />';
     $expected = '<img src="llama.jpg" />';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
+    $this->assertSame($expected, $output->getProcessedText());
   }
 
   /**
@@ -116,33 +116,33 @@ public function testCaptionFilter() {
     // No data-caption attribute.
     $input = '<img src="llama.jpg" />';
     $expected = $input;
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
 
     // Data-caption attribute.
     $input = '<img src="llama.jpg" data-caption="Loquacious llama!" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // Empty data-caption attribute.
     $input = '<img src="llama.jpg" data-caption="" />';
     $expected = '<img src="llama.jpg" />';
-    $this->assertIdentical($expected, $test($input)->getProcessedText());
+    $this->assertSame($expected, $test($input)->getProcessedText());
 
     // HTML entities in the caption.
     $input = '<img src="llama.jpg" data-caption="&ldquo;Loquacious llama!&rdquo;" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>“Loquacious llama!”</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // HTML encoded as HTML entities in data-caption attribute.
     $input = '<img src="llama.jpg" data-caption="&lt;em&gt;Loquacious llama!&lt;/em&gt;" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption><em>Loquacious llama!</em></figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // HTML (not encoded as HTML entities) in data-caption attribute, which is
     // not allowed by the HTML spec, but may happen when people manually write
@@ -150,41 +150,41 @@ public function testCaptionFilter() {
     $input = '<img src="llama.jpg" data-caption="<em>Loquacious llama!</em>" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption><em>Loquacious llama!</em></figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // Security test: attempt an XSS.
     $input = '<img src="llama.jpg" data-caption="<script>alert(\'Loquacious llama!\')</script>" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>alert(\'Loquacious llama!\')</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // Ensure the filter also works with uncommon yet valid attribute quoting.
     $input = '<img src=llama.jpg data-caption=\'Loquacious llama!\' />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // Finally, ensure that this also works on any other tag.
     $input = '<video src="llama.jpg" data-caption="Loquacious llama!" />';
     $expected = '<figure role="group"><video src="llama.jpg"></video><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
     $input = '<foobar data-caption="Loquacious llama!">baz</foobar>';
     $expected = '<figure role="group"><foobar>baz</foobar><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // Ensure the caption filter works for linked images.
     $input = '<a href="http://example.com/llamas/are/awesome/but/kittens/are/cool/too"><img src="llama.jpg" data-caption="Loquacious llama!" /></a>';
     $expected = '<figure role="group"><a href="http://example.com/llamas/are/awesome/but/kittens/are/cool/too"><img src="llama.jpg" /></a>' . "\n" . '<figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // So far we've tested that the caption filter works correctly. But we also
     // want to make sure that it works well in tandem with the "Limit allowed
@@ -216,45 +216,45 @@ public function testCaptionFilter() {
     // A plain URL preceded by text.
     $input = '<img data-caption="See https://www.drupal.org" src="llama.jpg" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>See https://www.drupal.org</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
+    $this->assertSame($expected, $test_with_html_filter($input));
+    $this->assertSame($input, $test_editor_xss_filter($input));
 
     // An anchor.
     $input = '<img data-caption="This is a &lt;a href=&quot;https://www.drupal.org&quot;&gt;quick&lt;/a&gt; test…" src="llama.jpg" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>This is a <a href="https://www.drupal.org">quick</a> test…</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
+    $this->assertSame($expected, $test_with_html_filter($input));
+    $this->assertSame($input, $test_editor_xss_filter($input));
 
     // A plain URL surrounded by parentheses.
     $input = '<img data-caption="(https://www.drupal.org)" src="llama.jpg" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>(https://www.drupal.org)</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
+    $this->assertSame($expected, $test_with_html_filter($input));
+    $this->assertSame($input, $test_editor_xss_filter($input));
 
     // A source being credited.
     $input = '<img data-caption="Source: Wikipedia" src="llama.jpg" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>Source: Wikipedia</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
+    $this->assertSame($expected, $test_with_html_filter($input));
+    $this->assertSame($input, $test_editor_xss_filter($input));
 
     // A source being credited, without a space after the colon.
     $input = '<img data-caption="Source:Wikipedia" src="llama.jpg" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>Source:Wikipedia</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
+    $this->assertSame($expected, $test_with_html_filter($input));
+    $this->assertSame($input, $test_editor_xss_filter($input));
 
     // A pretty crazy edge case where we have two colons.
     $input = '<img data-caption="Interesting (Scope resolution operator ::)" src="llama.jpg" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>Interesting (Scope resolution operator ::)</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
+    $this->assertSame($expected, $test_with_html_filter($input));
+    $this->assertSame($input, $test_editor_xss_filter($input));
 
     // An evil anchor (to ensure XSS filtering is applied to the caption also).
     $input = '<img data-caption="This is an &lt;a href=&quot;javascript:alert();&quot;&gt;evil&lt;/a&gt; test…" src="llama.jpg" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>This is an <a href="alert();">evil</a> test…</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
+    $this->assertSame($expected, $test_with_html_filter($input));
     $expected_xss_filtered = '<img data-caption="This is an &lt;a href=&quot;alert();&quot;&gt;evil&lt;/a&gt; test…" src="llama.jpg" />';
-    $this->assertIdentical($expected_xss_filtered, $test_editor_xss_filter($input));
+    $this->assertSame($expected_xss_filtered, $test_editor_xss_filter($input));
   }
 
   /**
@@ -283,33 +283,33 @@ public function testAlignAndCaptionFilters() {
     $input = '<img src="llama.jpg" data-caption="Loquacious llama!" data-align="left" />';
     $expected = '<figure role="group" class="align-left"><img src="llama.jpg" /><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
     $input = '<img src="llama.jpg" data-caption="Loquacious llama!" data-align="center" />';
     $expected = '<figure role="group" class="align-center"><img src="llama.jpg" /><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
     $input = '<img src="llama.jpg" data-caption="Loquacious llama!" data-align="right" />';
     $expected = '<figure role="group" class="align-right"><img src="llama.jpg" /><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // Both data-caption and data-align attributes, but a disallowed data-align
     // attribute value.
     $input = '<img src="llama.jpg" data-caption="Loquacious llama!" data-align="left foobar" />';
     $expected = '<figure role="group"><img src="llama.jpg" /><figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
 
     // Ensure both filters together work for linked images.
     $input = '<a href="http://example.com/llamas/are/awesome/but/kittens/are/cool/too"><img src="llama.jpg" data-caption="Loquacious llama!" data-align="center" /></a>';
     $expected = '<figure role="group" class="align-center"><a href="http://example.com/llamas/are/awesome/but/kittens/are/cool/too"><img src="llama.jpg" /></a>' . "\n" . '<figcaption>Loquacious llama!</figcaption></figure>';
     $output = $test($input);
-    $this->assertIdentical($expected, $output->getProcessedText());
-    $this->assertIdentical($attached_library, $output->getAttachments());
+    $this->assertSame($expected, $output->getProcessedText());
+    $this->assertSame($attached_library, $output->getAttachments());
   }
 
   /**
@@ -417,38 +417,38 @@ public function testHtmlFilter() {
     // HTML filter is not able to secure some tags, these should never be
     // allowed.
     $f = (string) $filter->process('<script />', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '', 'HTML filter should remove script tags.');
+    $this->assertSame($f, '', 'HTML filter should remove script tags.');
 
     $f = (string) $filter->process('<iframe />', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '', 'HTML filter should remove iframe tags.');
+    $this->assertSame($f, '', 'HTML filter should remove iframe tags.');
 
     $f = (string) $filter->process('<object />', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '', 'HTML filter should remove object tags.');
+    $this->assertSame($f, '', 'HTML filter should remove object tags.');
 
     $f = (string) $filter->process('<style />', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '', 'HTML filter should remove style tags.');
+    $this->assertSame($f, '', 'HTML filter should remove style tags.');
 
     // Some tags make CSRF attacks easier, let the user take the risk herself.
     $f = (string) $filter->process('<img />', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '', 'HTML filter should remove img tags by default.');
+    $this->assertSame($f, '', 'HTML filter should remove img tags by default.');
 
     $f = (string) $filter->process('<input />', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '', 'HTML filter should remove input tags by default.');
+    $this->assertSame($f, '', 'HTML filter should remove input tags by default.');
 
     // Filtering content of some attributes is infeasible, these shouldn't be
     // allowed too.
     $f = (string) $filter->process('<p style="display: none;" />', Language::LANGCODE_NOT_SPECIFIED);
     $this->assertNoNormalized($f, 'style', 'HTML filter should remove style attributes.');
-    $this->assertIdentical($f, '<p></p>');
+    $this->assertSame($f, '<p></p>');
 
     $f = (string) $filter->process('<p onerror="alert(0);"></p>', Language::LANGCODE_NOT_SPECIFIED);
     $this->assertNoNormalized($f, 'onerror', 'HTML filter should remove on* attributes.');
-    $this->assertIdentical($f, '<p></p>');
+    $this->assertSame($f, '<p></p>');
 
     $f = (string) $filter->process('<code onerror>&nbsp;</code>', Language::LANGCODE_NOT_SPECIFIED);
     $this->assertNoNormalized($f, 'onerror', 'HTML filter should remove empty on* attributes.');
     // Note - this string has a decoded &nbsp; character.
-    $this->assertIdentical($f, '<code> </code>');
+    $this->assertSame($f, '<code> </code>');
 
     $f = (string) $filter->process('<br>', Language::LANGCODE_NOT_SPECIFIED);
     $this->assertNormalized($f, '<br />', 'HTML filter should allow line breaks.');
@@ -481,13 +481,13 @@ public function testHtmlFilter() {
       ]
     ]);
     $f = (string) $filter->process('<a kitten="cute" llama="awesome">link</a>', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '<a>link</a>', 'HTML filter removes allowed attributes that do not have an explicitly allowed value.');
+    $this->assertSame($f, '<a>link</a>', 'HTML filter removes allowed attributes that do not have an explicitly allowed value.');
     $f = (string) $filter->process('<a kitten="cute" llama="majestical">link</a>', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '<a llama="majestical">link</a>', 'HTML filter keeps explicitly allowed attributes with an attribute value that is also explicitly allowed.');
+    $this->assertSame($f, '<a llama="majestical">link</a>', 'HTML filter keeps explicitly allowed attributes with an attribute value that is also explicitly allowed.');
     $f = (string) $filter->process('<a kitten="cute" llama="awesome">link</a>', Language::LANGCODE_NOT_SPECIFIED);
     $this->assertNormalized($f, '<a>link</a>', 'HTML filter removes allowed attributes that have a not explicitly allowed value.');
     $f = (string) $filter->process('<a href="/beautiful-animals" kitten="cute" llama="epic majestical">link</a>', Language::LANGCODE_NOT_SPECIFIED);
-    $this->assertIdentical($f, '<a href="/beautiful-animals" llama="epic majestical">link</a>', 'HTML filter keeps explicitly allowed attributes with an attribute value that is also explicitly allowed.');
+    $this->assertSame($f, '<a href="/beautiful-animals" llama="epic majestical">link</a>', 'HTML filter keeps explicitly allowed attributes with an attribute value that is also explicitly allowed.');
   }
 
   /**
@@ -875,7 +875,7 @@ public function assertFilteredString($filter, $tests) {
     foreach ($tests as $source => $tasks) {
       $result = $filter->process($source, $filter)->getProcessedText();
       foreach ($tasks as $value => $is_expected) {
-        // Not using assertIdentical, since combination with strpos() is hard to grok.
+        // Not using assertSame, since combination with strpos() is hard to grok.
         if ($is_expected) {
           $success = $this->assertTrue(strpos($result, $value) !== FALSE, format_string('@source: @value found. Filtered result: @result.', [
             '@source' => var_export($source, TRUE),
@@ -931,7 +931,7 @@ public function testUrlFilterContent() {
     $input = file_get_contents($path . '/filter.url-input.txt');
     $expected = file_get_contents($path . '/filter.url-output.txt');
     $result = _filter_url($input, $filter);
-    $this->assertIdentical($result, $expected, 'Complex HTML document was correctly processed.');
+    $this->assertSame($result, $expected, 'Complex HTML document was correctly processed.');
   }
 
   /**
diff --git a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
index 19c000012d..5d9d510864 100644
--- a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
+++ b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
@@ -89,7 +89,7 @@ public function testForumIntegration() {
       'forum_index_sticky' => 'sticky',
       'forum_index_comment_count' => 'comment_count',
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $column_map);
+    $this->assertSameResultset($view, $expected_result, $column_map);
   }
 
 }
diff --git a/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php b/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php
index 302c3d1aee..c283638635 100644
--- a/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php
+++ b/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php
@@ -33,10 +33,10 @@ protected function setUp() {
    */
   public function testForumSettings() {
     $config = $this->config('forum.settings');
-    $this->assertIdentical(15, $config->get('topics.hot_threshold'));
-    $this->assertIdentical(25, $config->get('topics.page_limit'));
-    $this->assertIdentical(1, $config->get('topics.order'));
-    $this->assertIdentical('forums', $config->get('vocabulary'));
+    $this->assertSame(15, $config->get('topics.hot_threshold'));
+    $this->assertSame(25, $config->get('topics.page_limit'));
+    $this->assertSame(1, $config->get('topics.order'));
+    $this->assertSame('forums', $config->get('vocabulary'));
     // This is 'forum_block_num_0' in D6, but block:active:limit' in D8.
     $this->assertSame(3, $config->get('block.active.limit'));
     // This is 'forum_block_num_1' in D6, but 'block:new:limit' in D8.
diff --git a/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php b/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php
index cd1c7fc3ea..c4c1cc9abe 100644
--- a/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php
+++ b/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php
@@ -36,12 +36,12 @@ protected function setUp() {
    */
   public function testForumSettingsMigration() {
     $config = $this->config('forum.settings');
-    $this->assertIdentical(9, $config->get('block.active.limit'));
-    $this->assertIdentical(4, $config->get('block.new.limit'));
-    $this->assertIdentical(10, $config->get('topics.hot_threshold'));
-    $this->assertIdentical(25, $config->get('topics.page_limit'));
-    $this->assertIdentical(1, $config->get('topics.order'));
-    $this->assertIdentical('forums', $config->get('vocabulary'));
+    $this->assertSame(9, $config->get('block.active.limit'));
+    $this->assertSame(4, $config->get('block.new.limit'));
+    $this->assertSame(10, $config->get('topics.hot_threshold'));
+    $this->assertSame(25, $config->get('topics.page_limit'));
+    $this->assertSame(1, $config->get('topics.order'));
+    $this->assertSame('forums', $config->get('vocabulary'));
   }
 
 }
diff --git a/core/modules/hal/tests/src/Functional/FileDenormalizeTest.php b/core/modules/hal/tests/src/Functional/FileDenormalizeTest.php
index 05ee234893..7b25d5a44a 100644
--- a/core/modules/hal/tests/src/Functional/FileDenormalizeTest.php
+++ b/core/modules/hal/tests/src/Functional/FileDenormalizeTest.php
@@ -41,12 +41,12 @@ public function testFileDenormalize() {
 
     $this->assertTrue($denormalized instanceof File, 'A File instance was created.');
 
-    $this->assertIdentical('temporary://' . $file->getFilename(), $denormalized->getFileUri(), 'The expected file URI was found.');
+    $this->assertSame('temporary://' . $file->getFilename(), $denormalized->getFileUri(), 'The expected file URI was found.');
     $this->assertTrue(file_exists($denormalized->getFileUri()), 'The temporary file was found.');
 
-    $this->assertIdentical($file->uuid(), $denormalized->uuid(), 'The expected UUID was found');
-    $this->assertIdentical($file->getMimeType(), $denormalized->getMimeType(), 'The expected MIME type was found.');
-    $this->assertIdentical($file->getFilename(), $denormalized->getFilename(), 'The expected filename was found.');
+    $this->assertSame($file->uuid(), $denormalized->uuid(), 'The expected UUID was found');
+    $this->assertSame($file->getMimeType(), $denormalized->getMimeType(), 'The expected MIME type was found.');
+    $this->assertSame($file->getFilename(), $denormalized->getFilename(), 'The expected filename was found.');
     $this->assertTrue($denormalized->isPermanent(), 'The file has a permanent status.');
 
     // Try to denormalize with the file uri only.
@@ -64,11 +64,11 @@ public function testFileDenormalize() {
 
     $denormalized = $serializer->denormalize($data, 'Drupal\file\Entity\File', 'hal_json');
 
-    $this->assertIdentical('temporary://' . $file_name, $denormalized->getFileUri(), 'The expected file URI was found.');
+    $this->assertSame('temporary://' . $file_name, $denormalized->getFileUri(), 'The expected file URI was found.');
     $this->assertTrue(file_exists($denormalized->getFileUri()), 'The temporary file was found.');
 
-    $this->assertIdentical('text/plain', $denormalized->getMimeType(), 'The expected MIME type was found.');
-    $this->assertIdentical($file_name, $denormalized->getFilename(), 'The expected filename was found.');
+    $this->assertSame('text/plain', $denormalized->getMimeType(), 'The expected MIME type was found.');
+    $this->assertSame($file_name, $denormalized->getFilename(), 'The expected filename was found.');
     $this->assertFalse($denormalized->isPermanent(), 'The file has a permanent status.');
   }
 
diff --git a/core/modules/hal/tests/src/Functional/Update/CreateHalSettingsForLinkDomainUpdateTest.php b/core/modules/hal/tests/src/Functional/Update/CreateHalSettingsForLinkDomainUpdateTest.php
index 5afed645c5..fe4442d710 100644
--- a/core/modules/hal/tests/src/Functional/Update/CreateHalSettingsForLinkDomainUpdateTest.php
+++ b/core/modules/hal/tests/src/Functional/Update/CreateHalSettingsForLinkDomainUpdateTest.php
@@ -29,14 +29,14 @@ public function setDatabaseDumpFiles() {
   public function testHalSettingsCreated() {
     // Make sure we have the expected values before the update.
     $hal_settings = $this->config('hal.settings');
-    $this->assertIdentical([], $hal_settings->getRawData());
+    $this->assertSame([], $hal_settings->getRawData());
 
     $this->runUpdates();
 
     // Make sure we have the expected values after the update.
     $hal_settings = \Drupal::configFactory()->get('hal.settings');
     $this->assertTrue(array_key_exists('link_domain', $hal_settings->getRawData()));
-    $this->assertIdentical(NULL, $hal_settings->getRawData()['link_domain']);
+    $this->assertSame(NULL, $hal_settings->getRawData()['link_domain']);
   }
 
 }
diff --git a/core/modules/hal/tests/src/Functional/Update/MigrateLinkDomainSettingFromRestToHalUpdateTest.php b/core/modules/hal/tests/src/Functional/Update/MigrateLinkDomainSettingFromRestToHalUpdateTest.php
index 344caf1e1c..3f0df7e776 100644
--- a/core/modules/hal/tests/src/Functional/Update/MigrateLinkDomainSettingFromRestToHalUpdateTest.php
+++ b/core/modules/hal/tests/src/Functional/Update/MigrateLinkDomainSettingFromRestToHalUpdateTest.php
@@ -30,17 +30,17 @@ public function setDatabaseDumpFiles() {
   public function testLinkDomainMigratedFromRestSettingsToHalSettings() {
     // Make sure we have the expected values before the update.
     $hal_settings = $this->config('hal.settings');
-    $this->assertIdentical([], $hal_settings->getRawData());
+    $this->assertSame([], $hal_settings->getRawData());
     $rest_settings = $this->config('rest.settings');
     $this->assertTrue(array_key_exists('link_domain', $rest_settings->getRawData()));
-    $this->assertIdentical('http://example.com', $rest_settings->getRawData()['link_domain']);
+    $this->assertSame('http://example.com', $rest_settings->getRawData()['link_domain']);
 
     $this->runUpdates();
 
     // Make sure we have the expected values after the update.
     $hal_settings = \Drupal::configFactory()->get('hal.settings');
     $this->assertTrue(array_key_exists('link_domain', $hal_settings->getRawData()));
-    $this->assertIdentical('http://example.com', $hal_settings->getRawData()['link_domain']);
+    $this->assertSame('http://example.com', $hal_settings->getRawData()['link_domain']);
     $rest_settings = $this->config('rest.settings');
     $this->assertFalse(array_key_exists('link_domain', $rest_settings->getRawData()));
   }
diff --git a/core/modules/history/tests/src/Functional/HistoryTest.php b/core/modules/history/tests/src/Functional/HistoryTest.php
index 065b9af7aa..0eb5af0ccc 100644
--- a/core/modules/history/tests/src/Functional/HistoryTest.php
+++ b/core/modules/history/tests/src/Functional/HistoryTest.php
@@ -119,7 +119,7 @@ public function testHistory() {
     $response = $this->getNodeReadTimestamps([$nid]);
     $this->assertEquals(200, $response->getStatusCode());
     $json = Json::decode($response->getBody());
-    $this->assertIdentical([1 => 0], $json, 'The node has not yet been read.');
+    $this->assertSame([1 => 0], $json, 'The node has not yet been read.');
 
     // View the node.
     $this->drupalGet('node/' . $nid);
@@ -140,7 +140,7 @@ public function testHistory() {
     $response = $this->getNodeReadTimestamps([$nid]);
     $this->assertEquals(200, $response->getStatusCode());
     $json = Json::decode($response->getBody());
-    $this->assertIdentical([1 => $timestamp], $json, 'The node has been read.');
+    $this->assertSame([1 => $timestamp], $json, 'The node has been read.');
 
     // Failing to specify node IDs for the first endpoint should return a 404.
     $response = $this->getNodeReadTimestamps([]);
diff --git a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
index b9d345e1db..e8d19168d0 100644
--- a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
+++ b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
@@ -101,7 +101,7 @@ public function testHandlers() {
     $view->setDisplay('page_2');
     $this->executeView($view);
     $this->assertEqual(count($view->result), 1);
-    $this->assertIdenticalResultset($view, [['nid' => $nodes[0]->id()]], $column_map);
+    $this->assertSameResultset($view, [['nid' => $nodes[0]->id()]], $column_map);
 
     // Install Comment module and make sure that content types without comment
     // field will not break the view.
diff --git a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
index 44254c6141..6b59e18fd2 100644
--- a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
@@ -232,7 +232,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s
     $generated_uri = $this->style->buildUri($original_uri);
     $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
     $generate_url = $this->style->buildUrl($original_uri, $clean_url);
-    $this->assertIdentical(strpos($generate_url, IMAGE_DERIVATIVE_TOKEN . '='), FALSE, 'The security token does not appear in the image style URL.');
+    $this->assertSame(strpos($generate_url, IMAGE_DERIVATIVE_TOKEN . '='), FALSE, 'The security token does not appear in the image style URL.');
     $this->drupalGet($generate_url);
     $this->assertResponse(200, 'Image was accessible at the URL with a missing token.');
 
diff --git a/core/modules/image/src/Tests/Views/RelationshipUserImageDataTest.php b/core/modules/image/src/Tests/Views/RelationshipUserImageDataTest.php
index 55cecc0fc0..7767292a93 100644
--- a/core/modules/image/src/Tests/Views/RelationshipUserImageDataTest.php
+++ b/core/modules/image/src/Tests/Views/RelationshipUserImageDataTest.php
@@ -82,7 +82,7 @@ public function testViewsHandlerRelationshipUserImageData() {
         'user',
       ],
     ];
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
     $this->executeView($view);
     $expected_result = [
       [
@@ -90,7 +90,7 @@ public function testViewsHandlerRelationshipUserImageData() {
       ],
     ];
     $column_map = ['file_managed_user__user_picture_fid' => 'file_managed_user__user_picture_fid'];
-    $this->assertIdenticalResultset($view, $expected_result, $column_map);
+    $this->assertSameResultset($view, $expected_result, $column_map);
   }
 
 }
diff --git a/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php b/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php
index fff27601ce..67675e5ab5 100644
--- a/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php
+++ b/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php
@@ -41,13 +41,13 @@ public function testDelete() {
     $view_display = EntityViewDisplay::load('node.page.default');
     // Checks that the formatter setting is replaced.
     if ($this->assertNotNull($component = $view_display->getComponent('foo'))) {
-      $this->assertIdentical($component['settings']['image_style'], 'thumbnail');
+      $this->assertSame($component['settings']['image_style'], 'thumbnail');
     }
     /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form_display */
     $form_display = EntityFormDisplay::load('node.page.default');
     // Check that the widget setting is replaced.
     if ($this->assertNotNull($component = $form_display->getComponent('foo'))) {
-      $this->assertIdentical($component['settings']['preview_image_style'], 'thumbnail');
+      $this->assertSame($component['settings']['preview_image_style'], 'thumbnail');
     }
 
     $this->drupalGet('admin/config/media/image-styles/manage/thumbnail/delete');
@@ -67,7 +67,7 @@ public function testDelete() {
     // Checks that widget setting is preserved with the image preview disabled.
     $form_display = EntityFormDisplay::load('node.page.default');
     $this->assertNotNull($widget = $form_display->getComponent('foo'));
-    $this->assertIdentical($widget['settings']['preview_image_style'], '');
+    $this->assertSame($widget['settings']['preview_image_style'], '');
 
     // Now, there's only one image style configured on the system: 'large'.
     $this->drupalGet('admin/config/media/image-styles/manage/large/delete');
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
index e92685b845..84cea22a31 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
@@ -56,8 +56,8 @@ public function testPassingMigration() {
     $style = ImageStyle::load('big_blue_cheese');
 
     // Check basic Style info.
-    $this->assertIdentical('big_blue_cheese', $style->get('name'), 'ImageStyle name set correctly');
-    $this->assertIdentical('big_blue_cheese', $style->get('label'), 'ImageStyle label set correctly');
+    $this->assertSame('big_blue_cheese', $style->get('name'), 'ImageStyle name set correctly');
+    $this->assertSame('big_blue_cheese', $style->get('label'), 'ImageStyle label set correctly');
 
     // Test effects.
     $effects = $style->getEffects();
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
index b95f0a2d58..9fab9542d3 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
@@ -29,7 +29,7 @@ public function testMigration() {
     // These settings are not recommended...
     $this->assertTrue($config->get('allow_insecure_derivatives'));
     $this->assertTrue($config->get('suppress_itok_output'));
-    $this->assertIdentical("core/modules/image/testsample.png", $config->get('preview_image'));
+    $this->assertSame("core/modules/image/testsample.png", $config->get('preview_image'));
   }
 
 }
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
index 534a4120c4..22e9428be3 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
@@ -53,19 +53,19 @@ protected function assertEntity($id, $label, array $expected_effect_plugins, arr
     $style = ImageStyle::load($id);
     $this->assertTrue($style instanceof ImageStyleInterface);
     /** @var \Drupal\image\ImageStyleInterface $style */
-    $this->assertIdentical($id, $style->id());
-    $this->assertIdentical($label, $style->label());
+    $this->assertSame($id, $style->id());
+    $this->assertSame($label, $style->label());
 
     // Check the number of effects associated with the style.
     $effects = $style->getEffects();
-    $this->assertIdentical(count($effects), count($expected_effect_plugins));
+    $this->assertSame(count($effects), count($expected_effect_plugins));
 
     $index = 0;
     foreach ($effects as $effect) {
       $this->assertTrue($effect instanceof ImageEffectBase);
-      $this->assertIdentical($expected_effect_plugins[$index], $effect->getPluginId());
+      $this->assertSame($expected_effect_plugins[$index], $effect->getPluginId());
       $config = $effect->getConfiguration();
-      $this->assertIdentical($expected_effect_config[$index], $config['data']);
+      $this->assertSame($expected_effect_config[$index], $config['data']);
       $index++;
     }
   }
diff --git a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
index 1303082c15..f5b619798f 100644
--- a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
@@ -96,17 +96,17 @@ protected function doTestLanguageBlockAuthenticated($block_label) {
       0 => ['langcode_class' => 'en', 'data-drupal-link-system-path' => 'user/2'],
       1 => ['langcode_class' => 'fr', 'data-drupal-link-system-path' => 'user/2'],
     ];
-    $this->assertIdentical($list_items, $expected_list_items, 'The list items have the correct attributes that will allow the drupal.active-link library to mark them as active.');
+    $this->assertSame($list_items, $expected_list_items, 'The list items have the correct attributes that will allow the drupal.active-link library to mark them as active.');
     $expected_anchors = [
       0 => ['hreflang' => 'en', 'data-drupal-link-system-path' => 'user/2'],
       1 => ['hreflang' => 'fr', 'data-drupal-link-system-path' => 'user/2'],
     ];
-    $this->assertIdentical($anchors, $expected_anchors, 'The anchors have the correct attributes that will allow the drupal.active-link library to mark them as active.');
+    $this->assertSame($anchors, $expected_anchors, 'The anchors have the correct attributes that will allow the drupal.active-link library to mark them as active.');
     $settings = $this->getDrupalSettings();
-    $this->assertIdentical($settings['path']['currentPath'], 'user/2', 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
-    $this->assertIdentical($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
-    $this->assertIdentical($settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
-    $this->assertIdentical($labels, ['English', 'français'], 'The language links labels are in their own language on the language switcher block.');
+    $this->assertSame($settings['path']['currentPath'], 'user/2', 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($labels, ['English', 'français'], 'The language links labels are in their own language on the language switcher block.');
   }
 
   /**
@@ -156,9 +156,9 @@ protected function doTestLanguageBlockAnonymous($block_label) {
       }
       $labels[] = $link->getText();
     }
-    $this->assertIdentical($links, ['active' => ['en'], 'inactive' => ['fr']], 'Only the current language list item is marked as active on the language switcher block.');
-    $this->assertIdentical($anchors, ['active' => ['en'], 'inactive' => ['fr']], 'Only the current language anchor is marked as active on the language switcher block.');
-    $this->assertIdentical($labels, ['English', 'français'], 'The language links labels are in their own language on the language switcher block.');
+    $this->assertSame($links, ['active' => ['en'], 'inactive' => ['fr']], 'Only the current language list item is marked as active on the language switcher block.');
+    $this->assertSame($anchors, ['active' => ['en'], 'inactive' => ['fr']], 'Only the current language anchor is marked as active on the language switcher block.');
+    $this->assertSame($labels, ['English', 'français'], 'The language links labels are in their own language on the language switcher block.');
   }
 
   /**
@@ -314,9 +314,9 @@ protected function doTestLanguageLinkActiveClassAuthenticated() {
 
     // Verify that drupalSettings contains the correct values.
     $settings = $this->getDrupalSettings();
-    $this->assertIdentical($settings['path']['currentPath'], $path, 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
-    $this->assertIdentical($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
-    $this->assertIdentical($settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['currentPath'], $path, 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
 
     // Test links generated by the link generator on a French page.
     $current_language = 'French';
@@ -339,9 +339,9 @@ protected function doTestLanguageLinkActiveClassAuthenticated() {
 
     // Verify that drupalSettings contains the correct values.
     $settings = $this->getDrupalSettings();
-    $this->assertIdentical($settings['path']['currentPath'], $path, 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
-    $this->assertIdentical($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
-    $this->assertIdentical($settings['path']['currentLanguage'], 'fr', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['currentPath'], $path, 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
+    $this->assertSame($settings['path']['currentLanguage'], 'fr', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
   }
 
   /**
diff --git a/core/modules/language/tests/src/Functional/Migrate/MigrateLanguageTest.php b/core/modules/language/tests/src/Functional/Migrate/MigrateLanguageTest.php
index 9a2702da2b..c8eae9e75a 100644
--- a/core/modules/language/tests/src/Functional/Migrate/MigrateLanguageTest.php
+++ b/core/modules/language/tests/src/Functional/Migrate/MigrateLanguageTest.php
@@ -33,9 +33,9 @@ protected function assertLanguage($id, $label, $direction = ConfigurableLanguage
     /** @var \Drupal\language\ConfigurableLanguageInterface $language */
     $language = ConfigurableLanguage::load($id);
     $this->assertTrue($language instanceof ConfigurableLanguageInterface);
-    $this->assertIdentical($label, $language->label());
-    $this->assertIdentical($direction, $language->getDirection());
-    $this->assertIdentical(0, $language->getWeight());
+    $this->assertSame($label, $language->label());
+    $this->assertSame($direction, $language->getDirection());
+    $this->assertSame(0, $language->getWeight());
     $this->assertFalse($language->isLocked());
   }
 
diff --git a/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php b/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php
index 287ab95288..61c51854e5 100644
--- a/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php
@@ -41,7 +41,7 @@ public function testDependencyInjectedNewDefaultLanguage() {
     // The language system creates a Language object which contains the
     // same properties as the new default language object.
     $result = \Drupal::languageManager()->getCurrentLanguage();
-    $this->assertIdentical($result->getId(), 'fr');
+    $this->assertSame($result->getId(), 'fr');
 
     // Delete the language to check that we fallback to the default.
     try {
@@ -57,7 +57,7 @@ public function testDependencyInjectedNewDefaultLanguage() {
 
     entity_delete_multiple('configurable_language', ['fr']);
     $result = \Drupal::languageManager()->getCurrentLanguage();
-    $this->assertIdentical($result->getId(), $default_language->getId());
+    $this->assertSame($result->getId(), $default_language->getId());
   }
 
 }
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
index d7a4551d6f..5ad5c923a2 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
@@ -33,9 +33,9 @@ protected function setUp() {
   public function testLanguageContent() {
     // Assert that a translatable content is still translatable.
     $config = $this->config('language.content_settings.node.blog');
-    $this->assertIdentical($config->get('target_entity_type_id'), 'node');
-    $this->assertIdentical($config->get('target_bundle'), 'blog');
-    $this->assertIdentical($config->get('default_langcode'), 'current_interface');
+    $this->assertSame($config->get('target_entity_type_id'), 'node');
+    $this->assertSame($config->get('target_bundle'), 'blog');
+    $this->assertSame($config->get('default_langcode'), 'current_interface');
     $this->assertFalse($config->get('language_alterable'));
     $this->assertTrue($config->get('third_party_settings.content_translation.enabled'));
 
diff --git a/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php b/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php
index 3f69cf491b..52d0000d50 100644
--- a/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php
@@ -38,7 +38,7 @@ public function testArgument() {
       $expected = [
         ['name' => $name],
       ];
-      $this->assertIdenticalResultset($view, $expected, ['views_test_data_name' => 'name']);
+      $this->assertSameResultset($view, $expected, ['views_test_data_name' => 'name']);
       $view->destroy();
     }
   }
diff --git a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php
index c94d623e93..96a1ad9a74 100644
--- a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php
@@ -39,7 +39,7 @@ public function testFilter() {
       $expected = [
         ['name' => $name],
       ];
-      $this->assertIdenticalResultset($view, $expected, ['views_test_data_name' => 'name']);
+      $this->assertSameResultset($view, $expected, ['views_test_data_name' => 'name']);
 
       $expected = [
         '***LANGUAGE_site_default***',
@@ -50,7 +50,7 @@ public function testFilter() {
         'und',
         'zxx'
       ];
-      $this->assertIdentical(array_keys($view->filter['langcode']->getValueOptions()), $expected);
+      $this->assertSame(array_keys($view->filter['langcode']->getValueOptions()), $expected);
 
       $view->destroy();
     }
diff --git a/core/modules/link/tests/src/Kernel/LinkItemTest.php b/core/modules/link/tests/src/Kernel/LinkItemTest.php
index ff4f840567..4991b2dc5c 100644
--- a/core/modules/link/tests/src/Kernel/LinkItemTest.php
+++ b/core/modules/link/tests/src/Kernel/LinkItemTest.php
@@ -136,7 +136,7 @@ public function testLinkItem() {
     $entity->field_test = ['uri' => 'internal:/node/add'];
     $this->assertEqual($entity->field_test->uri, 'internal:/node/add');
     $this->assertNull($entity->field_test->title);
-    $this->assertIdentical($entity->field_test->options, []);
+    $this->assertSame($entity->field_test->options, []);
 
     // Check that if set uri and serialize options then the default values are
     // properly initialized.
@@ -153,7 +153,7 @@ public function testLinkItem() {
     $entity->field_test = 'internal:/node/add';
     $this->assertEqual($entity->field_test->uri, 'internal:/node/add');
     $this->assertNull($entity->field_test->title);
-    $this->assertIdentical($entity->field_test->options, []);
+    $this->assertSame($entity->field_test->options, []);
 
     // Check that setting options to NULL does not trigger an error when
     // calling getUrl();
diff --git a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
index 581c98fbab..8f43d53200 100644
--- a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
@@ -235,8 +235,8 @@ public function testLanguageContext() {
 
     // We cast the return value of t() to string so as to retrieve the
     // translated value, rendered as a string.
-    $this->assertIdentical((string) t('May', [], ['langcode' => 'hr', 'context' => 'Long month name']), 'Svibanj', 'Long month name context is working.');
-    $this->assertIdentical((string) t('May', [], ['langcode' => 'hr']), 'Svi.', 'Default context is working.');
+    $this->assertSame((string) t('May', [], ['langcode' => 'hr', 'context' => 'Long month name']), 'Svibanj', 'Long month name context is working.');
+    $this->assertSame((string) t('May', [], ['langcode' => 'hr']), 'Svi.', 'Default context is working.');
   }
 
   /**
@@ -251,7 +251,7 @@ public function testEmptyMsgstr() {
     ]);
 
     $this->assertRaw(t('One translation file imported. %number translations were added, %update translations were updated and %delete translations were removed.', ['%number' => 1, '%update' => 0, '%delete' => 0]), 'The translation file was successfully imported.');
-    $this->assertIdentical((string) t('Operations', [], ['langcode' => $langcode]), 'Műveletek', 'String imported and translated.');
+    $this->assertSame((string) t('Operations', [], ['langcode' => $langcode]), 'Műveletek', 'String imported and translated.');
 
     // Try importing a .po file.
     $this->importPoFile($this->getPoFileWithEmptyMsgstr(), [
diff --git a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
index 57916caf04..98d151f793 100644
--- a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
@@ -128,12 +128,12 @@ public function testGetPluralFormat() {
     foreach ($plural_tests as $langcode => $tests) {
       foreach ($tests as $count => $expected_plural_index) {
         // Assert that the we get the right plural index.
-        $this->assertIdentical(locale_get_plural($count, $langcode), $expected_plural_index, 'Computed plural index for ' . $langcode . ' for count ' . $count . ' is ' . $expected_plural_index);
+        $this->assertSame(locale_get_plural($count, $langcode), $expected_plural_index, 'Computed plural index for ' . $langcode . ' for count ' . $count . ' is ' . $expected_plural_index);
         // Assert that the we get the right translation for that. Change the
         // expected index as per the logic for translation lookups.
         $expected_plural_index = ($count == 1) ? 0 : $expected_plural_index;
         $expected_plural_string = str_replace('@count', $count, $plural_strings[$langcode][$expected_plural_index]);
-        $this->assertIdentical(\Drupal::translation()->formatPlural($count, '1 hour', '@count hours', [], ['langcode' => $langcode])->render(), $expected_plural_string, 'Plural translation of 1 hours / @count hours for count ' . $count . ' in ' . $langcode . ' is ' . $expected_plural_string);
+        $this->assertSame(\Drupal::translation()->formatPlural($count, '1 hour', '@count hours', [], ['langcode' => $langcode])->render(), $expected_plural_string, 'Plural translation of 1 hours / @count hours for count ' . $count . ' in ' . $langcode . ' is ' . $expected_plural_string);
         // DO NOT use translation to pass translated strings into
         // PluralTranslatableMarkup::createFromTranslatedString() this way. It
         // is designed to be used with *already* translated text like settings
@@ -141,7 +141,7 @@ public function testGetPluralFormat() {
         // the expected result data in that format.
         $translated_string = \Drupal::translation()->translate('1 hour' . PluralTranslatableMarkup::DELIMITER . '@count hours', [], ['langcode' => $langcode]);
         $plural = PluralTranslatableMarkup::createFromTranslatedString($count, $translated_string, [], ['langcode' => $langcode]);
-        $this->assertIdentical($plural->render(), $expected_plural_string);
+        $this->assertSame($plural->render(), $expected_plural_string);
       }
     }
   }
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
index 3a12efdf24..80d6256a17 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
@@ -419,7 +419,7 @@ protected function assertActiveConfig($config_name, $key, $value, $langcode) {
     $config = $this->configFactory->getEditable($config_name);
     return
       $this->assertEqual($config->get('langcode'), $langcode) &&
-      $this->assertIdentical($config->get($key), $value);
+      $this->assertSame($config->get($key), $value);
   }
 
   /**
@@ -440,7 +440,7 @@ protected function assertNoTranslation($config_name, $langcode) {
       'language' => $langcode,
       'translated' => TRUE,
     ]);
-    return $this->assertIdentical([], $strings);
+    return $this->assertSame([], $strings);
   }
 
   /**
@@ -467,11 +467,11 @@ protected function assertTranslation($config_name, $translation, $langcode, $cus
       'language' => $langcode,
       'translated' => TRUE,
     ]);
-    $pass = $this->assertIdentical(1, count($strings));
+    $pass = $this->assertSame(1, count($strings));
     $string = reset($strings);
     if ($this->assertTrue($string instanceof StringInterface)) {
       /** @var \Drupal\locale\StringInterface $string */
-      $pass = $pass && $this->assertIdentical($translation, $string->getString());
+      $pass = $pass && $this->assertSame($translation, $string->getString());
       $pass = $pass && $this->assertTrue($string->isTranslation());
       if ($this->assertTrue($string instanceof TranslationString)) {
         /** @var \Drupal\locale\TranslationString $string */
diff --git a/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php b/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
index 370c0146de..17e095b2a8 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
@@ -49,7 +49,7 @@ public function testLocaleTranslationClearCacheProjects() {
     $this->moduleHandler->loadInclude('locale', 'inc', 'locale.translation');
 
     $expected = [];
-    $this->assertIdentical($expected, locale_translation_get_projects());
+    $this->assertSame($expected, locale_translation_get_projects());
 
     $this->projectStorage->set('foo', []);
     $expected['foo'] = new \stdClass();
diff --git a/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php b/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
index b4449184a3..0113b70c6e 100644
--- a/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
+++ b/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
@@ -32,8 +32,8 @@ protected function setUp() {
    */
   public function testLocaleSettings() {
     $config = $this->config('locale.settings');
-    $this->assertIdentical(TRUE, $config->get('cache_strings'));
-    $this->assertIdentical('languages', $config->get('javascript.directory'));
+    $this->assertSame(TRUE, $config->get('cache_strings'));
+    $this->assertSame('languages', $config->get('javascript.directory'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'locale.settings', $config->get());
   }
 
diff --git a/core/modules/media/tests/src/Functional/MediaFunctionalTestCreateMediaTypeTrait.php b/core/modules/media/tests/src/Functional/MediaFunctionalTestCreateMediaTypeTrait.php
index 4197caab65..8a092af360 100644
--- a/core/modules/media/tests/src/Functional/MediaFunctionalTestCreateMediaTypeTrait.php
+++ b/core/modules/media/tests/src/Functional/MediaFunctionalTestCreateMediaTypeTrait.php
@@ -42,7 +42,7 @@ protected function createMediaType(array $values = [], $source = 'test') {
 
     // @todo Rename to assertSame() when #1945040 is done.
     // @see https://www.drupal.org/node/1945040
-    $this->assertIdentical(SAVED_NEW, $status, 'Media type was created successfully.');
+    $this->assertSame(SAVED_NEW, $status, 'Media type was created successfully.');
 
     // Ensure that the source field exists.
     $source = $media_type->getSource();
diff --git a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
index 12d8d35afd..858754ad4c 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
@@ -65,7 +65,7 @@ public function testRediscover() {
     $this->assertEqual('route_name_2', $tree_element->link->getRouteName());
     $title = $tree_element->link->getTitle();
     $this->assertFalse($title instanceof TranslatableMarkup);
-    $this->assertIdentical('<script>alert("Welcome to the discovered jungle!")</script>', $title);
+    $this->assertSame('<script>alert("Welcome to the discovered jungle!")</script>', $title);
 
     // Create a hierarchy.
     \Drupal::state()->set('menu_link_content_dynamic_route.routes', [
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
index f1368ed43b..3a7e4cc671 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
@@ -31,45 +31,45 @@ protected function setUp() {
    */
   public function testMenuLinks() {
     $menu_link = MenuLinkContent::load(138);
-    $this->assertIdentical('Test 1', $menu_link->getTitle());
-    $this->assertIdentical('secondary-links', $menu_link->getMenuName());
-    $this->assertIdentical('Test menu link 1', $menu_link->getDescription());
-    $this->assertIdentical(TRUE, $menu_link->isEnabled());
-    $this->assertIdentical(FALSE, $menu_link->isExpanded());
-    $this->assertIdentical(['attributes' => ['title' => 'Test menu link 1']], $menu_link->link->options);
-    $this->assertIdentical('internal:/user/login', $menu_link->link->uri);
-    $this->assertIdentical(-50, $menu_link->getWeight());
+    $this->assertSame('Test 1', $menu_link->getTitle());
+    $this->assertSame('secondary-links', $menu_link->getMenuName());
+    $this->assertSame('Test menu link 1', $menu_link->getDescription());
+    $this->assertSame(TRUE, $menu_link->isEnabled());
+    $this->assertSame(FALSE, $menu_link->isExpanded());
+    $this->assertSame(['attributes' => ['title' => 'Test menu link 1']], $menu_link->link->options);
+    $this->assertSame('internal:/user/login', $menu_link->link->uri);
+    $this->assertSame(-50, $menu_link->getWeight());
 
     $menu_link = MenuLinkContent::load(139);
-    $this->assertIdentical('Test 2', $menu_link->getTitle());
-    $this->assertIdentical('secondary-links', $menu_link->getMenuName());
-    $this->assertIdentical('Test menu link 2', $menu_link->getDescription());
-    $this->assertIdentical(TRUE, $menu_link->isEnabled());
-    $this->assertIdentical(TRUE, $menu_link->isExpanded());
-    $this->assertIdentical(['query' => 'foo=bar', 'attributes' => ['title' => 'Test menu link 2']], $menu_link->link->options);
-    $this->assertIdentical('internal:/admin', $menu_link->link->uri);
-    $this->assertIdentical(-49, $menu_link->getWeight());
+    $this->assertSame('Test 2', $menu_link->getTitle());
+    $this->assertSame('secondary-links', $menu_link->getMenuName());
+    $this->assertSame('Test menu link 2', $menu_link->getDescription());
+    $this->assertSame(TRUE, $menu_link->isEnabled());
+    $this->assertSame(TRUE, $menu_link->isExpanded());
+    $this->assertSame(['query' => 'foo=bar', 'attributes' => ['title' => 'Test menu link 2']], $menu_link->link->options);
+    $this->assertSame('internal:/admin', $menu_link->link->uri);
+    $this->assertSame(-49, $menu_link->getWeight());
 
     $menu_link = MenuLinkContent::load(140);
-    $this->assertIdentical('Drupal.org', $menu_link->getTitle());
-    $this->assertIdentical('secondary-links', $menu_link->getMenuName());
-    $this->assertIdentical(NULL, $menu_link->getDescription());
-    $this->assertIdentical(TRUE, $menu_link->isEnabled());
-    $this->assertIdentical(FALSE, $menu_link->isExpanded());
-    $this->assertIdentical(['attributes' => ['title' => '']], $menu_link->link->options);
-    $this->assertIdentical('https://www.drupal.org', $menu_link->link->uri);
-    $this->assertIdentical(-50, $menu_link->getWeight());
+    $this->assertSame('Drupal.org', $menu_link->getTitle());
+    $this->assertSame('secondary-links', $menu_link->getMenuName());
+    $this->assertSame(NULL, $menu_link->getDescription());
+    $this->assertSame(TRUE, $menu_link->isEnabled());
+    $this->assertSame(FALSE, $menu_link->isExpanded());
+    $this->assertSame(['attributes' => ['title' => '']], $menu_link->link->options);
+    $this->assertSame('https://www.drupal.org', $menu_link->link->uri);
+    $this->assertSame(-50, $menu_link->getWeight());
 
     // assert that missing title attributes don't stop or break migration.
     $menu_link = MenuLinkContent::load(393);
-    $this->assertIdentical('Test 3', $menu_link->getTitle());
-    $this->assertIdentical('secondary-links', $menu_link->getMenuName());
-    $this->assertIdentical(NULL, $menu_link->getDescription());
-    $this->assertIdentical(TRUE, $menu_link->isEnabled());
-    $this->assertIdentical(FALSE, $menu_link->isExpanded());
-    $this->assertIdentical([], $menu_link->link->options);
-    $this->assertIdentical('internal:/user/login', $menu_link->link->uri);
-    $this->assertIdentical(-47, $menu_link->getWeight());
+    $this->assertSame('Test 3', $menu_link->getTitle());
+    $this->assertSame('secondary-links', $menu_link->getMenuName());
+    $this->assertSame(NULL, $menu_link->getDescription());
+    $this->assertSame(TRUE, $menu_link->isEnabled());
+    $this->assertSame(FALSE, $menu_link->isExpanded());
+    $this->assertSame([], $menu_link->link->options);
+    $this->assertSame('internal:/user/login', $menu_link->link->uri);
+    $this->assertSame(-47, $menu_link->getWeight());
   }
 
 }
diff --git a/core/modules/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php
index dde95027bd..a18c1c1313 100644
--- a/core/modules/menu_ui/src/Tests/MenuTest.php
+++ b/core/modules/menu_ui/src/Tests/MenuTest.php
@@ -95,7 +95,7 @@ public function testMenu() {
     $before_count = $menu_link_manager->countMenuLinks(NULL);
     $menu_link_manager->rebuild();
     $after_count = $menu_link_manager->countMenuLinks(NULL);
-    $this->assertIdentical($before_count, $after_count, 'MenuLinkManager::rebuild() does not add more links');
+    $this->assertSame($before_count, $after_count, 'MenuLinkManager::rebuild() does not add more links');
     // Do standard user tests.
     // Log in the user.
     $this->drupalLogin($this->authenticatedUser);
@@ -580,7 +580,7 @@ public function testBlockContextualLinks() {
     $response = $this->drupalPost('contextual/render', 'application/json', $post, ['query' => ['destination' => 'test-page']]);
     $this->assertResponse(200);
     $json = Json::decode($response);
-    $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="entitymenuedit-form"><a href="' . base_path() . 'admin/structure/menu/manage/' . $custom_menu->id() . '">Edit menu</a></li></ul>');
+    $this->assertSame($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="entitymenuedit-form"><a href="' . base_path() . 'admin/structure/menu/manage/' . $custom_menu->id() . '">Edit menu</a></li></ul>');
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
index 019ac42ab9..c2f308db2e 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
@@ -53,17 +53,17 @@ public function testEmbeddedData() {
       unset($data_row['ids']);
       $results[] = $data_row;
     }
-    $this->assertIdentical($results, $data_rows);
+    $this->assertSame($results, $data_rows);
 
     // Validate the public APIs.
-    $this->assertIdentical($source->count(), count($data_rows));
-    $this->assertIdentical($source->getIds(), $ids);
+    $this->assertSame($source->count(), count($data_rows));
+    $this->assertSame($source->getIds(), $ids);
     $expected_fields = [
       'key' => 'key',
       'field1' => 'field1',
       'field2' => 'field2',
     ];
-    $this->assertIdentical($source->fields(), $expected_fields);
+    $this->assertSame($source->fields(), $expected_fields);
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
index 8dc4aa9ad4..9c8cdba96f 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
@@ -82,41 +82,41 @@ public function testMigrateEvents() {
 
     // Validate from the recorded state that the events were received.
     $event = $this->state->get('migrate_events_test.pre_import_event', []);
-    $this->assertIdentical($event['event_name'], MigrateEvents::PRE_IMPORT);
-    $this->assertIdentical($event['migration']->id(), $migration->id());
+    $this->assertSame($event['event_name'], MigrateEvents::PRE_IMPORT);
+    $this->assertSame($event['migration']->id(), $migration->id());
 
     $event = $this->state->get('migrate_events_test.post_import_event', []);
-    $this->assertIdentical($event['event_name'], MigrateEvents::POST_IMPORT);
-    $this->assertIdentical($event['migration']->id(), $migration->id());
+    $this->assertSame($event['event_name'], MigrateEvents::POST_IMPORT);
+    $this->assertSame($event['migration']->id(), $migration->id());
 
     $event = $this->state->get('migrate_events_test.map_save_event', []);
-    $this->assertIdentical($event['event_name'], MigrateEvents::MAP_SAVE);
+    $this->assertSame($event['event_name'], MigrateEvents::MAP_SAVE);
     // Validating the last row processed.
-    $this->assertIdentical($event['fields']['sourceid1'], 'dummy value');
-    $this->assertIdentical($event['fields']['destid1'], 'dummy value');
-    $this->assertIdentical($event['fields']['source_row_status'], 0);
+    $this->assertSame($event['fields']['sourceid1'], 'dummy value');
+    $this->assertSame($event['fields']['destid1'], 'dummy value');
+    $this->assertSame($event['fields']['source_row_status'], 0);
 
     $event = $this->state->get('migrate_events_test.map_delete_event', []);
-    $this->assertIdentical($event, []);
+    $this->assertSame($event, []);
 
     $event = $this->state->get('migrate_events_test.pre_row_save_event', []);
-    $this->assertIdentical($event['event_name'], MigrateEvents::PRE_ROW_SAVE);
-    $this->assertIdentical($event['migration']->id(), $migration->id());
+    $this->assertSame($event['event_name'], MigrateEvents::PRE_ROW_SAVE);
+    $this->assertSame($event['migration']->id(), $migration->id());
     // Validating the last row processed.
-    $this->assertIdentical($event['row']->getSourceProperty('data'), 'dummy value');
+    $this->assertSame($event['row']->getSourceProperty('data'), 'dummy value');
 
     $event = $this->state->get('migrate_events_test.post_row_save_event', []);
-    $this->assertIdentical($event['event_name'], MigrateEvents::POST_ROW_SAVE);
-    $this->assertIdentical($event['migration']->id(), $migration->id());
+    $this->assertSame($event['event_name'], MigrateEvents::POST_ROW_SAVE);
+    $this->assertSame($event['migration']->id(), $migration->id());
     // Validating the last row processed.
-    $this->assertIdentical($event['row']->getSourceProperty('data'), 'dummy value');
-    $this->assertIdentical($event['destination_id_values']['value'], 'dummy value');
+    $this->assertSame($event['row']->getSourceProperty('data'), 'dummy value');
+    $this->assertSame($event['destination_id_values']['value'], 'dummy value');
 
     // Generate a map delete event.
     $migration->getIdMap()->delete(['data' => 'dummy value']);
     $event = $this->state->get('migrate_events_test.map_delete_event', []);
-    $this->assertIdentical($event['event_name'], MigrateEvents::MAP_DELETE);
-    $this->assertIdentical($event['source_id'], ['data' => 'dummy value']);
+    $this->assertSame($event['event_name'], MigrateEvents::MAP_DELETE);
+    $this->assertSame($event['source_id'], ['data' => 'dummy value']);
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
index 33013367e9..f980cd6877 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
@@ -80,7 +80,7 @@ public function testMessagesNotTeed() {
     // We don't ask for messages to be teed, so don't expect any.
     $executable = new MigrateExecutable($this->migration, $this);
     $executable->import();
-    $this->assertIdentical(count($this->messages), 0);
+    $this->assertSame(count($this->messages), 0);
   }
 
   /**
@@ -92,8 +92,8 @@ public function testMessagesTeed() {
       [$this, 'mapMessageRecorder']);
     $executable = new MigrateExecutable($this->migration, $this);
     $executable->import();
-    $this->assertIdentical(count($this->messages), 1);
-    $this->assertIdentical(reset($this->messages), "source_message: 'a message' is not an array");
+    $this->assertSame(count($this->messages), 1);
+    $this->assertSame(reset($this->messages), "source_message: 'a message' is not an array");
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php b/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php
index 7dc0b5b9b6..51503a2f07 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php
@@ -30,7 +30,7 @@ public function testStatus() {
 
     // Default status is idle.
     $status = $migration->getStatus();
-    $this->assertIdentical($status, MigrationInterface::STATUS_IDLE);
+    $this->assertSame($status, MigrationInterface::STATUS_IDLE);
 
     // Test setting and retrieving all known status values.
     $status_list = [
@@ -42,7 +42,7 @@ public function testStatus() {
     ];
     foreach ($status_list as $status) {
       $migration->setStatus($status);
-      $this->assertIdentical($migration->getStatus(), $status);
+      $this->assertSame($migration->getStatus(), $status);
     }
   }
 
diff --git a/core/modules/migrate_drupal/src/Tests/StubTestTrait.php b/core/modules/migrate_drupal/src/Tests/StubTestTrait.php
index 3bf00281a0..0bbd6e18ce 100644
--- a/core/modules/migrate_drupal/src/Tests/StubTestTrait.php
+++ b/core/modules/migrate_drupal/src/Tests/StubTestTrait.php
@@ -21,7 +21,7 @@ protected function performStubTest($entity_type_id) {
     $this->assertTrue($entity_id, 'Stub successfully created');
     if ($entity_id) {
       $violations = $this->validateStub($entity_type_id, $entity_id);
-      if (!$this->assertIdentical(count($violations), 0, 'Stub is a valid entity')) {
+      if (!$this->assertSame(count($violations), 0, 'Stub is a valid entity')) {
         foreach ($violations as $violation) {
           $this->fail((string) $violation->getMessage());
         }
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
index 7e36364e82..e11223b634 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
@@ -29,19 +29,19 @@ public function testPluginSelection() {
       $this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.');
     }
     catch (PluginNotFoundException $e) {
-      $this->assertIdentical($e->getMessage(), "Plugin ID 'filefield' was not found.");
+      $this->assertSame($e->getMessage(), "Plugin ID 'filefield' was not found.");
     }
 
-    $this->assertIdentical('link', $plugin_manager->getPluginIdFromFieldType('link', ['core' => 6]));
-    $this->assertIdentical('link_field', $plugin_manager->getPluginIdFromFieldType('link_field', ['core' => 7]));
-    $this->assertIdentical('image', $plugin_manager->getPluginIdFromFieldType('image', ['core' => 7]));
-    $this->assertIdentical('file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 7]));
-    $this->assertIdentical('d6_file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 6]));
-    $this->assertIdentical('d6_text', $plugin_manager->getPluginIdFromFieldType('text', ['core' => 6]));
-    $this->assertIdentical('d7_text', $plugin_manager->getPluginIdFromFieldType('text', ['core' => 7]));
+    $this->assertSame('link', $plugin_manager->getPluginIdFromFieldType('link', ['core' => 6]));
+    $this->assertSame('link_field', $plugin_manager->getPluginIdFromFieldType('link_field', ['core' => 7]));
+    $this->assertSame('image', $plugin_manager->getPluginIdFromFieldType('image', ['core' => 7]));
+    $this->assertSame('file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 7]));
+    $this->assertSame('d6_file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 6]));
+    $this->assertSame('d6_text', $plugin_manager->getPluginIdFromFieldType('text', ['core' => 6]));
+    $this->assertSame('d7_text', $plugin_manager->getPluginIdFromFieldType('text', ['core' => 7]));
 
     // Test fallback when no core version is specified.
-    $this->assertIdentical('d6_no_core_version_specified', $plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 6]));
+    $this->assertSame('d6_no_core_version_specified', $plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 6]));
 
     try {
       // If this test passes, getPluginIdFromFieldType will raise a
@@ -50,7 +50,7 @@ public function testPluginSelection() {
       $this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.');
     }
     catch (PluginNotFoundException $e) {
-      $this->assertIdentical($e->getMessage(), "Plugin ID 'd6_no_core_version_specified' was not found.");
+      $this->assertSame($e->getMessage(), "Plugin ID 'd6_no_core_version_specified' was not found.");
     }
   }
 
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
index 9c5ee58f2c..de1f3b3e89 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
@@ -64,9 +64,9 @@ public function testOverwriteAllMappedProperties() {
     $this->executeMigration('d6_user');
     /** @var \Drupal\user\UserInterface $account */
     $account = User::load(2);
-    $this->assertIdentical('john.doe', $account->label());
-    $this->assertIdentical('john.doe@example.com', $account->getEmail());
-    $this->assertIdentical('doe@example.com', $account->getInitialEmail());
+    $this->assertSame('john.doe', $account->label());
+    $this->assertSame('john.doe@example.com', $account->getEmail());
+    $this->assertSame('doe@example.com', $account->getInitialEmail());
   }
 
   /**
@@ -80,12 +80,12 @@ public function testOverwriteProperties() {
 
     /** @var \Drupal\user\UserInterface $account */
     $account = User::load(2);
-    $this->assertIdentical('john.doe', $account->label());
-    $this->assertIdentical('john.doe@example.com', $account->getEmail());
-    $this->assertIdentical('The answer is 42.', $account->signature->value);
+    $this->assertSame('john.doe', $account->label());
+    $this->assertSame('john.doe@example.com', $account->getEmail());
+    $this->assertSame('The answer is 42.', $account->signature->value);
     // This value is not overwritten because it's not listed in
     // overwrite_properties.
-    $this->assertIdentical('proto@zo.an', $account->getInitialEmail());
+    $this->assertSame('proto@zo.an', $account->getInitialEmail());
   }
 
   /**
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php b/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
index 1a30489d03..189f3372b7 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
@@ -25,7 +25,7 @@ public function testMigrateDependenciesOrder() {
     $migration_items = ['d6_comment', 'd6_filter_format', 'd6_node:page'];
     $migrations = $this->container->get('plugin.manager.migration')->createInstances($migration_items);
     $expected_order = ['d6_filter_format', 'd6_node:page', 'd6_comment'];
-    $this->assertIdentical(array_keys($migrations), $expected_order);
+    $this->assertSame(array_keys($migrations), $expected_order);
     $expected_requirements = [
       // d6_comment depends on d6_node:*, which the deriver expands into every
       // variant of d6_node.
@@ -52,9 +52,9 @@ public function testMigrateDependenciesOrder() {
     // Migration dependencies for comment include dependencies for node
     // migration as well.
     $actual_requirements = $migrations['d6_comment']->get('requirements');
-    $this->assertIdentical(count($actual_requirements), count($expected_requirements));
+    $this->assertSame(count($actual_requirements), count($expected_requirements));
     foreach ($expected_requirements as $requirement) {
-      $this->assertIdentical($actual_requirements[$requirement], $requirement);
+      $this->assertSame($actual_requirements[$requirement], $requirement);
     }
   }
 
diff --git a/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php b/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php
index 1b032c7ca7..f091ce9220 100644
--- a/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php
+++ b/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php
@@ -29,22 +29,22 @@ protected function setUp() {
   public function testNodeRevision() {
     $node = \Drupal::entityManager()->getStorage('node')->loadRevision(2);
     /** @var \Drupal\node\NodeInterface $node */
-    $this->assertIdentical('1', $node->id());
-    $this->assertIdentical('2', $node->getRevisionId());
-    $this->assertIdentical('und', $node->langcode->value);
-    $this->assertIdentical('Test title rev 2', $node->getTitle());
-    $this->assertIdentical('body test rev 2', $node->body->value);
-    $this->assertIdentical('teaser test rev 2', $node->body->summary);
-    $this->assertIdentical('2', $node->getRevisionUser()->id());
-    $this->assertIdentical('modified rev 2', $node->revision_log->value);
-    $this->assertIdentical('1390095702', $node->getRevisionCreationTime());
+    $this->assertSame('1', $node->id());
+    $this->assertSame('2', $node->getRevisionId());
+    $this->assertSame('und', $node->langcode->value);
+    $this->assertSame('Test title rev 2', $node->getTitle());
+    $this->assertSame('body test rev 2', $node->body->value);
+    $this->assertSame('teaser test rev 2', $node->body->summary);
+    $this->assertSame('2', $node->getRevisionUser()->id());
+    $this->assertSame('modified rev 2', $node->revision_log->value);
+    $this->assertSame('1390095702', $node->getRevisionCreationTime());
 
     $node = \Drupal::entityManager()->getStorage('node')->loadRevision(5);
-    $this->assertIdentical('1', $node->id());
-    $this->assertIdentical('body test rev 3', $node->body->value);
-    $this->assertIdentical('1', $node->getRevisionUser()->id());
-    $this->assertIdentical('modified rev 3', $node->revision_log->value);
-    $this->assertIdentical('1390095703', $node->getRevisionCreationTime());
+    $this->assertSame('1', $node->id());
+    $this->assertSame('body test rev 3', $node->body->value);
+    $this->assertSame('1', $node->getRevisionUser()->id());
+    $this->assertSame('modified rev 3', $node->revision_log->value);
+    $this->assertSame('1390095703', $node->getRevisionCreationTime());
   }
 
 }
diff --git a/core/modules/node/tests/src/Functional/Migrate/d7/NodeMigrateDeriverTest.php b/core/modules/node/tests/src/Functional/Migrate/d7/NodeMigrateDeriverTest.php
index 621cdb6d49..8dc8e19301 100644
--- a/core/modules/node/tests/src/Functional/Migrate/d7/NodeMigrateDeriverTest.php
+++ b/core/modules/node/tests/src/Functional/Migrate/d7/NodeMigrateDeriverTest.php
@@ -15,21 +15,21 @@ class NodeMigrateDeriverTest extends MigrateDrupal7TestBase {
 
   public function testBuilder() {
     $process = $this->getMigration('d7_node:test_content_type')->getProcess();
-    $this->assertIdentical('field_boolean', $process['field_boolean'][0]['source']);
-    $this->assertIdentical('field_email', $process['field_email'][0]['source']);
-    $this->assertIdentical('field_phone', $process['field_phone'][0]['source']);
-    $this->assertIdentical('field_date', $process['field_date'][0]['source']);
-    $this->assertIdentical('field_date_with_end_time', $process['field_date_with_end_time'][0]['source']);
-    $this->assertIdentical('field_file', $process['field_file'][0]['source']);
-    $this->assertIdentical('field_float', $process['field_float'][0]['source']);
-    $this->assertIdentical('field_images', $process['field_images'][0]['source']);
-    $this->assertIdentical('field_integer', $process['field_integer'][0]['source']);
-    $this->assertIdentical('field_link', $process['field_link'][0]['source']);
-    $this->assertIdentical('field_text_list', $process['field_text_list'][0]['source']);
-    $this->assertIdentical('field_integer_list', $process['field_integer_list'][0]['source']);
-    $this->assertIdentical('field_long_text', $process['field_long_text'][0]['source']);
-    $this->assertIdentical('field_term_reference', $process['field_term_reference'][0]['source']);
-    $this->assertIdentical('field_text', $process['field_text'][0]['source']);
+    $this->assertSame('field_boolean', $process['field_boolean'][0]['source']);
+    $this->assertSame('field_email', $process['field_email'][0]['source']);
+    $this->assertSame('field_phone', $process['field_phone'][0]['source']);
+    $this->assertSame('field_date', $process['field_date'][0]['source']);
+    $this->assertSame('field_date_with_end_time', $process['field_date_with_end_time'][0]['source']);
+    $this->assertSame('field_file', $process['field_file'][0]['source']);
+    $this->assertSame('field_float', $process['field_float'][0]['source']);
+    $this->assertSame('field_images', $process['field_images'][0]['source']);
+    $this->assertSame('field_integer', $process['field_integer'][0]['source']);
+    $this->assertSame('field_link', $process['field_link'][0]['source']);
+    $this->assertSame('field_text_list', $process['field_text_list'][0]['source']);
+    $this->assertSame('field_integer_list', $process['field_integer_list'][0]['source']);
+    $this->assertSame('field_long_text', $process['field_long_text'][0]['source']);
+    $this->assertSame('field_term_reference', $process['field_term_reference'][0]['source']);
+    $this->assertSame('field_text', $process['field_text'][0]['source']);
   }
 
 }
diff --git a/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
index d9e4e8b092..26e6331dbc 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
@@ -211,7 +211,7 @@ protected function assertTaxonomyPage($is_admin) {
           if (!$is_admin && $tid_is_private) {
             $should_be_visible = $should_be_visible && $uid == $this->webUser->id();
           }
-          $this->assertIdentical(isset($this->nidsVisible[$nid]), $should_be_visible, strtr('A %private node by user %uid is %visible for user %current_uid on the %tid_is_private page.', [
+          $this->assertSame(isset($this->nidsVisible[$nid]), $should_be_visible, strtr('A %private node by user %uid is %visible for user %current_uid on the %tid_is_private page.', [
             '%private' => $is_private ? 'private' : 'public',
             '%uid' => $uid,
             '%visible' => isset($this->nidsVisible[$nid]) ? 'visible' : 'not visible',
diff --git a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
index fa2116ab87..3d5b3d316a 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
@@ -66,7 +66,7 @@ protected function assertUserCacheContext(array $expected) {
         $this->drupalLogin($this->userMapping[$uid]);
       }
       $this->pass('Asserting cache context for user ' . $uid . '.');
-      $this->assertIdentical($context, $this->container->get('cache_context.user.node_grants')->getContext('view'));
+      $this->assertSame($context, $this->container->get('cache_context.user.node_grants')->getContext('view'));
     }
     $this->drupalLogout();
   }
diff --git a/core/modules/node/tests/src/Functional/NodeEditFormTest.php b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
index c15ca70bbe..aa009822c7 100644
--- a/core/modules/node/tests/src/Functional/NodeEditFormTest.php
+++ b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
@@ -105,7 +105,7 @@ public function testNodeEdit() {
     $this->assertNotIdentical($node->getRevisionId(), $revised_node->getRevisionId(), 'A new revision has been created.');
     // Ensure that the node author is preserved when it was not changed in the
     // edit form.
-    $this->assertIdentical($node->getOwnerId(), $revised_node->getOwnerId(), 'The node author has been preserved.');
+    $this->assertSame($node->getOwnerId(), $revised_node->getOwnerId(), 'The node author has been preserved.');
     // Ensure that the revision authors are different since the revisions were
     // made by different users.
     $first_node_version = node_revision_load($node->getRevisionId());
@@ -156,7 +156,7 @@ public function testNodeEditAuthoredBy() {
 
     // Check that the node was authored by the currently logged in user.
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
-    $this->assertIdentical($node->getOwnerId(), $this->adminUser->id(), 'Node authored by admin user.');
+    $this->assertSame($node->getOwnerId(), $this->adminUser->id(), 'Node authored by admin user.');
 
     $this->checkVariousAuthoredByValues($node, 'uid[0][target_id]');
 
@@ -184,7 +184,7 @@ public function testNodeEditAuthoredBy() {
     $this->drupalPostForm('node/' . $node->id() . '/edit', [], t('Save'));
     $this->nodeStorage->resetCache([$node->id()]);
     $node = $this->nodeStorage->load($node->id());
-    $this->assertIdentical($this->webUser->id(), $node->getOwner()->id());
+    $this->assertSame($this->webUser->id(), $node->getOwner()->id());
 
     $this->checkVariousAuthoredByValues($node, 'uid[target_id]');
 
@@ -196,7 +196,7 @@ public function testNodeEditAuthoredBy() {
     $this->drupalPostForm('node/' . $node->id() . '/edit', [], t('Save'));
     $this->nodeStorage->resetCache([$node->id()]);
     $node = $this->nodeStorage->load($node->id());
-    $this->assertIdentical($this->webUser->id(), $node->getOwner()->id());
+    $this->assertSame($this->webUser->id(), $node->getOwner()->id());
   }
 
   /**
@@ -277,7 +277,7 @@ protected function checkVariousAuthoredByValues(NodeInterface $node, $form_eleme
     $this->drupalPostForm(NULL, $edit, t('Save'));
     $this->nodeStorage->resetCache([$node->id()]);
     $node = $this->nodeStorage->load($node->id());
-    $this->assertIdentical($node->getOwnerId(), $this->webUser->id(), 'Node authored by normal user.');
+    $this->assertSame($node->getOwnerId(), $this->webUser->id(), 'Node authored by normal user.');
   }
 
 }
diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
index 458933e04e..e64c99554b 100644
--- a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
+++ b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
@@ -89,7 +89,7 @@ protected function setUp($import_test_views = TRUE) {
     $this->drupalLogin($this->drupalCreateUser(['administer nodes', 'access content overview', 'bypass node access']));
     $this->drupalGet('test-node-bulk-form');
     $elements = $this->xpath('//select[@id="edit-action"]//option');
-    $this->assertIdentical(count($elements), 8, 'All node operations are found.');
+    $this->assertSame(count($elements), 8, 'All node operations are found.');
   }
 
   /**
diff --git a/core/modules/node/tests/src/Functional/Views/FilterUidRevisionTest.php b/core/modules/node/tests/src/Functional/Views/FilterUidRevisionTest.php
index 2b3f3b30e7..056700da7c 100644
--- a/core/modules/node/tests/src/Functional/Views/FilterUidRevisionTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FilterUidRevisionTest.php
@@ -48,7 +48,7 @@ public function testFilter() {
     $view->filter['uid_revision']->value = [$author->id()];
 
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, $expected_result, ['nid' => 'nid'], 'Make sure that the view only returns nodes which match either the node or the revision author.');
+    $this->assertSameResultset($view, $expected_result, ['nid' => 'nid'], 'Make sure that the view only returns nodes which match either the node or the revision author.');
   }
 
 }
diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
index 37a6b91f3f..62c5a5d861 100644
--- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
@@ -71,7 +71,7 @@ public function testFrontPage() {
         'user',
       ],
     ];
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
 
     $view->setDisplay('page_1');
     $this->executeView($view);
@@ -139,14 +139,14 @@ public function testFrontPage() {
 
     $view->setDisplay('page_1');
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, array_slice($expected, 0, 10), $column_map, 'Ensure that the right nodes are displayed on the frontpage.');
+    $this->assertSameResultset($view, array_slice($expected, 0, 10), $column_map, 'Ensure that the right nodes are displayed on the frontpage.');
     $this->assertNotInResultSet($view, $not_expected_nids, 'Ensure no unexpected node is in the result.');
     $view->destroy();
 
     $view->setDisplay('page_1');
     $view->setCurrentPage(1);
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, array_slice($expected, 10, 10), $column_map, 'Ensure that the right nodes are displayed on second page of the frontpage.');
+    $this->assertSameResultset($view, array_slice($expected, 10, 10), $column_map, 'Ensure that the right nodes are displayed on second page of the frontpage.');
     $this->assertNotInResultSet($view, $not_expected_nids, 'Ensure no unexpected node is in the result.');
     $view->destroy();
   }
diff --git a/core/modules/node/tests/src/Functional/Views/NodeRevisionWizardTest.php b/core/modules/node/tests/src/Functional/Views/NodeRevisionWizardTest.php
index 4cbecf314e..61b3c168aa 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeRevisionWizardTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeRevisionWizardTest.php
@@ -57,7 +57,7 @@ public function testViewAdd() {
 
     $this->executeView($view);
 
-    $this->assertIdenticalResultset($view, [['vid' => 1], ['vid' => 3], ['vid' => 2], ['vid' => 4]],
+    $this->assertSameResultset($view, [['vid' => 1], ['vid' => 3], ['vid' => 2], ['vid' => 4]],
       ['vid' => 'vid']);
   }
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
index 9f28c065ae..87f7434eba 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
@@ -46,21 +46,21 @@ protected function setUp() {
   public function testNodeBundleSettings() {
     // Test settings on test_page bundle.
     $node = Node::create(['type' => 'test_page']);
-    $this->assertIdentical(1, $node->status->value);
-    $this->assertIdentical(1, $node->promote->value);
-    $this->assertIdentical(1, $node->sticky->value);
+    $this->assertSame(1, $node->status->value);
+    $this->assertSame(1, $node->promote->value);
+    $this->assertSame(1, $node->sticky->value);
 
     // Test settings for test_story bundle.
     $node = Node::create(['type' => 'test_story']);
-    $this->assertIdentical(1, $node->status->value);
-    $this->assertIdentical(1, $node->promote->value);
-    $this->assertIdentical(0, $node->sticky->value);
+    $this->assertSame(1, $node->status->value);
+    $this->assertSame(1, $node->promote->value);
+    $this->assertSame(0, $node->sticky->value);
 
     // Test settings for the test_event bundle.
     $node = Node::create(['type' => 'test_event']);
-    $this->assertIdentical(0, $node->status->value);
-    $this->assertIdentical(0, $node->promote->value);
-    $this->assertIdentical(1, $node->sticky->value);
+    $this->assertSame(0, $node->status->value);
+    $this->assertSame(0, $node->promote->value);
+    $this->assertSame(1, $node->sticky->value);
   }
 
 }
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php
index 8743284dca..0ddb377f48 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp() {
    */
   public function testNodeSettings() {
     $config = $this->config('node.settings');
-    $this->assertIdentical(FALSE, $config->get('use_admin_theme'));
+    $this->assertSame(FALSE, $config->get('use_admin_theme'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'node.settings', $config->get());
   }
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
index e7eb008ae7..5ec8e2887d 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
@@ -26,7 +26,7 @@ protected function setUp() {
    * Tests migration of the promote checkbox's settings.
    */
   public function testMigration() {
-    $this->assertIdentical('Promoted to front page', BaseFieldOverride::load('node.article.promote')->label());
+    $this->assertSame('Promoted to front page', BaseFieldOverride::load('node.article.promote')->label());
   }
 
 }
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
index afd2dc6ed7..d34287ac0f 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
@@ -26,7 +26,7 @@ protected function setUp() {
    * Tests migration of the publishing status checkbox's settings.
    */
   public function testMigration() {
-    $this->assertIdentical('Publishing status', BaseFieldOverride::load('node.article.status')->label());
+    $this->assertSame('Publishing status', BaseFieldOverride::load('node.article.status')->label());
   }
 
 }
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
index 58eeca33f6..9f822307d4 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
@@ -26,7 +26,7 @@ protected function setUp() {
    * Tests migration of the sticky checkbox's settings.
    */
   public function testMigration() {
-    $this->assertIdentical('Sticky at the top of lists', BaseFieldOverride::load('node.article.sticky')->label());
+    $this->assertSame('Sticky at the top of lists', BaseFieldOverride::load('node.article.sticky')->label());
   }
 
 }
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
index ce4ce76e96..93b1eafe09 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
@@ -41,36 +41,36 @@ protected function setUp() {
    */
   public function testNode() {
     $node = Node::load(1);
-    $this->assertIdentical('1', $node->id(), 'Node 1 loaded.');
-    $this->assertIdentical('und', $node->langcode->value);
-    $this->assertIdentical('test', $node->body->value);
-    $this->assertIdentical('test', $node->body->summary);
-    $this->assertIdentical('filtered_html', $node->body->format);
-    $this->assertIdentical('story', $node->getType(), 'Node has the correct bundle.');
-    $this->assertIdentical('Test title', $node->getTitle(), 'Node has the correct title.');
-    $this->assertIdentical('1388271197', $node->getCreatedTime(), 'Node has the correct created time.');
-    $this->assertIdentical(FALSE, $node->isSticky());
-    $this->assertIdentical('1', $node->getOwnerId());
-    $this->assertIdentical('1420861423', $node->getRevisionCreationTime());
+    $this->assertSame('1', $node->id(), 'Node 1 loaded.');
+    $this->assertSame('und', $node->langcode->value);
+    $this->assertSame('test', $node->body->value);
+    $this->assertSame('test', $node->body->summary);
+    $this->assertSame('filtered_html', $node->body->format);
+    $this->assertSame('story', $node->getType(), 'Node has the correct bundle.');
+    $this->assertSame('Test title', $node->getTitle(), 'Node has the correct title.');
+    $this->assertSame('1388271197', $node->getCreatedTime(), 'Node has the correct created time.');
+    $this->assertSame(FALSE, $node->isSticky());
+    $this->assertSame('1', $node->getOwnerId());
+    $this->assertSame('1420861423', $node->getRevisionCreationTime());
 
     /** @var \Drupal\node\NodeInterface $node_revision */
     $node_revision = \Drupal::entityManager()->getStorage('node')->loadRevision(1);
-    $this->assertIdentical('Test title', $node_revision->getTitle());
-    $this->assertIdentical('1', $node_revision->getRevisionUser()->id(), 'Node revision has the correct user');
+    $this->assertSame('Test title', $node_revision->getTitle());
+    $this->assertSame('1', $node_revision->getRevisionUser()->id(), 'Node revision has the correct user');
     $this->assertSame('1', $node_revision->id(), 'Node 1 loaded.');
     $this->assertSame('1', $node_revision->getRevisionId(), 'Node 1 revision 1 loaded.');
     // This is empty on the first revision.
-    $this->assertIdentical(NULL, $node_revision->revision_log->value);
-    $this->assertIdentical('This is a shared text field', $node->field_test->value);
-    $this->assertIdentical('filtered_html', $node->field_test->format);
-    $this->assertIdentical('10', $node->field_test_two->value);
-    $this->assertIdentical('20', $node->field_test_two[1]->value);
-
-    $this->assertIdentical('42.42', $node->field_test_three->value, 'Single field second value is correct.');
-    $this->assertIdentical('3412', $node->field_test_integer_selectlist[0]->value);
-    $this->assertIdentical('1', $node->field_test_identical1->value, 'Integer value is correct');
-    $this->assertIdentical('1', $node->field_test_identical2->value, 'Integer value is correct');
-    $this->assertIdentical('This is a field with exclude unset.', $node->field_test_exclude_unset->value, 'Field with exclude unset is correct.');
+    $this->assertSame(NULL, $node_revision->revision_log->value);
+    $this->assertSame('This is a shared text field', $node->field_test->value);
+    $this->assertSame('filtered_html', $node->field_test->format);
+    $this->assertSame('10', $node->field_test_two->value);
+    $this->assertSame('20', $node->field_test_two[1]->value);
+
+    $this->assertSame('42.42', $node->field_test_three->value, 'Single field second value is correct.');
+    $this->assertSame('3412', $node->field_test_integer_selectlist[0]->value);
+    $this->assertSame('1', $node->field_test_identical1->value, 'Integer value is correct');
+    $this->assertSame('1', $node->field_test_identical2->value, 'Integer value is correct');
+    $this->assertSame('This is a field with exclude unset.', $node->field_test_exclude_unset->value, 'Field with exclude unset is correct.');
 
     // Test that date fields are migrated.
     $this->assertSame('2013-01-02T04:05:00', $node->field_test_date->value, 'Date field is correct');
@@ -78,13 +78,13 @@ public function testNode() {
     $this->assertSame('2015-03-04T06:07:00', $node->field_test_datetime->value, 'Datetime field is correct');
 
     // Test that link fields are migrated.
-    $this->assertIdentical('https://www.drupal.org/project/drupal', $node->field_test_link->uri);
-    $this->assertIdentical('Drupal project page', $node->field_test_link->title);
-    $this->assertIdentical(['target' => '_blank'], $node->field_test_link->options['attributes']);
+    $this->assertSame('https://www.drupal.org/project/drupal', $node->field_test_link->uri);
+    $this->assertSame('Drupal project page', $node->field_test_link->title);
+    $this->assertSame(['target' => '_blank'], $node->field_test_link->options['attributes']);
 
     // Test the file field meta.
-    $this->assertIdentical('desc', $node->field_test_filefield->description);
-    $this->assertIdentical('4', $node->field_test_filefield->target_id);
+    $this->assertSame('desc', $node->field_test_filefield->description);
+    $this->assertSame('4', $node->field_test_filefield->target_id);
 
     // Test that an email field is migrated.
     $this->assertSame('PrincessRuwenne@example.com', $node->field_test_email->value);
@@ -100,14 +100,14 @@ public function testNode() {
     $this->assertSame('joe.roe', $node->field_commander[0]->entity->getUsername());
 
     $node = Node::load(2);
-    $this->assertIdentical('Test title rev 3', $node->getTitle());
-    $this->assertIdentical('test rev 3', $node->body->value);
-    $this->assertIdentical('filtered_html', $node->body->format);
+    $this->assertSame('Test title rev 3', $node->getTitle());
+    $this->assertSame('test rev 3', $node->body->value);
+    $this->assertSame('filtered_html', $node->body->format);
 
     // Test that a link field with an external link is migrated.
-    $this->assertIdentical('http://groups.drupal.org/', $node->field_test_link->uri);
-    $this->assertIdentical('Drupal Groups', $node->field_test_link->title);
-    $this->assertIdentical([], $node->field_test_link->options['attributes']);
+    $this->assertSame('http://groups.drupal.org/', $node->field_test_link->uri);
+    $this->assertSame('Drupal Groups', $node->field_test_link->title);
+    $this->assertSame([], $node->field_test_link->options['attributes']);
 
     $node = Node::load(3);
     // Test multivalue field.
@@ -131,17 +131,17 @@ public function testNode() {
 
     // Test that translations are working.
     $node = Node::load(10);
-    $this->assertIdentical('en', $node->langcode->value);
-    $this->assertIdentical('The Real McCoy', $node->title->value);
+    $this->assertSame('en', $node->langcode->value);
+    $this->assertSame('The Real McCoy', $node->title->value);
     $this->assertTrue($node->hasTranslation('fr'), "Node 10 has french translation");
 
     // Test that content_translation_source is set.
     $manager = $this->container->get('content_translation.manager');
-    $this->assertIdentical('en', $manager->getTranslationMetadata($node->getTranslation('fr'))->getSource());
+    $this->assertSame('en', $manager->getTranslationMetadata($node->getTranslation('fr'))->getSource());
 
     // Test that content_translation_source for a source other than English.
     $node = Node::load(12);
-    $this->assertIdentical('zu', $manager->getTranslationMetadata($node->getTranslation('en'))->getSource());
+    $this->assertSame('zu', $manager->getTranslationMetadata($node->getTranslation('en'))->getSource());
 
     // Node 11 is a translation of node 10, and should not be imported separately.
     $this->assertNull(Node::load(11), "Node 11 doesn't exist in D8, it was a translation");
@@ -172,9 +172,9 @@ public function testNode() {
 
     $this->rerunMigration();
     $node = Node::load(2);
-    $this->assertIdentical('https://www.drupal.org/node/2127611', $node->field_test_link->uri);
-    $this->assertIdentical('Migrate API in Drupal 8', $node->field_test_link->title);
-    $this->assertIdentical([], $node->field_test_link->options['attributes']);
+    $this->assertSame('https://www.drupal.org/node/2127611', $node->field_test_link->uri);
+    $this->assertSame('Migrate API in Drupal 8', $node->field_test_link->title);
+    $this->assertSame([], $node->field_test_link->options['attributes']);
 
     $node = Node::load(9);
     $this->assertSame('internal:/node/10', $node->field_test_link->uri);
@@ -184,10 +184,10 @@ public function testNode() {
     // Test that we can re-import using the EntityContentBase destination.
     $title = $this->rerunMigration();
     $node = Node::load(2);
-    $this->assertIdentical($title, $node->getTitle());
+    $this->assertSame($title, $node->getTitle());
     // Test multi-column fields are correctly upgraded.
-    $this->assertIdentical('test rev 3', $node->body->value);
-    $this->assertIdentical('full_html', $node->body->format);
+    $this->assertSame('test rev 3', $node->body->value);
+    $this->assertSame('full_html', $node->body->format);
 
     // Now insert a row indicating a failure and set to update later.
     $title = $this->rerunMigration([
@@ -196,7 +196,7 @@ public function testNode() {
       'source_row_status' => MigrateIdMapInterface::STATUS_NEEDS_UPDATE,
     ]);
     $node = Node::load(2);
-    $this->assertIdentical($title, $node->getTitle());
+    $this->assertSame($title, $node->getTitle());
   }
 
   /**
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
index 9a3e81e150..18494010bc 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
@@ -34,15 +34,15 @@ public function testNodeType() {
     $id_map = $this->getMigration('d6_node_type')->getIdMap();
     // Test the test_page content type.
     $node_type_page = NodeType::load('test_page');
-    $this->assertIdentical('test_page', $node_type_page->id(), 'Node type test_page loaded');
-    $this->assertIdentical(TRUE, $node_type_page->displaySubmitted());
-    $this->assertIdentical(FALSE, $node_type_page->isNewRevision());
-    $this->assertIdentical(DRUPAL_OPTIONAL, $node_type_page->getPreviewMode());
-    $this->assertIdentical($id_map->lookupDestinationID(['test_page']), ['test_page']);
+    $this->assertSame('test_page', $node_type_page->id(), 'Node type test_page loaded');
+    $this->assertSame(TRUE, $node_type_page->displaySubmitted());
+    $this->assertSame(FALSE, $node_type_page->isNewRevision());
+    $this->assertSame(DRUPAL_OPTIONAL, $node_type_page->getPreviewMode());
+    $this->assertSame($id_map->lookupDestinationID(['test_page']), ['test_page']);
 
     // Test we have a body field.
     $field = FieldConfig::loadByName('node', 'test_page', 'body');
-    $this->assertIdentical('This is the body field label', $field->getLabel(), 'Body field was found.');
+    $this->assertSame('This is the body field label', $field->getLabel(), 'Body field was found.');
 
     // Test default menus.
     $expected_available_menus = ['navigation'];
@@ -52,16 +52,16 @@ public function testNodeType() {
 
     // Test the test_story content type.
     $node_type_story = NodeType::load('test_story');
-    $this->assertIdentical('test_story', $node_type_story->id(), 'Node type test_story loaded');
+    $this->assertSame('test_story', $node_type_story->id(), 'Node type test_story loaded');
 
-    $this->assertIdentical(TRUE, $node_type_story->displaySubmitted());
-    $this->assertIdentical(FALSE, $node_type_story->isNewRevision());
-    $this->assertIdentical(DRUPAL_OPTIONAL, $node_type_story->getPreviewMode());
-    $this->assertIdentical($id_map->lookupDestinationID(['test_story']), ['test_story']);
+    $this->assertSame(TRUE, $node_type_story->displaySubmitted());
+    $this->assertSame(FALSE, $node_type_story->isNewRevision());
+    $this->assertSame(DRUPAL_OPTIONAL, $node_type_story->getPreviewMode());
+    $this->assertSame($id_map->lookupDestinationID(['test_story']), ['test_story']);
 
     // Test we don't have a body field.
     $field = FieldConfig::loadByName('node', 'test_story', 'body');
-    $this->assertIdentical(NULL, $field, 'No body field found');
+    $this->assertSame(NULL, $field, 'No body field found');
 
     // Test default menus.
     $expected_available_menus = ['navigation'];
@@ -71,16 +71,16 @@ public function testNodeType() {
 
     // Test the test_event content type.
     $node_type_event = NodeType::load('test_event');
-    $this->assertIdentical('test_event', $node_type_event->id(), 'Node type test_event loaded');
+    $this->assertSame('test_event', $node_type_event->id(), 'Node type test_event loaded');
 
-    $this->assertIdentical(TRUE, $node_type_event->displaySubmitted());
-    $this->assertIdentical(TRUE, $node_type_event->isNewRevision());
-    $this->assertIdentical(DRUPAL_OPTIONAL, $node_type_event->getPreviewMode());
-    $this->assertIdentical($id_map->lookupDestinationID(['test_event']), ['test_event']);
+    $this->assertSame(TRUE, $node_type_event->displaySubmitted());
+    $this->assertSame(TRUE, $node_type_event->isNewRevision());
+    $this->assertSame(DRUPAL_OPTIONAL, $node_type_event->getPreviewMode());
+    $this->assertSame($id_map->lookupDestinationID(['test_event']), ['test_event']);
 
     // Test we have a body field.
     $field = FieldConfig::loadByName('node', 'test_event', 'body');
-    $this->assertIdentical('Body', $field->getLabel(), 'Body field was found.');
+    $this->assertSame('Body', $field->getLabel(), 'Body field was found.');
 
     $expected_available_menus = ['navigation'];
     $this->assertSame($expected_available_menus, $node_type_event->getThirdPartySetting('menu_ui', 'available_menus'));
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php
index f47559275c..36dd6e6450 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php
@@ -26,10 +26,10 @@ protected function setUp() {
   public function testViewModes() {
     // Test a new view mode.
     $view_mode = EntityViewMode::load('node.preview');
-    $this->assertIdentical(FALSE, is_null($view_mode), 'Preview view mode loaded.');
-    $this->assertIdentical('Preview', $view_mode->label(), 'View mode has correct label.');
+    $this->assertSame(FALSE, is_null($view_mode), 'Preview view mode loaded.');
+    $this->assertSame('Preview', $view_mode->label(), 'View mode has correct label.');
     // Test the ID map.
-    $this->assertIdentical(['node', 'preview'], $this->getMigration('d6_view_modes')->getIdMap()->lookupDestinationID([1]));
+    $this->assertSame(['node', 'preview'], $this->getMigration('d6_view_modes')->getIdMap()->lookupDestinationID([1]));
   }
 
 }
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
index b4fd24606a..c513c77a90 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
@@ -93,17 +93,17 @@ protected function assertEntity($id, $type, $langcode, $title, $uid, $status, $c
     /** @var \Drupal\node\NodeInterface $node */
     $node = Node::load($id);
     $this->assertTrue($node instanceof NodeInterface);
-    $this->assertIdentical($type, $node->getType());
-    $this->assertIdentical($langcode, $node->langcode->value);
-    $this->assertIdentical($title, $node->getTitle());
-    $this->assertIdentical($uid, $node->getOwnerId());
-    $this->assertIdentical($status, $node->isPublished());
-    $this->assertIdentical($created, $node->getCreatedTime());
+    $this->assertSame($type, $node->getType());
+    $this->assertSame($langcode, $node->langcode->value);
+    $this->assertSame($title, $node->getTitle());
+    $this->assertSame($uid, $node->getOwnerId());
+    $this->assertSame($status, $node->isPublished());
+    $this->assertSame($created, $node->getCreatedTime());
     if (isset($changed)) {
-      $this->assertIdentical($changed, $node->getChangedTime());
+      $this->assertSame($changed, $node->getChangedTime());
     }
-    $this->assertIdentical($promoted, $node->isPromoted());
-    $this->assertIdentical($sticky, $node->isSticky());
+    $this->assertSame($promoted, $node->isPromoted());
+    $this->assertSame($sticky, $node->isSticky());
   }
 
   /**
@@ -123,10 +123,10 @@ protected function assertEntity($id, $type, $langcode, $title, $uid, $status, $c
   protected function assertRevision($id, $title, $uid, $log, $timestamp) {
     $revision = \Drupal::entityManager()->getStorage('node')->loadRevision($id);
     $this->assertTrue($revision instanceof NodeInterface);
-    $this->assertIdentical($title, $revision->getTitle());
-    $this->assertIdentical($uid, $revision->getRevisionUser()->id());
-    $this->assertIdentical($log, $revision->revision_log->value);
-    $this->assertIdentical($timestamp, $revision->getRevisionCreationTime());
+    $this->assertSame($title, $revision->getTitle());
+    $this->assertSame($uid, $revision->getRevisionUser()->id());
+    $this->assertSame($log, $revision->revision_log->value);
+    $this->assertSame($timestamp, $revision->getRevisionCreationTime());
   }
 
   /**
@@ -138,33 +138,33 @@ public function testNode() {
 
     $node = Node::load(1);
     $this->assertTrue($node->field_boolean->value);
-    $this->assertIdentical('99-99-99-99', $node->field_phone->value);
+    $this->assertSame('99-99-99-99', $node->field_phone->value);
     // Use assertEqual() here instead, since SQLite interprets floats strictly.
     $this->assertEqual('1', $node->field_float->value);
-    $this->assertIdentical('5', $node->field_integer->value);
-    $this->assertIdentical('Some more text', $node->field_text_list[0]->value);
-    $this->assertIdentical('7', $node->field_integer_list[0]->value);
-    $this->assertIdentical('qwerty', $node->field_text->value);
-    $this->assertIdentical('2', $node->field_file->target_id);
-    $this->assertIdentical('file desc', $node->field_file->description);
+    $this->assertSame('5', $node->field_integer->value);
+    $this->assertSame('Some more text', $node->field_text_list[0]->value);
+    $this->assertSame('7', $node->field_integer_list[0]->value);
+    $this->assertSame('qwerty', $node->field_text->value);
+    $this->assertSame('2', $node->field_file->target_id);
+    $this->assertSame('file desc', $node->field_file->description);
     $this->assertTrue($node->field_file->display);
-    $this->assertIdentical('1', $node->field_images->target_id);
-    $this->assertIdentical('alt text', $node->field_images->alt);
-    $this->assertIdentical('title text', $node->field_images->title);
-    $this->assertIdentical('93', $node->field_images->width);
-    $this->assertIdentical('93', $node->field_images->height);
-    $this->assertIdentical('http://google.com', $node->field_link->uri);
-    $this->assertIdentical('Click Here', $node->field_link->title);
+    $this->assertSame('1', $node->field_images->target_id);
+    $this->assertSame('alt text', $node->field_images->alt);
+    $this->assertSame('title text', $node->field_images->title);
+    $this->assertSame('93', $node->field_images->width);
+    $this->assertSame('93', $node->field_images->height);
+    $this->assertSame('http://google.com', $node->field_link->uri);
+    $this->assertSame('Click Here', $node->field_link->title);
     // Test that an email field is migrated.
     $this->assertSame('default@example.com', $node->field_email->value);
     $this->assertSame('another@example.com', $node->field_email[1]->value);
 
     $node = Node::load(2);
     $this->assertSame('en', $node->langcode->value);
-    $this->assertIdentical("...is that it's the absolute best show ever. Trust me, I would know.", $node->body->value);
+    $this->assertSame("...is that it's the absolute best show ever. Trust me, I would know.", $node->body->value);
     $this->assertSame('The thing about Deep Space 9', $node->label());
-    $this->assertIdentical('internal:/', $node->field_link->uri);
-    $this->assertIdentical('Home', $node->field_link->title);
+    $this->assertSame('internal:/', $node->field_link->uri);
+    $this->assertSame('Home', $node->field_link->title);
     $this->assertTrue($node->hasTranslation('is'), "Node 2 has an Icelandic translation");
 
     $translation = $node->getTranslation('is');
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
index 0655631565..58a84fe206 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
@@ -36,7 +36,7 @@ protected function assertEntity($id, $label) {
     $override = BaseFieldOverride::load($id);
     $this->assertTrue($override instanceof BaseFieldOverride);
     /** @var \Drupal\Core\Field\Entity\BaseFieldOverride $override */
-    $this->assertIdentical($label, $override->getLabel());
+    $this->assertSame($label, $override->getLabel());
   }
 
   /**
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
index b16cd2550e..ee9bd1e6cb 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
@@ -49,19 +49,19 @@ protected function assertEntity($id, $label, $description, $help, $display_submi
     /** @var \Drupal\node\NodeTypeInterface $entity */
     $entity = NodeType::load($id);
     $this->assertTrue($entity instanceof NodeTypeInterface);
-    $this->assertIdentical($label, $entity->label());
-    $this->assertIdentical($description, $entity->getDescription());
+    $this->assertSame($label, $entity->label());
+    $this->assertSame($description, $entity->getDescription());
 
-    $this->assertIdentical($help, $entity->getHelp());
+    $this->assertSame($help, $entity->getHelp());
 
-    $this->assertIdentical($display_submitted, $entity->displaySubmitted(), 'Submission info is displayed');
-    $this->assertIdentical($new_revision, $entity->isNewRevision(), 'Is a new revision');
+    $this->assertSame($display_submitted, $entity->displaySubmitted(), 'Submission info is displayed');
+    $this->assertSame($new_revision, $entity->isNewRevision(), 'Is a new revision');
 
     if ($body_label) {
       /** @var \Drupal\field\FieldConfigInterface $body */
       $body = FieldConfig::load('node.' . $id . '.body');
       $this->assertTrue($body instanceof FieldConfigInterface);
-      $this->assertIdentical($body_label, $body->label());
+      $this->assertSame($body_label, $body->label());
     }
 
     $this->assertSame($expected_available_menus, $entity->getThirdPartySetting('menu_ui', 'available_menus'));
diff --git a/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php b/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
index b216f40fb2..aff5af2d23 100644
--- a/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
@@ -87,7 +87,7 @@ public function testArgument() {
     $view->setArguments(['uid_revision' => $author->id()]);
 
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, $expected_result, ['nid' => 'nid']);
+    $this->assertSameResultset($view, $expected_result, ['nid' => 'nid']);
   }
 
 }
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
index 287bf48395..c4b1db9ce5 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
@@ -64,7 +64,7 @@ public function testRevisionCreateTimestampView() {
     $view = Views::getView('test_node_revision_timestamp');
     $this->executeView($view);
 
-    $this->assertIdenticalResultset($view, [
+    $this->assertSameResultset($view, [
       ['vid' => 3, 'revision_timestamp' => 1400],
       ['vid' => 2, 'revision_timestamp' => 1200],
       ['vid' => 1, 'revision_timestamp' => 1000],
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
index e47bdd038b..02e6649b51 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
@@ -76,7 +76,7 @@ public function testNodeRevisionRelationship() {
         'nid_1' => '1',
       ],
     ];
-    $this->assertIdenticalResultset($view_nid, $resultset_nid, $column_map);
+    $this->assertSameResultset($view_nid, $resultset_nid, $column_map);
 
     // There should be only one row with active revision 2.
     $view_vid = Views::getView('test_node_revision_vid');
@@ -88,7 +88,7 @@ public function testNodeRevisionRelationship() {
         'nid_1' => '1',
       ],
     ];
-    $this->assertIdenticalResultset($view_vid, $resultset_vid, $column_map);
+    $this->assertSameResultset($view_vid, $resultset_vid, $column_map);
   }
 
 }
diff --git a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
index df696d61c0..6dcf1b577a 100644
--- a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
+++ b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
@@ -301,7 +301,7 @@ public function assertAllowedValuesInput($input_string, $result, $message) {
     }
     else {
       $field_storage = FieldStorageConfig::loadByName('node', $this->fieldName);
-      $this->assertIdentical($field_storage->getSetting('allowed_values'), $result, $message);
+      $this->assertSame($field_storage->getSetting('allowed_values'), $result, $message);
     }
   }
 
diff --git a/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php b/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
index befd48e42a..320208a778 100644
--- a/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
+++ b/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
@@ -39,7 +39,7 @@ public function testImport() {
     // necessary configuration for this test is created by installing that
     // module.
     $field_storage = FieldStorageConfig::loadByName('node', $field_name);
-    $this->assertIdentical($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '0.5' => 'Point five']);
+    $this->assertSame($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '0.5' => 'Point five']);
 
     $admin_path = 'admin/structure/types/manage/' . $type . '/fields/node.' . $type . '.' . $field_name . '/storage';
 
@@ -50,14 +50,14 @@ public function testImport() {
     $edit = ['settings[allowed_values]' => "0|Zero\n1|One"];
     $this->drupalPostForm($admin_path, $edit, t('Save field settings'));
     $field_storage = FieldStorageConfig::loadByName('node', $field_name);
-    $this->assertIdentical($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '1' => 'One']);
+    $this->assertSame($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '1' => 'One']);
 
     // Import configuration with dots in the allowed values key names. This
     // tests \Drupal\Core\Config\Entity\ConfigEntityStorage::importUpdate().
     $this->drupalGet('admin/config/development/configuration');
     $this->drupalPostForm(NULL, [], t('Import all'));
     $field_storage = FieldStorageConfig::loadByName('node', $field_name);
-    $this->assertIdentical($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '0.5' => 'Point five']);
+    $this->assertSame($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '0.5' => 'Point five']);
 
     // Delete field to test creation. This tests
     // \Drupal\Core\Config\Entity\ConfigEntityStorage::importCreate().
@@ -66,7 +66,7 @@ public function testImport() {
     $this->drupalGet('admin/config/development/configuration');
     $this->drupalPostForm(NULL, [], t('Import all'));
     $field_storage = FieldStorageConfig::loadByName('node', $field_name);
-    $this->assertIdentical($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '0.5' => 'Point five']);
+    $this->assertSame($field_storage->getSetting('allowed_values'), $array = ['0' => 'Zero', '0.5' => 'Point five']);
   }
 
 }
diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php b/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php
index 83be0dd649..e2bcb2172c 100644
--- a/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php
@@ -32,7 +32,7 @@ public function testViewsTestOptionsListArgument() {
     ];
 
     $column_map = ['nid' => 'nid'];
-    $this->assertIdenticalResultset($view, $resultset, $column_map);
+    $this->assertSameResultset($view, $resultset, $column_map);
 
     $view = Views::getView('test_options_list_argument_string');
     $this->executeView($view, ['man', 'woman']);
@@ -43,7 +43,7 @@ public function testViewsTestOptionsListArgument() {
     ];
 
     $column_map = ['nid' => 'nid'];
-    $this->assertIdenticalResultset($view, $resultset, $column_map);
+    $this->assertSameResultset($view, $resultset, $column_map);
   }
 
 }
diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php
index bc377b094a..a63df3c231 100644
--- a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php
@@ -32,7 +32,7 @@ public function testViewsTestOptionsListFilter() {
     ];
 
     $column_map = ['nid' => 'nid'];
-    $this->assertIdenticalResultset($view, $resultset, $column_map);
+    $this->assertSameResultset($view, $resultset, $column_map);
   }
 
   /**
@@ -106,7 +106,7 @@ public function testViewsTestOptionsListGroupedFilter() {
     ];
 
     $column_map = ['nid' => 'nid'];
-    $this->assertIdenticalResultset($view, $resultset, $column_map);
+    $this->assertSameResultset($view, $resultset, $column_map);
   }
 
 }
diff --git a/core/modules/page_cache/src/Tests/PageCacheTest.php b/core/modules/page_cache/src/Tests/PageCacheTest.php
index cb00cb6861..b63dfc7628 100644
--- a/core/modules/page_cache/src/Tests/PageCacheTest.php
+++ b/core/modules/page_cache/src/Tests/PageCacheTest.php
@@ -68,7 +68,7 @@ public function testPageCacheTags() {
       'rendered',
       'system_test_cache_tags_page',
     ];
-    $this->assertIdentical($cache_entry->tags, $expected_tags);
+    $this->assertSame($cache_entry->tags, $expected_tags);
 
     Cache::invalidateTags($tags);
     $this->drupalGet($path);
@@ -100,7 +100,7 @@ public function testPageCacheTagsIndependentFromCacheabilityHeaders() {
       'rendered',
       'system_test_cache_tags_page',
     ];
-    $this->assertIdentical($cache_entry->tags, $expected_tags);
+    $this->assertSame($cache_entry->tags, $expected_tags);
 
     Cache::invalidateTags($tags);
     $this->drupalGet($path);
diff --git a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
index 092d5ac82d..61aa8319eb 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
@@ -50,9 +50,9 @@ protected function setUp() {
    */
   private function assertPath($pid, $conditions, $path) {
     $this->assertTrue($path, "Path alias for " . $conditions['source'] . " successfully loaded.");
-    $this->assertIdentical($conditions['alias'], $path['alias']);
-    $this->assertIdentical($conditions['langcode'], $path['langcode']);
-    $this->assertIdentical($conditions['source'], $path['source']);
+    $this->assertSame($conditions['alias'], $path['alias']);
+    $this->assertSame($conditions['langcode'], $path['langcode']);
+    $this->assertSame($conditions['source'], $path['source']);
   }
 
   /**
@@ -68,7 +68,7 @@ public function testUrlAlias() {
     ];
     $path = \Drupal::service('path.alias_storage')->load($conditions);
     $this->assertPath('1', $conditions, $path);
-    $this->assertIdentical($id_map->lookupDestinationID([$path['pid']]), ['1'], "Test IdMap");
+    $this->assertSame($id_map->lookupDestinationID([$path['pid']]), ['1'], "Test IdMap");
 
     $conditions = [
       'source' => '/node/2',
diff --git a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
index 2edf258eea..f2ba6173a7 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
@@ -53,9 +53,9 @@ public function testUrlAlias() {
       'alias' => '/term33',
       'langcode' => 'und',
     ]);
-    $this->assertIdentical('/taxonomy/term/4', $path['source']);
-    $this->assertIdentical('/term33', $path['alias']);
-    $this->assertIdentical('und', $path['langcode']);
+    $this->assertSame('/taxonomy/term/4', $path['source']);
+    $this->assertSame('/term33', $path['alias']);
+    $this->assertSame('und', $path['langcode']);
   }
 
   /**
diff --git a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php
index 150ef000a8..102225f097 100644
--- a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php
+++ b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php
@@ -119,7 +119,7 @@ public function testUserWithoutPermission() {
     // Retrieving the metadata should result in an empty 403 response.
     $post = ['fields[0]' => 'node/1/body/en/full'];
     $response = $this->drupalPostWithFormat(Url::fromRoute('quickedit.metadata'), 'json', $post);
-    $this->assertIdentical(Json::encode(['message' => "The 'access in-place editing' permission is required."]), $response);
+    $this->assertSame(Json::encode(['message' => "The 'access in-place editing' permission is required."]), $response);
     $this->assertResponse(403);
 
     // Quick Edit's JavaScript would never hit these endpoints if the metadata
@@ -128,11 +128,11 @@ public function testUserWithoutPermission() {
     $post = ['editors[0]' => 'form'] + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost('quickedit/attachments', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
     $message = Json::encode(['message' => "The 'access in-place editing' permission is required."]);
-    $this->assertIdentical($message, $response);
+    $this->assertSame($message, $response);
     $this->assertResponse(403);
     $post = ['nocssjs' => 'true'] + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost('quickedit/form/' . 'node/1/body/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
-    $this->assertIdentical($message, $response);
+    $this->assertSame($message, $response);
     $this->assertResponse(403);
     $edit = [];
     $edit['form_id'] = 'quickedit_field_form';
@@ -143,11 +143,11 @@ public function testUserWithoutPermission() {
     $edit['body[0][format]'] = 'filtered_html';
     $edit['op'] = t('Save');
     $response = $this->drupalPost('quickedit/form/' . 'node/1/body/en/full', '', $edit, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
-    $this->assertIdentical($message, $response);
+    $this->assertSame($message, $response);
     $this->assertResponse(403);
     $post = ['nocssjs' => 'true'];
     $response = $this->drupalPostWithFormat('quickedit/entity/' . 'node/1', 'json', $post);
-    $this->assertIdentical(Json::encode(['message' => "The 'access in-place editing' permission is required."]), $response);
+    $this->assertSame(Json::encode(['message' => "The 'access in-place editing' permission is required."]), $response);
     $this->assertResponse(403);
   }
 
@@ -175,7 +175,7 @@ public function testUserWithPermission() {
     // There should be only one revision so far.
     $node = Node::load(1);
     $vids = \Drupal::entityManager()->getStorage('node')->revisionIds($node);
-    $this->assertIdentical(1, count($vids), 'The node has only one revision.');
+    $this->assertSame(1, count($vids), 'The node has only one revision.');
     $original_log = $node->revision_log->value;
 
     // Retrieving the metadata should result in a 200 JSON response.
@@ -190,7 +190,7 @@ public function testUserWithPermission() {
         'editor' => 'form',
       ]
     ];
-    $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
+    $this->assertSame(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
     // Restore drupalSettings to build the next requests; simpletest wipes them
     // after a JSON response.
     $this->drupalSettings = $htmlPageDrupalSettings;
@@ -201,11 +201,11 @@ public function testUserWithPermission() {
     $post = ['editors[0]' => 'form'] + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost('quickedit/attachments', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
     $ajax_commands = Json::decode($response);
-    $this->assertIdentical(2, count($ajax_commands), 'The attachments HTTP request results in two AJAX commands.');
+    $this->assertSame(2, count($ajax_commands), 'The attachments HTTP request results in two AJAX commands.');
     // First command: settings.
-    $this->assertIdentical('settings', $ajax_commands[0]['command'], 'The first AJAX command is a settings command.');
+    $this->assertSame('settings', $ajax_commands[0]['command'], 'The first AJAX command is a settings command.');
     // Second command: insert libraries into DOM.
-    $this->assertIdentical('insert', $ajax_commands[1]['command'], 'The second AJAX command is an append command.');
+    $this->assertSame('insert', $ajax_commands[1]['command'], 'The second AJAX command is an append command.');
     $this->assertTrue(in_array('quickedit/quickedit.inPlaceEditor.form', explode(',', $ajax_commands[0]['settings']['ajaxPageState']['libraries'])), 'The quickedit.inPlaceEditor.form library is loaded.');
 
     // Retrieving the form for this field should result in a 200 response,
@@ -214,9 +214,9 @@ public function testUserWithPermission() {
     $response = $this->drupalPost('quickedit/form/' . 'node/1/body/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
     $this->assertResponse(200);
     $ajax_commands = Json::decode($response);
-    $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
-    $this->assertIdentical('quickeditFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldForm command.');
-    $this->assertIdentical('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
+    $this->assertSame(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
+    $this->assertSame('quickeditFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldForm command.');
+    $this->assertSame('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
 
     // Prepare form values for submission. drupalPostAjaxForm() is not suitable
     // for handling pages with JSON responses, so we need our own solution here.
@@ -242,10 +242,10 @@ public function testUserWithPermission() {
       $response = $this->drupalPost('quickedit/form/' . 'node/1/body/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
-      $this->assertIdentical('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldFormSaved command.');
+      $this->assertSame(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
+      $this->assertSame('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'Fine thanks.'), 'Form value saved and printed back.');
-      $this->assertIdentical($ajax_commands[0]['other_view_modes'], [], 'Field was not rendered in any other view mode.');
+      $this->assertSame($ajax_commands[0]['other_view_modes'], [], 'Field was not rendered in any other view mode.');
 
       // Ensure the text on the original node did not change yet.
       $this->drupalGet('node/1');
@@ -256,10 +256,10 @@ public function testUserWithPermission() {
       $response = $this->drupalPostWithFormat('quickedit/entity/' . 'node/1', 'json', $post);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands), 'The entity submission HTTP request results in one AJAX command.');
-      $this->assertIdentical('quickeditEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditEntitySaved command.');
-      $this->assertIdentical($ajax_commands[0]['data']['entity_type'], 'node', 'Saved entity is of type node.');
-      $this->assertIdentical($ajax_commands[0]['data']['entity_id'], '1', 'Entity id is 1.');
+      $this->assertSame(1, count($ajax_commands), 'The entity submission HTTP request results in one AJAX command.');
+      $this->assertSame('quickeditEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditEntitySaved command.');
+      $this->assertSame($ajax_commands[0]['data']['entity_type'], 'node', 'Saved entity is of type node.');
+      $this->assertSame($ajax_commands[0]['data']['entity_id'], '1', 'Entity id is 1.');
 
       // Ensure the text on the original node did change.
       $this->drupalGet('node/1');
@@ -268,8 +268,8 @@ public function testUserWithPermission() {
       // Ensure no new revision was created and the log message is unchanged.
       $node = Node::load(1);
       $vids = \Drupal::entityManager()->getStorage('node')->revisionIds($node);
-      $this->assertIdentical(1, count($vids), 'The node has only one revision.');
-      $this->assertIdentical($original_log, $node->revision_log->value, 'The revision log message is unchanged.');
+      $this->assertSame(1, count($vids), 'The node has only one revision.');
+      $this->assertSame($original_log, $node->revision_log->value, 'The revision log message is unchanged.');
 
       // Now configure this node type to create new revisions automatically,
       // then again retrieve the field form, fill it, submit it (so it ends up
@@ -284,9 +284,9 @@ public function testUserWithPermission() {
       $response = $this->drupalPost('quickedit/form/' . 'node/1/body/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
-      $this->assertIdentical('quickeditFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldForm command.');
-      $this->assertIdentical('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
+      $this->assertSame(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
+      $this->assertSame('quickeditFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldForm command.');
+      $this->assertSame('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
 
       // Submit field form.
       preg_match('/\sname="form_token" value="([^"]+)"/', $ajax_commands[0]['data'], $token_match);
@@ -301,8 +301,8 @@ public function testUserWithPermission() {
       $response = $this->drupalPost('quickedit/form/' . 'node/1/body/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
-      $this->assertIdentical('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is an quickeditFieldFormSaved command.');
+      $this->assertSame(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
+      $this->assertSame('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is an quickeditFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'kthxbye'), 'Form value saved and printed back.');
 
       // Save the entity.
@@ -310,17 +310,17 @@ public function testUserWithPermission() {
       $response = $this->drupalPostWithFormat('quickedit/entity/' . 'node/1', 'json', $post);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands));
-      $this->assertIdentical('quickeditEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is an quickeditEntitySaved command.');
+      $this->assertSame(1, count($ajax_commands));
+      $this->assertSame('quickeditEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is an quickeditEntitySaved command.');
       $this->assertEqual($ajax_commands[0]['data'], ['entity_type' => 'node', 'entity_id' => 1], 'Updated entity type and ID returned');
 
       // Test that a revision was created with the correct log message.
       $vids = \Drupal::entityManager()->getStorage('node')->revisionIds(Node::load(1));
-      $this->assertIdentical(2, count($vids), 'The node has two revisions.');
+      $this->assertSame(2, count($vids), 'The node has two revisions.');
       $revision = node_revision_load($vids[0]);
-      $this->assertIdentical($original_log, $revision->revision_log->value, 'The first revision log message is unchanged.');
+      $this->assertSame($original_log, $revision->revision_log->value, 'The first revision log message is unchanged.');
       $revision = node_revision_load($vids[1]);
-      $this->assertIdentical('Updated the <em class="placeholder">Body</em> field through in-place editing.', $revision->revision_log->value, 'The second revision log message was correctly generated by Quick Edit module.');
+      $this->assertSame('Updated the <em class="placeholder">Body</em> field through in-place editing.', $revision->revision_log->value, 'The second revision log message was correctly generated by Quick Edit module.');
     }
   }
 
@@ -366,7 +366,7 @@ public function testTitleBaseField() {
         'editor' => 'plain_text',
       ]
     ];
-    $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
+    $this->assertSame(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
     // Restore drupalSettings to build the next requests; simpletest wipes them
     // after a JSON response.
     $this->drupalSettings = $htmlPageDrupalSettings;
@@ -377,9 +377,9 @@ public function testTitleBaseField() {
     $response = $this->drupalPost('quickedit/form/' . 'node/1/title/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
     $this->assertResponse(200);
     $ajax_commands = Json::decode($response);
-    $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
-    $this->assertIdentical('quickeditFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldForm command.');
-    $this->assertIdentical('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
+    $this->assertSame(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
+    $this->assertSame('quickeditFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldForm command.');
+    $this->assertSame('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
 
     // Prepare form values for submission. drupalPostAjaxForm() is not suitable
     // for handling pages with JSON responses, so we need our own solution
@@ -404,8 +404,8 @@ public function testTitleBaseField() {
       $response = $this->drupalPost('quickedit/form/' . 'node/1/title/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
-      $this->assertIdentical('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldFormSaved command.');
+      $this->assertSame(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
+      $this->assertSame('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'Obligatory question'), 'Form value saved and printed back.');
 
       // Ensure the text on the original node did not change yet.
@@ -417,10 +417,10 @@ public function testTitleBaseField() {
       $response = $this->drupalPostWithFormat('quickedit/entity/' . 'node/1', 'json', $post);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands), 'The entity submission HTTP request results in one AJAX command.');
-      $this->assertIdentical('quickeditEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is n quickeditEntitySaved command.');
-      $this->assertIdentical($ajax_commands[0]['data']['entity_type'], 'node', 'Saved entity is of type node.');
-      $this->assertIdentical($ajax_commands[0]['data']['entity_id'], '1', 'Entity id is 1.');
+      $this->assertSame(1, count($ajax_commands), 'The entity submission HTTP request results in one AJAX command.');
+      $this->assertSame('quickeditEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is n quickeditEntitySaved command.');
+      $this->assertSame($ajax_commands[0]['data']['entity_type'], 'node', 'Saved entity is of type node.');
+      $this->assertSame($ajax_commands[0]['data']['entity_id'], '1', 'Entity id is 1.');
 
       // Ensure the text on the original node did change.
       $this->drupalGet('node/1');
@@ -480,11 +480,11 @@ public function testCustomPipeline() {
       $response = $this->drupalPost($custom_render_url, '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
-      $this->assertIdentical('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldFormSaved command.');
+      $this->assertSame(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
+      $this->assertSame('quickeditFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is a quickeditFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'Fine thanks.'), 'Form value saved and printed back.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], '<div class="quickedit-test-wrapper">') !== FALSE, 'Custom render pipeline used to render the value.');
-      $this->assertIdentical(array_keys($ajax_commands[0]['other_view_modes']), ['full'], 'Field was also rendered in the "full" view mode.');
+      $this->assertSame(array_keys($ajax_commands[0]['other_view_modes']), ['full'], 'Field was also rendered in the "full" view mode.');
       $this->assertTrue(strpos($ajax_commands[0]['other_view_modes']['full'], 'Fine thanks.'), '"full" version of field contains the form value.');
     }
   }
@@ -528,8 +528,8 @@ public function testConcurrentEdit() {
       $response = $this->drupalPost('quickedit/form/' . 'node/1/body/en/full', '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
       $this->assertResponse(200);
       $ajax_commands = Json::decode($response);
-      $this->assertIdentical(2, count($ajax_commands), 'The field form HTTP request results in two AJAX commands.');
-      $this->assertIdentical('quickeditFieldFormValidationErrors', $ajax_commands[1]['command'], 'The second AJAX command is a quickeditFieldFormValidationErrors command.');
+      $this->assertSame(2, count($ajax_commands), 'The field form HTTP request results in two AJAX commands.');
+      $this->assertSame('quickeditFieldFormValidationErrors', $ajax_commands[1]['command'], 'The second AJAX command is a quickeditFieldFormValidationErrors command.');
       $this->assertTrue(strpos($ajax_commands[1]['data'], 'The content has either been modified by another user, or you have already submitted modifications. As a result, your changes cannot be saved.'), 'Error message returned to user.');
     }
   }
@@ -592,7 +592,7 @@ public function testImageField() {
     $response = $this->drupalPost('quickedit/form/node/1/field_image/en/full', '', ['nocssjs' => 'true'] + $this->getAjaxPageStatePostData(), ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]);
     $this->assertResponse(200);
     $ajax_commands = Json::decode($response);
-    $this->assertIdentical('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
+    $this->assertSame('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The quickeditFieldForm command contains a form.');
   }
 
 }
diff --git a/core/modules/rest/src/Tests/RESTTestBase.php b/core/modules/rest/src/Tests/RESTTestBase.php
index 3f97e46901..7b5750a4a5 100644
--- a/core/modules/rest/src/Tests/RESTTestBase.php
+++ b/core/modules/rest/src/Tests/RESTTestBase.php
@@ -575,7 +575,7 @@ protected function removeNodeFieldsForNonAdminUsers(NodeInterface $node) {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertResponseBody($expected, $message = '', $group = 'REST Response') {
-    return $this->assertIdentical($expected, $this->responseBody, $message ? $message : strtr('Response body @expected (expected) is equal to @response (actual).', ['@expected' => var_export($expected, TRUE), '@response' => var_export($this->responseBody, TRUE)]), $group);
+    return $this->assertSame($expected, $this->responseBody, $message ? $message : strtr('Response body @expected (expected) is equal to @response (actual).', ['@expected' => var_export($expected, TRUE), '@response' => var_export($this->responseBody, TRUE)]), $group);
   }
 
   /**
diff --git a/core/modules/rest/tests/src/Functional/Update/ResourceGranularityUpdateTest.php b/core/modules/rest/tests/src/Functional/Update/ResourceGranularityUpdateTest.php
index 19ef5458d5..e0a14dda4c 100644
--- a/core/modules/rest/tests/src/Functional/Update/ResourceGranularityUpdateTest.php
+++ b/core/modules/rest/tests/src/Functional/Update/ResourceGranularityUpdateTest.php
@@ -38,10 +38,10 @@ public function testMethodGranularityConvertedToResourceGranularity() {
 
     // Make sure we have the expected values before the update.
     $resource_config_entities = $resource_config_storage->loadMultiple();
-    $this->assertIdentical(['entity.comment', 'entity.node', 'entity.user'], array_keys($resource_config_entities));
-    $this->assertIdentical('method', $resource_config_entities['entity.node']->get('granularity'));
-    $this->assertIdentical('method', $resource_config_entities['entity.comment']->get('granularity'));
-    $this->assertIdentical('method', $resource_config_entities['entity.user']->get('granularity'));
+    $this->assertSame(['entity.comment', 'entity.node', 'entity.user'], array_keys($resource_config_entities));
+    $this->assertSame('method', $resource_config_entities['entity.node']->get('granularity'));
+    $this->assertSame('method', $resource_config_entities['entity.comment']->get('granularity'));
+    $this->assertSame('method', $resource_config_entities['entity.user']->get('granularity'));
 
     // Read the existing 'entity:comment' and 'entity:user' resource
     // configuration so we can verify it after the update.
@@ -52,20 +52,20 @@ public function testMethodGranularityConvertedToResourceGranularity() {
 
     // Make sure we have the expected values after the update.
     $resource_config_entities = $resource_config_storage->loadMultiple();
-    $this->assertIdentical(['entity.comment', 'entity.node', 'entity.user'], array_keys($resource_config_entities));
+    $this->assertSame(['entity.comment', 'entity.node', 'entity.user'], array_keys($resource_config_entities));
     // 'entity:node' should be updated.
-    $this->assertIdentical('resource', $resource_config_entities['entity.node']->get('granularity'));
+    $this->assertSame('resource', $resource_config_entities['entity.node']->get('granularity'));
     $this->assertidentical($resource_config_entities['entity.node']->get('configuration'), [
       'methods' => ['GET', 'POST', 'PATCH', 'DELETE'],
       'formats' => ['hal_json'],
       'authentication' => ['basic_auth'],
     ]);
     // 'entity:comment' should be unchanged.
-    $this->assertIdentical('method', $resource_config_entities['entity.comment']->get('granularity'));
-    $this->assertIdentical($comment_resource_configuration, $resource_config_entities['entity.comment']->get('configuration'));
+    $this->assertSame('method', $resource_config_entities['entity.comment']->get('granularity'));
+    $this->assertSame($comment_resource_configuration, $resource_config_entities['entity.comment']->get('configuration'));
     // 'entity:user' should be unchanged.
-    $this->assertIdentical('method', $resource_config_entities['entity.user']->get('granularity'));
-    $this->assertIdentical($user_resource_configuration, $resource_config_entities['entity.user']->get('configuration'));
+    $this->assertSame('method', $resource_config_entities['entity.user']->get('granularity'));
+    $this->assertSame($user_resource_configuration, $resource_config_entities['entity.user']->get('configuration'));
   }
 
 }
diff --git a/core/modules/rest/tests/src/Functional/Update/RestConfigurationEntitiesUpdateTest.php b/core/modules/rest/tests/src/Functional/Update/RestConfigurationEntitiesUpdateTest.php
index f4d8199ab4..be87d1a938 100644
--- a/core/modules/rest/tests/src/Functional/Update/RestConfigurationEntitiesUpdateTest.php
+++ b/core/modules/rest/tests/src/Functional/Update/RestConfigurationEntitiesUpdateTest.php
@@ -43,7 +43,7 @@ public function testResourcesConvertedToConfigEntities() {
     $this->assertTrue(array_key_exists('resources', $rest_settings->getRawData()));
     $this->assertTrue(array_key_exists('entity:node', $rest_settings->getRawData()['resources']));
     $resource_config_entities = $resource_config_storage->loadMultiple();
-    $this->assertIdentical([], array_keys($resource_config_entities));
+    $this->assertSame([], array_keys($resource_config_entities));
 
     $this->runUpdates();
 
@@ -51,15 +51,15 @@ public function testResourcesConvertedToConfigEntities() {
     $rest_settings = $this->config('rest.settings');
     $this->assertFalse(array_key_exists('resources', $rest_settings->getRawData()));
     $resource_config_entities = $resource_config_storage->loadMultiple();
-    $this->assertIdentical(['entity.node'], array_keys($resource_config_entities));
+    $this->assertSame(['entity.node'], array_keys($resource_config_entities));
     $node_resource_config_entity = $resource_config_entities['entity.node'];
-    $this->assertIdentical(RestResourceConfigInterface::RESOURCE_GRANULARITY, $node_resource_config_entity->get('granularity'));
-    $this->assertIdentical([
+    $this->assertSame(RestResourceConfigInterface::RESOURCE_GRANULARITY, $node_resource_config_entity->get('granularity'));
+    $this->assertSame([
       'methods' => ['GET'],
       'formats' => ['json'],
       'authentication' => ['basic_auth'],
     ], $node_resource_config_entity->get('configuration'));
-    $this->assertIdentical(['module' => ['basic_auth', 'node', 'serialization']], $node_resource_config_entity->getDependencies());
+    $this->assertSame(['module' => ['basic_auth', 'node', 'serialization']], $node_resource_config_entity->getDependencies());
   }
 
 }
diff --git a/core/modules/rest/tests/src/Functional/Update/RestExportAuthUpdateTest.php b/core/modules/rest/tests/src/Functional/Update/RestExportAuthUpdateTest.php
index 87cd5dbfba..ed2217149c 100644
--- a/core/modules/rest/tests/src/Functional/Update/RestExportAuthUpdateTest.php
+++ b/core/modules/rest/tests/src/Functional/Update/RestExportAuthUpdateTest.php
@@ -30,7 +30,7 @@ public function testUpdate() {
     // Get particular view.
     $view = \Drupal::entityTypeManager()->getStorage('view')->load('rest_export_with_authorization');
     $displays = $view->get('display');
-    $this->assertIdentical($displays['rest_export_1']['display_options']['auth']['basic_auth'], 'basic_auth', 'Basic authentication is set as authentication method.');
+    $this->assertSame($displays['rest_export_1']['display_options']['auth']['basic_auth'], 'basic_auth', 'Basic authentication is set as authentication method.');
   }
 
 }
diff --git a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
index cf9913d85a..6360b7d099 100644
--- a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
@@ -81,7 +81,7 @@ public function testExcludedTitleTokenDisplay() {
       ['nothing' => 'Article test 2'],
       ['nothing' => 'Article test 1'],
     ];
-    $this->assertIdentical($actual_json, json_encode($expected));
+    $this->assertSame($actual_json, json_encode($expected));
   }
 
 }
diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
index cb9fee24a2..fea0264cff 100644
--- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
@@ -122,7 +122,7 @@ public function testSerializerResponses() {
       $expected[] = $expected_row;
     }
 
-    $this->assertIdentical($actual_json, json_encode($expected), 'The expected JSON output was found.');
+    $this->assertSame($actual_json, json_encode($expected), 'The expected JSON output was found.');
 
 
     // Test that the rendered output and the preview output are the same.
@@ -131,7 +131,7 @@ public function testSerializerResponses() {
     // Mock the request content type by setting it on the display handler.
     $view->display_handler->setContentType('json');
     $output = $view->preview();
-    $this->assertIdentical($actual_json, (string) drupal_render_root($output), 'The expected JSON preview output was found.');
+    $this->assertSame($actual_json, (string) drupal_render_root($output), 'The expected JSON preview output was found.');
 
     // Test a 403 callback.
     $this->drupalGet('test/serialize/denied');
@@ -154,7 +154,7 @@ public function testSerializerResponses() {
 
     $actual_json = $this->drupalGet('test/serialize/entity', ['query' => ['_format' => 'json']]);
     $this->assertResponse(200);
-    $this->assertIdentical($actual_json, $expected, 'The expected JSON output was found.');
+    $this->assertSame($actual_json, $expected, 'The expected JSON output was found.');
     $expected_cache_tags = $view->getCacheTags();
     $expected_cache_tags[] = 'entity_test_list';
     /** @var \Drupal\Core\Entity\EntityInterface $entity */
@@ -166,7 +166,7 @@ public function testSerializerResponses() {
 
     $expected = $serializer->serialize($entities, 'hal_json');
     $actual_json = $this->drupalGet('test/serialize/entity', ['query' => ['_format' => 'hal_json']]);
-    $this->assertIdentical($actual_json, $expected, 'The expected HAL output was found.');
+    $this->assertSame($actual_json, $expected, 'The expected HAL output was found.');
     $this->assertCacheTags($expected_cache_tags);
 
     // Change the default format to xml.
@@ -201,7 +201,7 @@ public function testSerializerResponses() {
     $view->save();
     $expected = $serializer->serialize($entities, 'json');
     $actual_json = $this->drupalGet('test/serialize/entity', ['query' => ['_format' => 'json']]);
-    $this->assertIdentical($actual_json, $expected, 'The expected JSON output was found.');
+    $this->assertSame($actual_json, $expected, 'The expected JSON output was found.');
     $expected = $serializer->serialize($entities, 'xml');
     $actual_xml = $this->drupalGet('test/serialize/entity', ['query' => ['_format' => 'xml']]);
     $this->assertSame(trim($expected), $actual_xml);
@@ -431,7 +431,7 @@ public function testUIFieldAlias() {
       $expected[] = $expected_row;
     }
 
-    $this->assertIdentical(Json::decode($this->drupalGet('test/serialize/field', ['query' => ['_format' => 'json']])), $this->castSafeStrings($expected));
+    $this->assertSame(Json::decode($this->drupalGet('test/serialize/field', ['query' => ['_format' => 'json']])), $this->castSafeStrings($expected));
 
     // Test a random aliases for fields, they should be replaced.
     $alias_map = [
@@ -466,7 +466,7 @@ public function testUIFieldAlias() {
       $expected[] = $expected_row;
     }
 
-    $this->assertIdentical(Json::decode($this->drupalGet('test/serialize/field', ['query' => ['_format' => 'json']])), $this->castSafeStrings($expected));
+    $this->assertSame(Json::decode($this->drupalGet('test/serialize/field', ['query' => ['_format' => 'json']])), $this->castSafeStrings($expected));
   }
 
   /**
@@ -504,8 +504,8 @@ public function testFieldRawOutput() {
 
     // Just test the raw 'created' value against each row.
     foreach (Json::decode($this->drupalGet('test/serialize/field', ['query' => ['_format' => 'json']])) as $index => $values) {
-      $this->assertIdentical($values['created'], $view->result[$index]->views_test_data_created, 'Expected raw created value found.');
-      $this->assertIdentical($values['name'], $view->result[$index]->views_test_data_name, 'Expected raw name value found.');
+      $this->assertSame($values['created'], $view->result[$index]->views_test_data_created, 'Expected raw created value found.');
+      $this->assertSame($values['name'], $view->result[$index]->views_test_data_name, 'Expected raw name value found.');
     }
 
     // Test result with an excluded field.
@@ -639,7 +639,7 @@ public function testFieldapiField() {
 
     // Test the raw 'created' value against each row.
     foreach (Json::decode($this->drupalGet('test/serialize/node-field', ['query' => ['_format' => 'json']])) as $index => $values) {
-      $this->assertIdentical($values['title'], $view->result[$index]->_entity->title->value, 'Expected raw title value found.');
+      $this->assertSame($values['title'], $view->result[$index]->_entity->title->value, 'Expected raw title value found.');
     }
 
     // Test that multiple raw body fields are shown.
@@ -824,7 +824,7 @@ public function testMulEntityRows() {
 
     // Check that the names are correct.
     $expected = ['mul-l1-l2', 'mul-l1-orig', 'mul-l2-l1', 'mul-l2-orig', 'mul-none'];
-    $this->assertIdentical($names, $expected, 'The translated content was found in the JSON.');
+    $this->assertSame($names, $expected, 'The translated content was found in the JSON.');
   }
 
 }
diff --git a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
index cc77f2b6a6..77064e22f0 100644
--- a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
@@ -217,9 +217,9 @@ public function testSearchModuleDisabling() {
   public function testDefaultSearchPageOrdering() {
     $this->drupalGet('search');
     $elements = $this->xpath('//*[contains(@class, :class)]//a', [':class' => 'tabs primary']);
-    $this->assertIdentical((string) $elements[0]['href'], \Drupal::url('search.view_node_search'));
-    $this->assertIdentical((string) $elements[1]['href'], \Drupal::url('search.view_dummy_search_type'));
-    $this->assertIdentical((string) $elements[2]['href'], \Drupal::url('search.view_user_search'));
+    $this->assertSame((string) $elements[0]['href'], \Drupal::url('search.view_node_search'));
+    $this->assertSame((string) $elements[1]['href'], \Drupal::url('search.view_dummy_search_type'));
+    $this->assertSame((string) $elements[2]['href'], \Drupal::url('search.view_user_search'));
   }
 
   /**
@@ -272,8 +272,8 @@ public function testMultipleSearchPages() {
     // Ensure both search pages have their tabs displayed.
     $this->drupalGet('search');
     $elements = $this->xpath('//*[contains(@class, :class)]//a', [':class' => 'tabs primary']);
-    $this->assertIdentical((string) $elements[0]['href'], Url::fromRoute('search.view_' . $first_id)->toString());
-    $this->assertIdentical((string) $elements[1]['href'], Url::fromRoute('search.view_' . $second_id)->toString());
+    $this->assertSame((string) $elements[0]['href'], Url::fromRoute('search.view_' . $first_id)->toString());
+    $this->assertSame((string) $elements[1]['href'], Url::fromRoute('search.view_' . $second_id)->toString());
 
     // Switch the weight of the search pages and check the order of the tabs.
     $edit = [
@@ -283,8 +283,8 @@ public function testMultipleSearchPages() {
     $this->drupalPostForm('admin/config/search/pages', $edit, t('Save configuration'));
     $this->drupalGet('search');
     $elements = $this->xpath('//*[contains(@class, :class)]//a', [':class' => 'tabs primary']);
-    $this->assertIdentical((string) $elements[0]['href'], Url::fromRoute('search.view_' . $second_id)->toString());
-    $this->assertIdentical((string) $elements[1]['href'], Url::fromRoute('search.view_' . $first_id)->toString());
+    $this->assertSame((string) $elements[0]['href'], Url::fromRoute('search.view_' . $second_id)->toString());
+    $this->assertSame((string) $elements[1]['href'], Url::fromRoute('search.view_' . $first_id)->toString());
 
     // Check the initial state of the search pages.
     $this->drupalGet('admin/config/search/pages');
@@ -385,7 +385,7 @@ protected function verifySearchPageOperations($id, $edit, $delete, $disable, $en
   protected function assertDefaultSearch($expected, $message = '', $group = 'Other') {
     /** @var $search_page_repository \Drupal\search\SearchPageRepositoryInterface */
     $search_page_repository = \Drupal::service('search.search_page_repository');
-    $this->assertIdentical($search_page_repository->getDefaultSearchPage(), $expected, $message, $group);
+    $this->assertSame($search_page_repository->getDefaultSearchPage(), $expected, $message, $group);
   }
 
   /**
diff --git a/core/modules/search/tests/src/Functional/SearchSimplifyTest.php b/core/modules/search/tests/src/Functional/SearchSimplifyTest.php
index bd3bbb43d6..8686264f42 100644
--- a/core/modules/search/tests/src/Functional/SearchSimplifyTest.php
+++ b/core/modules/search/tests/src/Functional/SearchSimplifyTest.php
@@ -27,7 +27,7 @@ public function testSearchSimplifyUnicode() {
       if ($key % 2) {
         // Even line - should simplify down to a space.
         $simplified = search_simplify($string);
-        $this->assertIdentical($simplified, ' ', "Line $key is excluded from the index");
+        $this->assertSame($simplified, ' ', "Line $key is excluded from the index");
       }
       else {
         // Odd line, should be word characters.
@@ -58,7 +58,7 @@ public function testSearchSimplifyUnicode() {
     for ($i = 0; $i < 32; $i++) {
       $string .= chr($i);
     }
-    $this->assertIdentical(' ', search_simplify($string), 'Search simplify works for ASCII control characters.');
+    $this->assertSame(' ', search_simplify($string), 'Search simplify works for ASCII control characters.');
   }
 
   /**
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
index a70114a6a9..757aca4721 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
@@ -33,9 +33,9 @@ public function testSearchPage() {
     $id = 'node_search';
     /** @var \Drupal\search\Entity\SearchPage $search_page */
     $search_page = SearchPage::load($id);
-    $this->assertIdentical($id, $search_page->id());
+    $this->assertSame($id, $search_page->id());
     $configuration = $search_page->getPlugin()->getConfiguration();
-    $this->assertIdentical($configuration['rankings'], [
+    $this->assertSame($configuration['rankings'], [
       'comments' => 5,
       'promote' => 0,
       'recent' => 0,
@@ -43,7 +43,7 @@ public function testSearchPage() {
       'sticky' => 8,
       'views' => 1,
     ]);
-    $this->assertIdentical('node', $search_page->getPath());
+    $this->assertSame('node', $search_page->getPath());
 
     // Test that we can re-import using the EntitySearchPage destination.
     Database::getConnection('default', 'migrate')
@@ -59,7 +59,7 @@ public function testSearchPage() {
     $this->executeMigration($migration);
 
     $configuration = SearchPage::load($id)->getPlugin()->getConfiguration();
-    $this->assertIdentical(4, $configuration['rankings']['comments']);
+    $this->assertSame(4, $configuration['rankings']['comments']);
   }
 
 }
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
index d28bbd824e..8f4c0152ea 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
@@ -32,10 +32,10 @@ protected function setUp() {
    */
   public function testSearchSettings() {
     $config = $this->config('search.settings');
-    $this->assertIdentical(3, $config->get('index.minimum_word_size'));
-    $this->assertIdentical(TRUE, $config->get('index.overlap_cjk'));
-    $this->assertIdentical(100, $config->get('index.cron_limit'));
-    $this->assertIdentical(TRUE, $config->get('logging'));
+    $this->assertSame(3, $config->get('index.minimum_word_size'));
+    $this->assertSame(TRUE, $config->get('index.overlap_cjk'));
+    $this->assertSame(100, $config->get('index.cron_limit'));
+    $this->assertSame(TRUE, $config->get('logging'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'search.settings', $config->get());
   }
 
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
index 86d3b22009..678f5b6ea9 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
@@ -35,7 +35,7 @@ public function testSearchPage() {
     $id = 'node_search';
     /** @var \Drupal\search\Entity\SearchPage $search_page */
     $search_page = SearchPage::load($id);
-    $this->assertIdentical($id, $search_page->id());
+    $this->assertSame($id, $search_page->id());
     $configuration = $search_page->getPlugin()->getConfiguration();
     $expected_rankings = [
       'comments' => 0,
@@ -44,8 +44,8 @@ public function testSearchPage() {
       'sticky' => 0,
       'views' => 0,
     ];
-    $this->assertIdentical($expected_rankings, $configuration['rankings']);
-    $this->assertIdentical('node', $search_page->getPath());
+    $this->assertSame($expected_rankings, $configuration['rankings']);
+    $this->assertSame('node', $search_page->getPath());
 
     // Test that we can re-import using the EntitySearchPage destination.
     Database::getConnection('default', 'migrate')
@@ -61,7 +61,7 @@ public function testSearchPage() {
     $this->executeMigration($migration);
 
     $configuration = SearchPage::load($id)->getPlugin()->getConfiguration();
-    $this->assertIdentical(4, $configuration['rankings']['comments']);
+    $this->assertSame(4, $configuration['rankings']['comments']);
   }
 
 }
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
index 2306ce7370..ef91665eea 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
@@ -26,23 +26,23 @@ protected function setUp() {
    */
   public function testSearchSettings() {
     $config = $this->config('search.settings');
-    $this->assertIdentical('node_search', $config->get('default_page'));
-    $this->assertIdentical(4, $config->get('index.minimum_word_size'));
+    $this->assertSame('node_search', $config->get('default_page'));
+    $this->assertSame(4, $config->get('index.minimum_word_size'));
     $this->assertTrue($config->get('index.overlap_cjk'));
-    $this->assertIdentical(100, $config->get('index.cron_limit'));
-    $this->assertIdentical(7, $config->get('and_or_limit'));
-    $this->assertIdentical(25, $config->get('index.tag_weights.h1'));
-    $this->assertIdentical(18, $config->get('index.tag_weights.h2'));
-    $this->assertIdentical(15, $config->get('index.tag_weights.h3'));
-    $this->assertIdentical(12, $config->get('index.tag_weights.h4'));
-    $this->assertIdentical(9, $config->get('index.tag_weights.h5'));
-    $this->assertIdentical(6, $config->get('index.tag_weights.h6'));
-    $this->assertIdentical(3, $config->get('index.tag_weights.u'));
-    $this->assertIdentical(3, $config->get('index.tag_weights.b'));
-    $this->assertIdentical(3, $config->get('index.tag_weights.i'));
-    $this->assertIdentical(3, $config->get('index.tag_weights.strong'));
-    $this->assertIdentical(3, $config->get('index.tag_weights.em'));
-    $this->assertIdentical(10, $config->get('index.tag_weights.a'));
+    $this->assertSame(100, $config->get('index.cron_limit'));
+    $this->assertSame(7, $config->get('and_or_limit'));
+    $this->assertSame(25, $config->get('index.tag_weights.h1'));
+    $this->assertSame(18, $config->get('index.tag_weights.h2'));
+    $this->assertSame(15, $config->get('index.tag_weights.h3'));
+    $this->assertSame(12, $config->get('index.tag_weights.h4'));
+    $this->assertSame(9, $config->get('index.tag_weights.h5'));
+    $this->assertSame(6, $config->get('index.tag_weights.h6'));
+    $this->assertSame(3, $config->get('index.tag_weights.u'));
+    $this->assertSame(3, $config->get('index.tag_weights.b'));
+    $this->assertSame(3, $config->get('index.tag_weights.i'));
+    $this->assertSame(3, $config->get('index.tag_weights.strong'));
+    $this->assertSame(3, $config->get('index.tag_weights.em'));
+    $this->assertSame(10, $config->get('index.tag_weights.a'));
     $this->assertTrue($config->get('logging'));
   }
 
diff --git a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
index 5b71b93b7a..d1a5b94d7a 100644
--- a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
@@ -163,7 +163,7 @@ public function testUserNormalize() {
 
     // The key 'pass' will now exist, but the password value should be
     // normalized to NULL.
-    $this->assertIdentical($normalized['pass'], [NULL], '"pass" value is normalized to [NULL]');
+    $this->assertSame($normalized['pass'], [NULL], '"pass" value is normalized to [NULL]');
   }
 
   /**
@@ -177,14 +177,14 @@ public function testSerialize() {
     $expected = json_encode($normalized);
     // Test 'json'.
     $actual = $this->serializer->serialize($this->entity, 'json');
-    $this->assertIdentical($actual, $expected, 'Entity serializes to JSON when "json" is requested.');
+    $this->assertSame($actual, $expected, 'Entity serializes to JSON when "json" is requested.');
     $actual = $this->serializer->serialize($normalized, 'json');
-    $this->assertIdentical($actual, $expected, 'A normalized array serializes to JSON when "json" is requested');
+    $this->assertSame($actual, $expected, 'A normalized array serializes to JSON when "json" is requested');
     // Test 'ajax'.
     $actual = $this->serializer->serialize($this->entity, 'ajax');
-    $this->assertIdentical($actual, $expected, 'Entity serializes to JSON when "ajax" is requested.');
+    $this->assertSame($actual, $expected, 'Entity serializes to JSON when "ajax" is requested.');
     $actual = $this->serializer->serialize($normalized, 'ajax');
-    $this->assertIdentical($actual, $expected, 'A normalized array serializes to JSON when "ajax" is requested');
+    $this->assertSame($actual, $expected, 'A normalized array serializes to JSON when "ajax" is requested');
 
     // Generate the expected xml in a way that allows changes to entity property
     // order.
@@ -213,9 +213,9 @@ public function testSerialize() {
     $expected = implode('', $expected);
     // Test 'xml'. The output should match that of Symfony's XmlEncoder.
     $actual = $this->serializer->serialize($this->entity, 'xml');
-    $this->assertIdentical($actual, $expected);
+    $this->assertSame($actual, $expected);
     $actual = $this->serializer->serialize($normalized, 'xml');
-    $this->assertIdentical($actual, $expected);
+    $this->assertSame($actual, $expected);
   }
 
   /**
@@ -227,9 +227,9 @@ public function testDenormalize() {
     foreach (['json', 'xml'] as $type) {
       $denormalized = $this->serializer->denormalize($normalized, $this->entityClass, $type, ['entity_type' => 'entity_test_mulrev']);
       $this->assertTrue($denormalized instanceof $this->entityClass, SafeMarkup::format('Denormalized entity is an instance of @class', ['@class' => $this->entityClass]));
-      $this->assertIdentical($denormalized->getEntityTypeId(), $this->entity->getEntityTypeId(), 'Expected entity type found.');
-      $this->assertIdentical($denormalized->bundle(), $this->entity->bundle(), 'Expected entity bundle found.');
-      $this->assertIdentical($denormalized->uuid(), $this->entity->uuid(), 'Expected entity UUID found.');
+      $this->assertSame($denormalized->getEntityTypeId(), $this->entity->getEntityTypeId(), 'Expected entity type found.');
+      $this->assertSame($denormalized->bundle(), $this->entity->bundle(), 'Expected entity bundle found.');
+      $this->assertSame($denormalized->uuid(), $this->entity->uuid(), 'Expected entity UUID found.');
     }
   }
 
diff --git a/core/modules/serialization/tests/src/Kernel/SerializationTest.php b/core/modules/serialization/tests/src/Kernel/SerializationTest.php
index a7ad145e65..a588f2a2f8 100644
--- a/core/modules/serialization/tests/src/Kernel/SerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/SerializationTest.php
@@ -40,7 +40,7 @@ public function testSerializerComponentRegistration() {
     $expected = 'Normalized by SerializationTestNormalizer, Encoded by SerializationTestEncoder';
 
     // Ensure the serialization invokes the expected normalizer and encoder.
-    $this->assertIdentical($this->serializer->serialize($object, $format), $expected);
+    $this->assertSame($this->serializer->serialize($object, $format), $expected);
 
     // Ensure the serialization fails for an unsupported format.
     try {
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
index b897df752d..f64e02f189 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
@@ -39,7 +39,7 @@ public function testShortcutSetAdd() {
     ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
     $new_set = $this->container->get('entity.manager')->getStorage('shortcut_set')->load($edit['id']);
-    $this->assertIdentical($new_set->id(), $edit['id'], 'Successfully created a shortcut set.');
+    $this->assertSame($new_set->id(), $edit['id'], 'Successfully created a shortcut set.');
     $this->drupalGet('user/' . $this->adminUser->id() . '/shortcuts');
     $this->assertText($new_set->label(), 'Generated shortcut set was listed as a choice on the user account page.');
   }
@@ -94,7 +94,7 @@ public function testShortcutSetEdit() {
     \Drupal::entityManager()->getStorage('shortcut')->resetCache();
     // Check to ensure that the shortcut weights have changed and that
     // ShortcutSet::.getShortcuts() returns shortcuts in the new order.
-    $this->assertIdentical(array_reverse(array_keys($shortcuts)), array_keys($set->getShortcuts()));
+    $this->assertSame(array_reverse(array_keys($shortcuts)), array_keys($set->getShortcuts()));
   }
 
   /**
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
index b6543723db..aa045d100d 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
@@ -61,12 +61,12 @@ protected function assertEntity($id, $label, $expected_size) {
     $shortcut_set = ShortcutSet::load($id);
     $this->assertTrue($shortcut_set instanceof ShortcutSetInterface);
     /** @var \Drupal\shortcut\ShortcutSetInterface $shortcut_set */
-    $this->assertIdentical($id, $shortcut_set->id());
-    $this->assertIdentical($label, $shortcut_set->label());
+    $this->assertSame($id, $shortcut_set->id());
+    $this->assertSame($label, $shortcut_set->label());
 
     // Check the number of shortcuts in the set.
     $shortcuts = $shortcut_set->getShortcuts();
-    $this->assertIdentical(count($shortcuts), $expected_size);
+    $this->assertSame(count($shortcuts), $expected_size);
   }
 
 }
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
index ae939569cf..29e8410245 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
@@ -50,7 +50,7 @@ public function testShortcutSetUsersMigration() {
     $account = User::load(2);
     $shortcut_set = shortcut_current_displayed_set($account);
     /** @var \Drupal\shortcut\ShortcutSetInterface $shortcut_set */
-    $this->assertIdentical('shortcut_set_2', $shortcut_set->id());
+    $this->assertSame('shortcut_set_2', $shortcut_set->id());
   }
 
 }
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
index e685151a5b..6360861a65 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
@@ -55,9 +55,9 @@ protected function assertEntity($id, $title, $weight, $url) {
     $shortcut = Shortcut::load($id);
     $this->assertTrue($shortcut instanceof ShortcutInterface);
     /** @var \Drupal\shortcut\ShortcutInterface $shortcut */
-    $this->assertIdentical($title, $shortcut->getTitle());
-    $this->assertIdentical($weight, $shortcut->getWeight());
-    $this->assertIdentical($url, $shortcut->getUrl()->toString());
+    $this->assertSame($title, $shortcut->getTitle());
+    $this->assertSame($weight, $shortcut->getWeight());
+    $this->assertSame($url, $shortcut->getUrl()->toString());
   }
 
   /**
diff --git a/core/modules/simpletest/src/AssertContentTrait.php b/core/modules/simpletest/src/AssertContentTrait.php
index 5a6c8c06ef..dff9f1a26b 100644
--- a/core/modules/simpletest/src/AssertContentTrait.php
+++ b/core/modules/simpletest/src/AssertContentTrait.php
@@ -886,7 +886,7 @@ protected function assertThemeOutput($callback, array $variables = [], $expected
       $message = '%callback rendered correctly.';
     }
     $message = format_string($message, ['%callback' => 'theme_' . $callback . '()']);
-    return $this->assertIdentical($output, $expected, $message, $group);
+    return $this->assertSame($output, $expected, $message, $group);
   }
 
   /**
diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php
index a3fd1788d6..318b8ee3ca 100644
--- a/core/modules/simpletest/src/TestBase.php
+++ b/core/modules/simpletest/src/TestBase.php
@@ -625,7 +625,7 @@ protected function assertNotEqual($first, $second, $message = '', $group = 'Othe
    * @return
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
-  protected function assertIdentical($first, $second, $message = '', $group = 'Other') {
+  protected function assertSame($first, $second, $message = '', $group = 'Other') {
     $is_identical = $first === $second;
     if (!$is_identical || !$message) {
       $default_message = SafeMarkup::format('Value @first is identical to value @second.', ['@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE)]);
@@ -685,7 +685,7 @@ protected function assertNotIdentical($first, $second, $message = '', $group = '
    * @return
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
-  protected function assertIdenticalObject($object1, $object2, $message = '', $group = 'Other') {
+  protected function assertSameObject($object1, $object2, $message = '', $group = 'Other') {
     $message = $message ?: SafeMarkup::format('@object1 is identical to @object2', [
       '@object1' => var_export($object1, TRUE),
       '@object2' => var_export($object2, TRUE),
diff --git a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php
index 1e9e75da0b..b4ca8a4bf0 100644
--- a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php
+++ b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php
@@ -57,9 +57,9 @@ public function testSetUp() {
     // Verify that specified $modules have been loaded.
     $this->assertTrue(function_exists('entity_test_entity_bundle_info'), 'entity_test.module was loaded.');
     // Verify that there is a fixed module list.
-    $this->assertIdentical(array_keys(\Drupal::moduleHandler()->getModuleList()), $modules);
-    $this->assertIdentical(\Drupal::moduleHandler()->getImplementations('entity_bundle_info'), ['entity_test']);
-    $this->assertIdentical(\Drupal::moduleHandler()->getImplementations('entity_type_alter'), ['entity_test']);
+    $this->assertSame(array_keys(\Drupal::moduleHandler()->getModuleList()), $modules);
+    $this->assertSame(\Drupal::moduleHandler()->getImplementations('entity_bundle_info'), ['entity_test']);
+    $this->assertSame(\Drupal::moduleHandler()->getImplementations('entity_type_alter'), ['entity_test']);
 
     // Verify that no modules have been installed.
     $this->assertFalse(db_table_exists($table), "'$table' database table not found.");
diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php
index a32c142369..340d6e2a04 100644
--- a/core/modules/simpletest/src/Tests/SimpleTestTest.php
+++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php
@@ -213,7 +213,7 @@ public function stubTest() {
     $this->assertTrue(function_exists('simpletest_test_stub_settings_function'));
     // Check that the test-specific service file got loaded.
     $this->assertTrue($this->container->has('site.service.yml'));
-    $this->assertIdentical(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\MemoryBackendFactory');
+    $this->assertSame(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\MemoryBackendFactory');
 
     // These cause the two exceptions asserted in confirmStubResults().
     // Call trigger_error() without the required argument to trigger an E_WARNING.
diff --git a/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php b/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php
index e032cef941..b60df3fb77 100644
--- a/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php
+++ b/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php
@@ -37,7 +37,7 @@ public function testOutput() {
     // SimpletestUiPrinter.
     $this->assertEqual($output[19], 'HTML output was generated<br />');
     // Check that URLs are printed as HTML links.
-    $this->assertIdentical(strpos($output[20], '<a href="http'), 0);
+    $this->assertSame(strpos($output[20], '<a href="http'), 0);
   }
 
 }
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 569103224e..c62ec16ef9 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -1166,7 +1166,7 @@ protected function drupalPostAjaxForm($path, $edit, $triggering_element, $ajax_p
     // Submit the POST request.
     $return = Json::decode($this->drupalPostForm(NULL, $edit, ['path' => $ajax_path, 'triggering_element' => $triggering_element], $options, $headers, $form_html_id, $extra_post));
     if ($this->assertAjaxHeader) {
-      $this->assertIdentical($this->drupalGetHeader('X-Drupal-Ajax-Token'), '1', 'Ajax response header found.');
+      $this->assertSame($this->drupalGetHeader('X-Drupal-Ajax-Token'), '1', 'Ajax response header found.');
     }
 
     // Change the page content by applying the returned commands.
diff --git a/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php b/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php
index f8f9ffb02c..eb305546a3 100644
--- a/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php
+++ b/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php
@@ -33,13 +33,13 @@ protected function setUp() {
    */
   public function testSimpletestSettings() {
     $config = $this->config('simpletest.settings');
-    $this->assertIdentical(TRUE, $config->get('clear_results'));
-    $this->assertIdentical(CURLAUTH_BASIC, $config->get('httpauth.method'));
+    $this->assertSame(TRUE, $config->get('clear_results'));
+    $this->assertSame(CURLAUTH_BASIC, $config->get('httpauth.method'));
     // NULL in the dump means defaults which is empty string. Same as omitting
     // them.
-    $this->assertIdentical('', $config->get('httpauth.password'));
-    $this->assertIdentical('', $config->get('httpauth.username'));
-    $this->assertIdentical(TRUE, $config->get('verbose'));
+    $this->assertSame('', $config->get('httpauth.password'));
+    $this->assertSame('', $config->get('httpauth.username'));
+    $this->assertSame(TRUE, $config->get('verbose'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'simpletest.settings', $config->get());
   }
 
diff --git a/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php b/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php
index 6eba6339c8..d7060fb8d9 100644
--- a/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php
+++ b/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php
@@ -28,9 +28,9 @@ protected function setUp() {
   public function testMigration() {
     $config = \Drupal::config('simpletest.settings')->get();
     $this->assertTrue($config['clear_results']);
-    $this->assertIdentical(CURLAUTH_BASIC, $config['httpauth']['method']);
-    $this->assertIdentical('testbot', $config['httpauth']['username']);
-    $this->assertIdentical('foobaz', $config['httpauth']['password']);
+    $this->assertSame(CURLAUTH_BASIC, $config['httpauth']['method']);
+    $this->assertSame('testbot', $config['httpauth']['username']);
+    $this->assertSame('foobaz', $config['httpauth']['password']);
     $this->assertTrue($config['verbose']);
   }
 
diff --git a/core/modules/simpletest/tests/src/Unit/TestBaseTest.php b/core/modules/simpletest/tests/src/Unit/TestBaseTest.php
index cdfe9869b5..3614633961 100644
--- a/core/modules/simpletest/tests/src/Unit/TestBaseTest.php
+++ b/core/modules/simpletest/tests/src/Unit/TestBaseTest.php
@@ -318,14 +318,14 @@ public function providerEqualityAssertions() {
   }
 
   /**
-   * @covers ::assertIdentical
+   * @covers ::assertSame
    * @dataProvider providerEqualityAssertions
    */
   public function testAssertIdentical($expected_identical, $expected_equal, $first, $second) {
     $test_base = $this->getTestBaseForAssertionTests('test_id');
     $this->assertEquals(
         $expected_identical,
-        $this->invokeProtectedMethod($test_base, 'assertIdentical', [$first, $second])
+        $this->invokeProtectedMethod($test_base, 'assertSame', [$first, $second])
     );
   }
 
@@ -382,14 +382,14 @@ public function providerAssertIdenticalObject() {
   }
 
   /**
-   * @covers ::assertIdenticalObject
+   * @covers ::assertSameObject
    * @dataProvider providerAssertIdenticalObject
    */
   public function testAssertIdenticalObject($expected, $first, $second) {
     $test_base = $this->getTestBaseForAssertionTests('test_id');
     $this->assertEquals(
       $expected,
-      $this->invokeProtectedMethod($test_base, 'assertIdenticalObject', [$first, $second])
+      $this->invokeProtectedMethod($test_base, 'assertSameObject', [$first, $second])
     );
   }
 
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php b/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
index 09565aefae..8abffefa99 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
@@ -112,20 +112,20 @@ public function testLogging() {
     $this->drupalGet($path);
     $settings = $this->getDrupalSettings();
     $this->assertPattern($expected_library, 'Found statistics library JS on node page.');
-    $this->assertIdentical($this->node->id(), $settings['statistics']['data']['nid'], 'Found statistics settings on node page.');
+    $this->assertSame($this->node->id(), $settings['statistics']['data']['nid'], 'Found statistics settings on node page.');
 
     // Verify the same when loading the site in a non-default language.
     $this->drupalGet($this->language['langcode'] . '/' . $path);
     $settings = $this->getDrupalSettings();
     $this->assertPattern($expected_library, 'Found statistics library JS on a valid node page in a non-default language.');
-    $this->assertIdentical($this->node->id(), $settings['statistics']['data']['nid'], 'Found statistics settings on valid node page in a non-default language.');
+    $this->assertSame($this->node->id(), $settings['statistics']['data']['nid'], 'Found statistics settings on valid node page in a non-default language.');
 
     // Manually call statistics.php to simulate ajax data collection behavior.
     global $base_root;
     $post = ['nid' => $this->node->id()];
     $this->client->post($base_root . $stats_path, ['form_params' => $post]);
     $node_counter = statistics_get($this->node->id());
-    $this->assertIdentical($node_counter['totalcount'], '1');
+    $this->assertSame($node_counter['totalcount'], '1');
 
     // Try fetching statistics for an invalid node ID and verify it returns
     // FALSE.
@@ -136,7 +136,7 @@ public function testLogging() {
     // This is a test specifically for the deprecated statistics_get() function
     // and so should remain unconverted until that function is removed.
     $result = statistics_get($node_id);
-    $this->assertIdentical($result, FALSE);
+    $this->assertSame($result, FALSE);
   }
 
 }
diff --git a/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php b/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php
index 36e270d8f6..6fe267742d 100644
--- a/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php
+++ b/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php
@@ -32,7 +32,7 @@ protected function setUp() {
    */
   public function testStatisticsSettings() {
     $config = $this->config('statistics.settings');
-    $this->assertIdentical(1, $config->get('count_content_views'));
+    $this->assertSame(1, $config->get('count_content_views'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'statistics.settings', $config->get());
   }
 
diff --git a/core/modules/syslog/tests/src/Functional/Update/SyslogUpdateTest.php b/core/modules/syslog/tests/src/Functional/Update/SyslogUpdateTest.php
index e5dfed687b..531a13323e 100644
--- a/core/modules/syslog/tests/src/Functional/Update/SyslogUpdateTest.php
+++ b/core/modules/syslog/tests/src/Functional/Update/SyslogUpdateTest.php
@@ -27,13 +27,13 @@ protected function setDatabaseDumpFiles() {
    */
   public function testSyslogSettingsFacilityDataType() {
     $config = $this->config('syslog.settings');
-    $this->assertIdentical('128', $config->get('facility'));
+    $this->assertSame('128', $config->get('facility'));
 
     // Run updates.
     $this->runUpdates();
 
     $config = $this->config('syslog.settings');
-    $this->assertIdentical(128, $config->get('facility'));
+    $this->assertSame(128, $config->get('facility'));
   }
 
 }
diff --git a/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php b/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
index 935af8d8aa..7ed3c52147 100644
--- a/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
+++ b/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
@@ -32,8 +32,8 @@ protected function setUp() {
    */
   public function testSyslogSettings() {
     $config = $this->config('syslog.settings');
-    $this->assertIdentical('drupal', $config->get('identity'));
-    $this->assertIdentical(128, $config->get('facility'));
+    $this->assertSame('drupal', $config->get('identity'));
+    $this->assertSame(128, $config->get('facility'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'syslog.settings', $config->get());
   }
 
diff --git a/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php b/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
index ef5d8c305d..8e2e29c588 100644
--- a/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
+++ b/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
@@ -36,9 +36,9 @@ protected function setUp() {
   public function testSyslogSettings() {
     $config = $this->config('syslog.settings');
     // 8 == LOG_USER
-    $this->assertIdentical(8, $config->get('facility'));
-    $this->assertIdentical('!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message', $config->get('format'));
-    $this->assertIdentical('drupal', $config->get('identity'));
+    $this->assertSame(8, $config->get('facility'));
+    $this->assertSame('!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message', $config->get('format'));
+    $this->assertSame('drupal', $config->get('identity'));
   }
 
 }
diff --git a/core/modules/system/src/Tests/Ajax/FrameworkTest.php b/core/modules/system/src/Tests/Ajax/FrameworkTest.php
index 14bae06442..2decc6d9d4 100644
--- a/core/modules/system/src/Tests/Ajax/FrameworkTest.php
+++ b/core/modules/system/src/Tests/Ajax/FrameworkTest.php
@@ -158,7 +158,7 @@ public function testLazyLoad() {
 
     // Verify the expected setting was added, both to drupalSettings, and as
     // the first AJAX command.
-    $this->assertIdentical($new_settings[$expected['setting_name']], $expected['setting_value'], format_string('Page now has the %setting.', ['%setting' => $expected['setting_name']]));
+    $this->assertSame($new_settings[$expected['setting_name']], $expected['setting_value'], format_string('Page now has the %setting.', ['%setting' => $expected['setting_name']]));
     $expected_command = new SettingsCommand([$expected['setting_name'] => $expected['setting_value']], TRUE);
     $this->assertCommand(array_slice($commands, 0, 1), $expected_command->render(), 'The settings command was first.');
 
diff --git a/core/modules/system/src/Tests/Cache/AssertPageCacheContextsAndTagsTrait.php b/core/modules/system/src/Tests/Cache/AssertPageCacheContextsAndTagsTrait.php
index b115a61ee2..b66017415e 100644
--- a/core/modules/system/src/Tests/Cache/AssertPageCacheContextsAndTagsTrait.php
+++ b/core/modules/system/src/Tests/Cache/AssertPageCacheContextsAndTagsTrait.php
@@ -138,7 +138,7 @@ protected function assertCacheTags(array $expected_tags, $include_default_tags =
     $expected_tags = array_unique($expected_tags);
     sort($expected_tags);
     sort($actual_tags);
-    $this->assertIdentical($actual_tags, $expected_tags);
+    $this->assertSame($actual_tags, $expected_tags);
     $this->debugCacheTags($actual_tags, $expected_tags);
   }
 
@@ -175,7 +175,7 @@ protected function assertCacheContexts(array $expected_contexts, $message = NULL
       debug('Missing cache contexts in response: ' . implode(',', array_diff($expected_contexts, $actual_contexts)));
     }
 
-    $this->assertIdentical($actual_contexts, $expected_contexts, $message);
+    $this->assertSame($actual_contexts, $expected_contexts, $message);
 
     // For compatibility with both BrowserTestBase and WebTestBase always return
     // a boolean.
diff --git a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
index 01fef63283..e43b6d8378 100644
--- a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
@@ -133,22 +133,22 @@ protected function tearDown() {
   public function testSetGet() {
     $backend = $this->getCacheBackend();
 
-    $this->assertIdentical(FALSE, $backend->get('test1'), "Backend does not contain data for cache id test1.");
+    $this->assertSame(FALSE, $backend->get('test1'), "Backend does not contain data for cache id test1.");
     $with_backslash = ['foo' => '\Drupal\foo\Bar'];
     $backend->set('test1', $with_backslash);
     $cached = $backend->get('test1');
     $this->assert(is_object($cached), "Backend returned an object for cache id test1.");
-    $this->assertIdentical($with_backslash, $cached->data);
+    $this->assertSame($with_backslash, $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
     // We need to round because microtime may be rounded up in the backend.
     $this->assertTrue($cached->created >= REQUEST_TIME && $cached->created <= round(microtime(TRUE), 3), 'Created time is correct.');
     $this->assertEqual($cached->expire, Cache::PERMANENT, 'Expire time is correct.');
 
-    $this->assertIdentical(FALSE, $backend->get('test2'), "Backend does not contain data for cache id test2.");
+    $this->assertSame(FALSE, $backend->get('test2'), "Backend does not contain data for cache id test2.");
     $backend->set('test2', ['value' => 3], REQUEST_TIME + 3);
     $cached = $backend->get('test2');
     $this->assert(is_object($cached), "Backend returned an object for cache id test2.");
-    $this->assertIdentical(['value' => 3], $cached->data);
+    $this->assertSame(['value' => 3], $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
     $this->assertTrue($cached->created >= REQUEST_TIME && $cached->created <= round(microtime(TRUE), 3), 'Created time is correct.');
     $this->assertEqual($cached->expire, REQUEST_TIME + 3, 'Expire time is correct.');
@@ -161,22 +161,22 @@ public function testSetGet() {
     $this->assertTrue($cached->created >= REQUEST_TIME && $cached->created <= round(microtime(TRUE), 3), 'Created time is correct.');
     $this->assertEqual($cached->expire, REQUEST_TIME - 3, 'Expire time is correct.');
 
-    $this->assertIdentical(FALSE, $backend->get('test4'), "Backend does not contain data for cache id test4.");
+    $this->assertSame(FALSE, $backend->get('test4'), "Backend does not contain data for cache id test4.");
     $with_eof = ['foo' => "\nEOF\ndata"];
     $backend->set('test4', $with_eof);
     $cached = $backend->get('test4');
     $this->assert(is_object($cached), "Backend returned an object for cache id test4.");
-    $this->assertIdentical($with_eof, $cached->data);
+    $this->assertSame($with_eof, $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
     $this->assertTrue($cached->created >= REQUEST_TIME && $cached->created <= round(microtime(TRUE), 3), 'Created time is correct.');
     $this->assertEqual($cached->expire, Cache::PERMANENT, 'Expire time is correct.');
 
-    $this->assertIdentical(FALSE, $backend->get('test5'), "Backend does not contain data for cache id test5.");
+    $this->assertSame(FALSE, $backend->get('test5'), "Backend does not contain data for cache id test5.");
     $with_eof_and_semicolon = ['foo' => "\nEOF;\ndata"];
     $backend->set('test5', $with_eof_and_semicolon);
     $cached = $backend->get('test5');
     $this->assert(is_object($cached), "Backend returned an object for cache id test5.");
-    $this->assertIdentical($with_eof_and_semicolon, $cached->data);
+    $this->assertSame($with_eof_and_semicolon, $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
     $this->assertTrue($cached->created >= REQUEST_TIME && $cached->created <= round(microtime(TRUE), 3), 'Created time is correct.');
     $this->assertEqual($cached->expire, Cache::PERMANENT, 'Expire time is correct.');
@@ -185,7 +185,7 @@ public function testSetGet() {
     $backend->set('test6', $with_variable);
     $cached = $backend->get('test6');
     $this->assert(is_object($cached), "Backend returned an object for cache id test6.");
-    $this->assertIdentical($with_variable, $cached->data);
+    $this->assertSame($with_variable, $cached->data);
 
     // Make sure that a cached object is not affected by changing the original.
     $data = new \stdClass();
@@ -232,26 +232,26 @@ public function testSetGet() {
   public function testDelete() {
     $backend = $this->getCacheBackend();
 
-    $this->assertIdentical(FALSE, $backend->get('test1'), "Backend does not contain data for cache id test1.");
+    $this->assertSame(FALSE, $backend->get('test1'), "Backend does not contain data for cache id test1.");
     $backend->set('test1', 7);
     $this->assert(is_object($backend->get('test1')), "Backend returned an object for cache id test1.");
 
-    $this->assertIdentical(FALSE, $backend->get('test2'), "Backend does not contain data for cache id test2.");
+    $this->assertSame(FALSE, $backend->get('test2'), "Backend does not contain data for cache id test2.");
     $backend->set('test2', 3);
     $this->assert(is_object($backend->get('test2')), "Backend returned an object for cache id %cid.");
 
     $backend->delete('test1');
-    $this->assertIdentical(FALSE, $backend->get('test1'), "Backend does not contain data for cache id test1 after deletion.");
+    $this->assertSame(FALSE, $backend->get('test1'), "Backend does not contain data for cache id test1 after deletion.");
 
     $this->assert(is_object($backend->get('test2')), "Backend still has an object for cache id test2.");
 
     $backend->delete('test2');
-    $this->assertIdentical(FALSE, $backend->get('test2'), "Backend does not contain data for cache id test2 after deletion.");
+    $this->assertSame(FALSE, $backend->get('test2'), "Backend does not contain data for cache id test2 after deletion.");
 
     $long_cid = str_repeat('a', 300);
     $backend->set($long_cid, 'test');
     $backend->delete($long_cid);
-    $this->assertIdentical(FALSE, $backend->get($long_cid), "Backend does not contain data for long cache id after deletion.");
+    $this->assertSame(FALSE, $backend->get($long_cid), "Backend does not contain data for long cache id after deletion.");
   }
 
   /**
@@ -278,7 +278,7 @@ public function testValueTypeIsKept() {
     foreach ($variables as $cid => $value) {
       $object = $backend->get($cid);
       $this->assert(is_object($object), sprintf("Backend returned an object for cache id %s.", $cid));
-      $this->assertIdentical($value, $object->data, sprintf("Data of cached id %s kept is identical in type and value", $cid));
+      $this->assertSame($value, $object->data, sprintf("Data of cached id %s kept is identical in type and value", $cid));
     }
   }
 
@@ -324,10 +324,10 @@ public function testGetMultiple() {
     $this->assertFalse(isset($ret['test19']), "Nonexistent cache id test19 is not set.");
     $this->assertFalse(isset($ret['test21']), "Nonexistent cache id test21 is not set.");
     // Test values.
-    $this->assertIdentical($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
-    $this->assertIdentical($ret['test3']->data, 5, "Existing cache id test3 has the correct value.");
-    $this->assertIdentical($ret['test6']->data, 13, "Existing cache id test6 has the correct value.");
-    $this->assertIdentical($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
+    $this->assertSame($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
+    $this->assertSame($ret['test3']->data, 5, "Existing cache id test3 has the correct value.");
+    $this->assertSame($ret['test6']->data, 13, "Existing cache id test6 has the correct value.");
+    $this->assertSame($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
     // Test $cids array - ensure it contains cache id's that do not exist.
     $this->assert(in_array('test19', $cids), "Nonexistent cache id test19 is in cids array.");
     $this->assert(in_array('test21', $cids), "Nonexistent cache id test21 is in cids array.");
@@ -354,9 +354,9 @@ public function testGetMultiple() {
     $this->assertFalse(isset($ret['test6']), "Deleted cache id test6 is not set");
     $this->assertFalse(isset($ret['test21']), "Nonexistent cache id test21 is not set");
     // Test values.
-    $this->assertIdentical($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
-    $this->assertIdentical($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
-    $this->assertIdentical($ret['test19']->data, 57, "Added cache id test19 has the correct value.");
+    $this->assertSame($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
+    $this->assertSame($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
+    $this->assertSame($ret['test19']->data, 57, "Added cache id test19 has the correct value.");
     // Test $cids array - ensure it contains cache id's that do not exist.
     $this->assert(in_array('test3', $cids), "Deleted cache id test3 is in cids array.");
     $this->assert(in_array('test6', $cids), "Deleted cache id test6 is in cids array.");
@@ -453,10 +453,10 @@ public function testDeleteMultiple() {
     ]);
 
     // Test if expected keys have been deleted.
-    $this->assertIdentical(FALSE, $backend->get('test1'), "Cache id test1 deleted.");
-    $this->assertIdentical(FALSE, $backend->get('test3'), "Cache id test3 deleted.");
-    $this->assertIdentical(FALSE, $backend->get('test5'), "Cache id test5 deleted.");
-    $this->assertIdentical(FALSE, $backend->get('test7'), "Cache id test7 deleted.");
+    $this->assertSame(FALSE, $backend->get('test1'), "Cache id test1 deleted.");
+    $this->assertSame(FALSE, $backend->get('test3'), "Cache id test3 deleted.");
+    $this->assertSame(FALSE, $backend->get('test5'), "Cache id test5 deleted.");
+    $this->assertSame(FALSE, $backend->get('test7'), "Cache id test7 deleted.");
 
     // Test if expected keys exist.
     $this->assertNotIdentical(FALSE, $backend->get('test2'), "Cache id test2 exists.");
@@ -464,8 +464,8 @@ public function testDeleteMultiple() {
     $this->assertNotIdentical(FALSE, $backend->get('test6'), "Cache id test6 exists.");
 
     // Test if that expected keys do not exist.
-    $this->assertIdentical(FALSE, $backend->get('test19'), "Cache id test19 does not exist.");
-    $this->assertIdentical(FALSE, $backend->get('test21'), "Cache id test21 does not exist.");
+    $this->assertSame(FALSE, $backend->get('test19'), "Cache id test19 does not exist.");
+    $this->assertSame(FALSE, $backend->get('test21'), "Cache id test21 does not exist.");
 
     // Calling deleteMultiple() with an empty array should not cause an error.
     $this->assertFalse($backend->deleteMultiple([]));
diff --git a/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php b/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php
index 1e29e56278..bca1be2b30 100644
--- a/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php
+++ b/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php
@@ -58,7 +58,7 @@ protected function verifyPageCache(Url $url, $hit_or_miss, $tags = FALSE) {
       sort($cache_entry->tags);
       $tags = array_unique($tags);
       sort($tags);
-      $this->assertIdentical($cache_entry->tags, $tags);
+      $this->assertSame($cache_entry->tags, $tags);
     }
   }
 
diff --git a/core/modules/system/src/Tests/Common/FormatDateTest.php b/core/modules/system/src/Tests/Common/FormatDateTest.php
index c174e3432b..8035c4348b 100644
--- a/core/modules/system/src/Tests/Common/FormatDateTest.php
+++ b/core/modules/system/src/Tests/Common/FormatDateTest.php
@@ -72,9 +72,9 @@ public function testAdminDefinedFormatDate() {
     $this->assertText(t('Custom date format added.'));
 
     $timestamp = strtotime('2007-03-10T00:00:00+00:00');
-    $this->assertIdentical(format_date($timestamp, 'example_style', '', 'America/Los_Angeles'), '9 Mar 07');
-    $this->assertIdentical(format_date($timestamp, 'example_style_uppercase', '', 'America/Los_Angeles'), '9 Mar 2007');
-    $this->assertIdentical(format_date($timestamp, 'undefined_style'), format_date($timestamp, 'fallback'), 'Test format_date() defaulting to `fallback` when $type not found.');
+    $this->assertSame(format_date($timestamp, 'example_style', '', 'America/Los_Angeles'), '9 Mar 07');
+    $this->assertSame(format_date($timestamp, 'example_style_uppercase', '', 'America/Los_Angeles'), '9 Mar 2007');
+    $this->assertSame(format_date($timestamp, 'undefined_style'), format_date($timestamp, 'fallback'), 'Test format_date() defaulting to `fallback` when $type not found.');
   }
 
 }
diff --git a/core/modules/system/src/Tests/Common/RenderWebTest.php b/core/modules/system/src/Tests/Common/RenderWebTest.php
index ed0e086402..f1d50d86bf 100644
--- a/core/modules/system/src/Tests/Common/RenderWebTest.php
+++ b/core/modules/system/src/Tests/Common/RenderWebTest.php
@@ -26,16 +26,16 @@ class RenderWebTest extends WebTestBase {
    */
   public function testWrapperFormatCacheContext() {
     $this->drupalGet('common-test/type-link-active-class');
-    $this->assertIdentical(0, strpos($this->getRawContent(), "<!DOCTYPE html>\n<html"));
-    $this->assertIdentical('text/html; charset=UTF-8', $this->drupalGetHeader('Content-Type'));
+    $this->assertSame(0, strpos($this->getRawContent(), "<!DOCTYPE html>\n<html"));
+    $this->assertSame('text/html; charset=UTF-8', $this->drupalGetHeader('Content-Type'));
     $this->assertTitle('Test active link class | Drupal');
     $this->assertCacheContext('url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT);
 
     $this->drupalGet('common-test/type-link-active-class', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'json']]);
-    $this->assertIdentical('application/json', $this->drupalGetHeader('Content-Type'));
+    $this->assertSame('application/json', $this->drupalGetHeader('Content-Type'));
     $json = Json::decode($this->getRawContent());
     $this->assertEqual(['content', 'title'], array_keys($json));
-    $this->assertIdentical('Test active link class', $json['title']);
+    $this->assertSame('Test active link class', $json['title']);
     $this->assertCacheContext('url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT);
   }
 
diff --git a/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php b/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php
index 7f5c5e340f..77fd8bef25 100644
--- a/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php
+++ b/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php
@@ -691,7 +691,7 @@ protected function verifyRenderCache($cid, array $tags, $redirected_cid = NULL)
     $this->assertTrue($cache_entry, 'A render cache entry exists.');
     sort($cache_entry->tags);
     sort($tags);
-    $this->assertIdentical($cache_entry->tags, $tags);
+    $this->assertSame($cache_entry->tags, $tags);
     $is_redirecting_cache_item = isset($cache_entry->data['#cache_redirect']);
     if ($redirected_cid === NULL) {
       $this->assertFalse($is_redirecting_cache_item, 'Render cache entry is not a redirect.');
@@ -713,7 +713,7 @@ protected function verifyRenderCache($cid, array $tags, $redirected_cid = NULL)
         $redirect_cache_metadata['keys'],
         $redirect_cache_metadata['contexts']
       );
-      $this->assertIdentical($redirected_cid, $actual_redirection_cid);
+      $this->assertSame($redirected_cid, $actual_redirection_cid);
       // Finally, verify that the redirected CID exists and has the same cache
       // tags.
       $this->verifyRenderCache($redirected_cid, $tags);
diff --git a/core/modules/system/src/Tests/Module/DependencyTest.php b/core/modules/system/src/Tests/Module/DependencyTest.php
index c68e9fab71..faae227615 100644
--- a/core/modules/system/src/Tests/Module/DependencyTest.php
+++ b/core/modules/system/src/Tests/Module/DependencyTest.php
@@ -157,7 +157,7 @@ public function testModuleEnableOrder() {
 
     // Check the actual order which is saved by module_test_modules_enabled().
     $module_order = \Drupal::state()->get('module_test.install_order') ?: [];
-    $this->assertIdentical($module_order, $expected_order);
+    $this->assertSame($module_order, $expected_order);
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Routing/DestinationTest.php b/core/modules/system/src/Tests/Routing/DestinationTest.php
index d959c7ad4a..b979a76366 100644
--- a/core/modules/system/src/Tests/Routing/DestinationTest.php
+++ b/core/modules/system/src/Tests/Routing/DestinationTest.php
@@ -61,10 +61,10 @@ public function testDestination() {
     foreach ($test_cases as $test_case) {
       // Test $_GET['destination'].
       $this->drupalGet('system-test/get-destination', ['query' => ['destination' => $test_case['input']]]);
-      $this->assertIdentical($test_case['output'], $this->getRawContent(), $test_case['message']);
+      $this->assertSame($test_case['output'], $this->getRawContent(), $test_case['message']);
       // Test $_REQUEST['destination'].
       $post_output = $this->drupalPost('system-test/request-destination', '*', ['destination' => $test_case['input']]);
-      $this->assertIdentical($test_case['output'], $post_output, $test_case['message']);
+      $this->assertSame($test_case['output'], $post_output, $test_case['message']);
     }
 
     // Make sure that 404 pages do not populate $_GET['destination'] with
@@ -72,7 +72,7 @@ public function testDestination() {
     \Drupal::configFactory()->getEditable('system.site')->set('page.404', '/system-test/get-destination')->save();
     $this->drupalGet('http://example.com', ['external' => FALSE]);
     $this->assertResponse(404);
-    $this->assertIdentical(Url::fromRoute('<front>')->toString(), $this->getRawContent(), 'External URL is not allowed on 404 pages.');
+    $this->assertSame(Url::fromRoute('<front>')->toString(), $this->getRawContent(), 'External URL is not allowed on 404 pages.');
   }
 
 }
diff --git a/core/modules/system/src/Tests/Routing/RouterTest.php b/core/modules/system/src/Tests/Routing/RouterTest.php
index 38d7ecbe04..7db0682586 100644
--- a/core/modules/system/src/Tests/Routing/RouterTest.php
+++ b/core/modules/system/src/Tests/Routing/RouterTest.php
@@ -219,7 +219,7 @@ public function testUrlGeneratorFront() {
     $front_url = Url::fromRoute('<front>', [], ['absolute' => TRUE]);
     // Compare to the site base URL.
     $base_url = Url::fromUri('base:/', ['absolute' => TRUE]);
-    $this->assertIdentical($base_url->toString(), $front_url->toString());
+    $this->assertSame($base_url->toString(), $front_url->toString());
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Session/SessionHttpsTest.php b/core/modules/system/src/Tests/Session/SessionHttpsTest.php
index 6ba70da52b..88be14f1d7 100644
--- a/core/modules/system/src/Tests/Session/SessionHttpsTest.php
+++ b/core/modules/system/src/Tests/Session/SessionHttpsTest.php
@@ -198,7 +198,7 @@ protected function getPathFromLocationHeader($https = FALSE, $response_code = 30
     $this->assertResponse($response_code);
     $location = $this->drupalGetHeader('location');
 
-    $this->assertIdentical(strpos($location, $base_url), 0, 'Location header contains expected base URL');
+    $this->assertSame(strpos($location, $base_url), 0, 'Location header contains expected base URL');
     return substr($location, strlen($base_url));
   }
 
diff --git a/core/modules/system/src/Tests/Session/SessionTest.php b/core/modules/system/src/Tests/Session/SessionTest.php
index 1be9561b36..36df176a1a 100644
--- a/core/modules/system/src/Tests/Session/SessionTest.php
+++ b/core/modules/system/src/Tests/Session/SessionTest.php
@@ -315,10 +315,10 @@ public function assertSessionCookie($sent) {
    */
   public function assertSessionEmpty($empty) {
     if ($empty) {
-      $this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '1', 'Session was empty.');
+      $this->assertSame($this->drupalGetHeader('X-Session-Empty'), '1', 'Session was empty.');
     }
     else {
-      $this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '0', 'Session was not empty.');
+      $this->assertSame($this->drupalGetHeader('X-Session-Empty'), '0', 'Session was not empty.');
     }
   }
 
diff --git a/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
index dc661fec91..79f4d8f5f1 100644
--- a/core/modules/system/src/Tests/System/ErrorHandlerTest.php
+++ b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
@@ -171,7 +171,7 @@ public function testExceptionHandler() {
 
     $this->drupalGet('error-test/trigger-exception');
     $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'));
-    $this->assertIdentical(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'Received expected HTTP status line.');
+    $this->assertSame(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'Received expected HTTP status line.');
     $this->assertTrue(strpos($this->drupalGetHeader(':status'), '500 Service unavailable (with message)'), 'Received expected HTTP status line.');
     $this->assertNoErrorMessage($error_exception);
 
diff --git a/core/modules/system/src/Tests/System/UncaughtExceptionTest.php b/core/modules/system/src/Tests/System/UncaughtExceptionTest.php
index b66837e1c7..70486cd97b 100644
--- a/core/modules/system/src/Tests/System/UncaughtExceptionTest.php
+++ b/core/modules/system/src/Tests/System/UncaughtExceptionTest.php
@@ -258,7 +258,7 @@ public function testLoggerException() {
 
     // Find fatal error logged to the simpletest error.log
     $errors = file(\Drupal::root() . '/' . $this->siteDirectory . '/error.log');
-    $this->assertIdentical(count($errors), 8, 'The error + the error that the logging service is broken has been written to the error log.');
+    $this->assertSame(count($errors), 8, 'The error + the error that the logging service is broken has been written to the error log.');
     $this->assertTrue(strpos($errors[0], 'Failed to log error') !== FALSE, 'The error handling logs when an error could not be logged to the logger.');
 
     $expected_path = \Drupal::root() . '/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php';
diff --git a/core/modules/system/src/Tests/Theme/FunctionsTest.php b/core/modules/system/src/Tests/Theme/FunctionsTest.php
index 825834859a..377e5ac390 100644
--- a/core/modules/system/src/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php
@@ -474,8 +474,8 @@ public function testDrupalPreRenderLinks() {
     $this->assertEqual($list_elements->item(0)->nodeValue, 'Parent link original', 'First expected link found.');
     $this->assertEqual($list_elements->item(1)->nodeValue, 'First child link', 'Second expected link found.');
     $this->assertEqual($list_elements->item(2)->nodeValue, 'Second child link', 'Third expected link found.');
-    $this->assertIdentical(strpos($html, 'Parent link copy'), FALSE, '"Parent link copy" link not found.');
-    $this->assertIdentical(strpos($html, 'Third child link'), FALSE, '"Third child link" link not found.');
+    $this->assertSame(strpos($html, 'Parent link copy'), FALSE, '"Parent link copy" link not found.');
+    $this->assertSame(strpos($html, 'Third child link'), FALSE, '"Third child link" link not found.');
 
     // Now render 'first_child', followed by the rest of the links, and make
     // sure we get two separate <ul>'s with the appropriate links contained
@@ -499,8 +499,8 @@ public function testDrupalPreRenderLinks() {
     $this->assertEqual($list_elements->length, 2, 'Two "li" tags found in the rendered parent HTML.');
     $this->assertEqual($list_elements->item(0)->nodeValue, 'Parent link original', 'First expected link found.');
     $this->assertEqual($list_elements->item(1)->nodeValue, 'Second child link', 'Second expected link found.');
-    $this->assertIdentical(strpos($parent_html, 'First child link'), FALSE, '"First child link" link not found.');
-    $this->assertIdentical(strpos($parent_html, 'Third child link'), FALSE, '"Third child link" link not found.');
+    $this->assertSame(strpos($parent_html, 'First child link'), FALSE, '"First child link" link not found.');
+    $this->assertSame(strpos($parent_html, 'Third child link'), FALSE, '"Third child link" link not found.');
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php
index 64f330e942..6c4c002300 100644
--- a/core/modules/system/src/Tests/Theme/ThemeTest.php
+++ b/core/modules/system/src/Tests/Theme/ThemeTest.php
@@ -63,17 +63,17 @@ public function testThemeDataTypes() {
       $output = \Drupal::theme()->render('theme_test_foo', ['foo' => $example]);
       $this->assertTrue($output instanceof MarkupInterface || is_string($output), format_string('\Drupal::theme() returns an object that implements MarkupInterface or a string for data type @type.', ['@type' => $type]));
       if ($output instanceof MarkupInterface) {
-        $this->assertIdentical((string) $example, $output->__toString());
+        $this->assertSame((string) $example, $output->__toString());
       }
       elseif (is_string($output)) {
-        $this->assertIdentical($output, '', 'A string will be return when the theme returns an empty string.');
+        $this->assertSame($output, '', 'A string will be return when the theme returns an empty string.');
       }
     }
 
     // suggestionnotimplemented is not an implemented theme hook so \Drupal::theme() service
     // should return FALSE instead of a string.
     $output = \Drupal::theme()->render(['suggestionnotimplemented'], []);
-    $this->assertIdentical($output, FALSE, '\Drupal::theme() returns FALSE when a hook suggestion is not implemented.');
+    $this->assertSame($output, FALSE, '\Drupal::theme() returns FALSE when a hook suggestion is not implemented.');
   }
 
   /**
@@ -211,20 +211,20 @@ public function testListThemes() {
     $themes = $theme_handler->listInfo();
 
     // Check if ThemeHandlerInterface::listInfo() retrieves enabled themes.
-    $this->assertIdentical(1, $themes['test_theme']->status, 'Installed theme detected');
+    $this->assertSame(1, $themes['test_theme']->status, 'Installed theme detected');
 
     // Check if ThemeHandlerInterface::listInfo() returns disabled themes.
     // Check for base theme and subtheme lists.
     $base_theme_list = ['test_basetheme' => 'Theme test base theme'];
     $sub_theme_list = ['test_subsubtheme' => 'Theme test subsubtheme', 'test_subtheme' => 'Theme test subtheme'];
 
-    $this->assertIdentical($themes['test_basetheme']->sub_themes, $sub_theme_list, 'Base theme\'s object includes list of subthemes.');
-    $this->assertIdentical($themes['test_subtheme']->base_themes, $base_theme_list, 'Subtheme\'s object includes list of base themes.');
+    $this->assertSame($themes['test_basetheme']->sub_themes, $sub_theme_list, 'Base theme\'s object includes list of subthemes.');
+    $this->assertSame($themes['test_subtheme']->base_themes, $base_theme_list, 'Subtheme\'s object includes list of base themes.');
     // Check for theme engine in subtheme.
-    $this->assertIdentical($themes['test_subtheme']->engine, 'twig', 'Subtheme\'s object includes the theme engine.');
+    $this->assertSame($themes['test_subtheme']->engine, 'twig', 'Subtheme\'s object includes the theme engine.');
     // Check for theme engine prefix.
-    $this->assertIdentical($themes['test_basetheme']->prefix, 'twig', 'Base theme\'s object includes the theme engine prefix.');
-    $this->assertIdentical($themes['test_subtheme']->prefix, 'twig', 'Subtheme\'s object includes the theme engine prefix.');
+    $this->assertSame($themes['test_basetheme']->prefix, 'twig', 'Base theme\'s object includes the theme engine prefix.');
+    $this->assertSame($themes['test_subtheme']->prefix, 'twig', 'Subtheme\'s object includes the theme engine prefix.');
   }
 
   /**
diff --git a/core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php b/core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php
index e0450d1660..38c37d2153 100644
--- a/core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php
+++ b/core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php
@@ -132,7 +132,7 @@ protected function assertCacheTags(array $expected_tags, $include_default_tags =
     $expected_tags = array_unique($expected_tags);
     sort($expected_tags);
     sort($actual_tags);
-    $this->assertIdentical($actual_tags, $expected_tags);
+    $this->assertSame($actual_tags, $expected_tags);
     $this->debugCacheTags($actual_tags, $expected_tags);
   }
 
@@ -169,7 +169,7 @@ protected function assertCacheContexts(array $expected_contexts, $message = NULL
       debug('Missing cache contexts in response: ' . implode(',', array_diff($expected_contexts, $actual_contexts)));
     }
 
-    $this->assertIdentical($actual_contexts, $expected_contexts, $message);
+    $this->assertSame($actual_contexts, $expected_contexts, $message);
 
     // For compatibility with both BrowserTestBase and WebTestBase always return
     // a boolean.
diff --git a/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php
index 69afeb745d..7efc3a96f2 100644
--- a/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php
+++ b/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php
@@ -55,7 +55,7 @@ protected function verifyPageCache(Url $url, $hit_or_miss, $tags = FALSE) {
       sort($cache_entry->tags);
       $tags = array_unique($tags);
       sort($tags);
-      $this->assertIdentical($cache_entry->tags, $tags);
+      $this->assertSame($cache_entry->tags, $tags);
     }
   }
 
diff --git a/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php b/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php
index 6c5a9d64c5..b58497e303 100644
--- a/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php
@@ -94,19 +94,19 @@ protected function doFilterFormatUpdate() {
     $plugin_collection = $entity->getPluginCollections()['filters'];
 
     $filters = $entity->get('filters');
-    $this->assertIdentical(72, $filters['filter_url']['settings']['filter_url_length']);
+    $this->assertSame(72, $filters['filter_url']['settings']['filter_url_length']);
 
     $filters['filter_url']['settings']['filter_url_length'] = 100;
     $entity->set('filters', $filters);
     $entity->save();
-    $this->assertIdentical($filters, $entity->get('filters'));
-    $this->assertIdentical($filters, $plugin_collection->getConfiguration());
+    $this->assertSame($filters, $entity->get('filters'));
+    $this->assertSame($filters, $plugin_collection->getConfiguration());
 
     $filters['filter_url']['settings']['filter_url_length'] = -100;
     $entity->getPluginCollections()['filters']->setConfiguration($filters);
     $entity->save();
-    $this->assertIdentical($filters, $entity->get('filters'));
-    $this->assertIdentical($filters, $plugin_collection->getConfiguration());
+    $this->assertSame($filters, $entity->get('filters'));
+    $this->assertSame($filters, $plugin_collection->getConfiguration());
 
     // Read the existing data, and prepare an altered version in sync.
     $custom_data = $original_data = $this->container->get('config.storage')->read($name);
@@ -127,21 +127,21 @@ protected function doImageStyleUpdate() {
 
     $effects = $entity->get('effects');
     $effect_id = key($effects);
-    $this->assertIdentical(100, $effects[$effect_id]['data']['height']);
+    $this->assertSame(100, $effects[$effect_id]['data']['height']);
 
     $effects[$effect_id]['data']['height'] = 50;
     $entity->set('effects', $effects);
     $entity->save();
     // Ensure the entity and plugin have the correct configuration.
-    $this->assertIdentical($effects, $entity->get('effects'));
-    $this->assertIdentical($effects, $plugin_collection->getConfiguration());
+    $this->assertSame($effects, $entity->get('effects'));
+    $this->assertSame($effects, $plugin_collection->getConfiguration());
 
     $effects[$effect_id]['data']['height'] = -50;
     $entity->getPluginCollections()['effects']->setConfiguration($effects);
     $entity->save();
     // Ensure the entity and plugin have the correct configuration.
-    $this->assertIdentical($effects, $entity->get('effects'));
-    $this->assertIdentical($effects, $plugin_collection->getConfiguration());
+    $this->assertSame($effects, $entity->get('effects'));
+    $this->assertSame($effects, $plugin_collection->getConfiguration());
 
     // Read the existing data, and prepare an altered version in sync.
     $custom_data = $original_data = $this->container->get('config.storage')->read($name);
@@ -188,21 +188,21 @@ protected function checkSinglePluginConfigSync(EntityWithPluginCollectionInterfa
     $settings = $entity->get($config_key);
 
     // Ensure the default config exists.
-    $this->assertIdentical($expected, $settings[$setting_key]);
+    $this->assertSame($expected, $settings[$setting_key]);
 
     // Change the plugin config by setting it on the entity.
     $settings[$setting_key] = $this->randomString();
     $entity->set($config_key, $settings);
     $entity->save();
-    $this->assertIdentical($settings, $entity->get($config_key));
-    $this->assertIdentical($settings, $plugin_collection->getConfiguration());
+    $this->assertSame($settings, $entity->get($config_key));
+    $this->assertSame($settings, $plugin_collection->getConfiguration());
 
     // Change the plugin config by setting it on the plugin.
     $settings[$setting_key] = $this->randomString();
     $plugin_collection->setConfiguration($settings);
     $entity->save();
-    $this->assertIdentical($settings, $entity->get($config_key));
-    $this->assertIdentical($settings, $plugin_collection->getConfiguration());
+    $this->assertSame($settings, $entity->get($config_key));
+    $this->assertSame($settings, $plugin_collection->getConfiguration());
   }
 
   /**
@@ -220,7 +220,7 @@ public function assertConfigUpdateImport($name, $original_data, $custom_data) {
 
     // Verify the active configuration still returns the default values.
     $config = $this->config($name);
-    $this->assertIdentical($config->get(), $original_data);
+    $this->assertSame($config->get(), $original_data);
 
     // Import.
     $this->configImporter()->import();
@@ -228,7 +228,7 @@ public function assertConfigUpdateImport($name, $original_data, $custom_data) {
     // Verify the values were updated.
     $this->container->get('config.factory')->reset($name);
     $config = $this->config($name);
-    $this->assertIdentical($config->get(), $custom_data);
+    $this->assertSame($config->get(), $custom_data);
   }
 
 }
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
index 1476dfafec..46d4c180c5 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
@@ -688,7 +688,7 @@ protected function verifyRenderCache($cid, array $tags, $redirected_cid = NULL)
     $this->assertTrue($cache_entry, 'A render cache entry exists.');
     sort($cache_entry->tags);
     sort($tags);
-    $this->assertIdentical($cache_entry->tags, $tags);
+    $this->assertSame($cache_entry->tags, $tags);
     $is_redirecting_cache_item = isset($cache_entry->data['#cache_redirect']);
     if ($redirected_cid === NULL) {
       $this->assertFalse($is_redirecting_cache_item, 'Render cache entry is not a redirect.');
@@ -710,7 +710,7 @@ protected function verifyRenderCache($cid, array $tags, $redirected_cid = NULL)
         $redirect_cache_metadata['keys'],
         $redirect_cache_metadata['contexts']
       );
-      $this->assertIdentical($redirected_cid, $actual_redirection_cid);
+      $this->assertSame($redirected_cid, $actual_redirection_cid);
       // Finally, verify that the redirected CID exists and has the same cache
       // tags.
       $this->verifyRenderCache($redirected_cid, $tags);
diff --git a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
index 60fad6a2e8..b76eca0307 100644
--- a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
+++ b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
@@ -49,7 +49,7 @@ public function testFormCheckbox() {
         }
         $checked_in_html = strpos($form, 'checked') !== FALSE;
         $message = format_string('#default_value is %default_value #return_value is %return_value.', ['%default_value' => var_export($default_value, TRUE), '%return_value' => var_export($return_value, TRUE)]);
-        $this->assertIdentical($checked, $checked_in_html, $message);
+        $this->assertSame($checked, $checked_in_html, $message);
       }
     }
 
@@ -57,9 +57,9 @@ public function testFormCheckbox() {
     // checkboxes group that includes a 0-indexed array of options.
     $this->drupalPostForm('form-test/checkboxes-zero/1', [], 'Save');
     $results = json_decode($this->getSession()->getPage()->getContent());
-    $this->assertIdentical($results->checkbox_off, [0, 0, 0], 'All three in checkbox_off are zeroes: off.');
-    $this->assertIdentical($results->checkbox_zero_default, ['0', 0, 0], 'The first choice is on in checkbox_zero_default');
-    $this->assertIdentical($results->checkbox_string_zero_default, ['0', 0, 0], 'The first choice is on in checkbox_string_zero_default');
+    $this->assertSame($results->checkbox_off, [0, 0, 0], 'All three in checkbox_off are zeroes: off.');
+    $this->assertSame($results->checkbox_zero_default, ['0', 0, 0], 'The first choice is on in checkbox_zero_default');
+    $this->assertSame($results->checkbox_string_zero_default, ['0', 0, 0], 'The first choice is on in checkbox_string_zero_default');
     // Due to Mink driver differences, we cannot submit an empty checkbox value
     // to drupalPostForm(), even if that empty value is the 'true' value for
     // the checkbox.
@@ -67,18 +67,18 @@ public function testFormCheckbox() {
     $this->assertSession()->fieldExists('checkbox_off[0]')->check();
     $this->drupalPostForm(NULL, NULL, 'Save');
     $results = json_decode($this->getSession()->getPage()->getContent());
-    $this->assertIdentical($results->checkbox_off, ['0', 0, 0], 'The first choice is on in checkbox_off but the rest is not');
+    $this->assertSame($results->checkbox_off, ['0', 0, 0], 'The first choice is on in checkbox_off but the rest is not');
 
     // Ensure that each checkbox is rendered correctly for a checkboxes group
     // that includes a 0-indexed array of options.
     $this->drupalPostForm('form-test/checkboxes-zero/0', [], 'Save');
     $checkboxes = $this->xpath('//input[@type="checkbox"]');
 
-    $this->assertIdentical(count($checkboxes), 9, 'Correct number of checkboxes found.');
+    $this->assertSame(count($checkboxes), 9, 'Correct number of checkboxes found.');
     foreach ($checkboxes as $checkbox) {
       $checked = $checkbox->isChecked();
       $name = $checkbox->getAttribute('name');
-      $this->assertIdentical($checked, $name == 'checkbox_zero_default[0]' || $name == 'checkbox_string_zero_default[0]', format_string('Checkbox %name correctly checked', ['%name' => $name]));
+      $this->assertSame($checked, $name == 'checkbox_zero_default[0]' || $name == 'checkbox_string_zero_default[0]', format_string('Checkbox %name correctly checked', ['%name' => $name]));
     }
     // Due to Mink driver differences, we cannot submit an empty checkbox value
     // to drupalPostForm(), even if that empty value is the 'true' value for
@@ -88,11 +88,11 @@ public function testFormCheckbox() {
     $this->drupalPostForm(NULL, NULL, 'Save');
     $checkboxes = $this->xpath('//input[@type="checkbox"]');
 
-    $this->assertIdentical(count($checkboxes), 9, 'Correct number of checkboxes found.');
+    $this->assertSame(count($checkboxes), 9, 'Correct number of checkboxes found.');
     foreach ($checkboxes as $checkbox) {
       $checked = $checkbox->isChecked();
       $name = (string) $checkbox->getAttribute('name');
-      $this->assertIdentical($checked, $name == 'checkbox_off[0]' || $name == 'checkbox_zero_default[0]' || $name == 'checkbox_string_zero_default[0]', format_string('Checkbox %name correctly checked', ['%name' => $name]));
+      $this->assertSame($checked, $name == 'checkbox_off[0]' || $name == 'checkbox_zero_default[0]' || $name == 'checkbox_string_zero_default[0]', format_string('Checkbox %name correctly checked', ['%name' => $name]));
     }
   }
 
diff --git a/core/modules/system/tests/src/Functional/Form/ElementTest.php b/core/modules/system/tests/src/Functional/Form/ElementTest.php
index 57da8daf27..7566987369 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementTest.php
@@ -53,7 +53,7 @@ public function testOptions() {
       $expected_values = ['0', 'foo', '1', 'bar', '>'];
       foreach ($elements as $element) {
         $expected = array_shift($expected_values);
-        $this->assertIdentical((string) $element->getAttribute('value'), $expected);
+        $this->assertSame((string) $element->getAttribute('value'), $expected);
       }
     }
 
@@ -73,7 +73,7 @@ public function testOptions() {
       $expected_values = ['0', 'foo', 'bar', '>', '1'];
       foreach ($elements as $element) {
         $expected = array_shift($expected_values);
-        $this->assertIdentical((string) $element->getAttribute('value'), $expected);
+        $this->assertSame((string) $element->getAttribute('value'), $expected);
       }
     }
     // Verify that custom #description properties are output.
diff --git a/core/modules/system/tests/src/Functional/Form/EmailTest.php b/core/modules/system/tests/src/Functional/Form/EmailTest.php
index 2fe6ebe907..ab6170fa7f 100644
--- a/core/modules/system/tests/src/Functional/Form/EmailTest.php
+++ b/core/modules/system/tests/src/Functional/Form/EmailTest.php
@@ -34,7 +34,7 @@ public function testFormEmail() {
     $edit['email_required'] = '  foo.bar@example.com ';
     $this->drupalPostForm('form-test/email', $edit, 'Submit');
     $values = Json::decode($this->getSession()->getPage()->getContent());
-    $this->assertIdentical($values['email'], '');
+    $this->assertSame($values['email'], '');
     $this->assertEqual($values['email_required'], 'foo.bar@example.com');
 
     $edit = [];
diff --git a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
index 34ebb2e79a..bd38822e19 100644
--- a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
@@ -48,7 +48,7 @@ public function testObjectFormCallback() {
     $this->assertText('The FormTestObject::validateForm() method was used for this form.');
     $this->assertText('The FormTestObject::submitForm() method was used for this form.');
     $value = $config_factory->get('form_test.object')->get('bananas');
-    $this->assertIdentical('green', $value);
+    $this->assertSame('green', $value);
 
     $this->drupalGet('form-test/object-arguments-builder/yellow');
     $this->assertText('The FormTestArgumentsObject::buildForm() method was used for this form.');
@@ -58,7 +58,7 @@ public function testObjectFormCallback() {
     $this->assertText('The FormTestArgumentsObject::validateForm() method was used for this form.');
     $this->assertText('The FormTestArgumentsObject::submitForm() method was used for this form.');
     $value = $config_factory->get('form_test.object')->get('bananas');
-    $this->assertIdentical('yellow', $value);
+    $this->assertSame('yellow', $value);
 
     $this->drupalGet('form-test/object-service-builder');
     $this->assertText('The FormTestServiceObject::buildForm() method was used for this form.');
@@ -68,7 +68,7 @@ public function testObjectFormCallback() {
     $this->assertText('The FormTestServiceObject::validateForm() method was used for this form.');
     $this->assertText('The FormTestServiceObject::submitForm() method was used for this form.');
     $value = $config_factory->get('form_test.object')->get('bananas');
-    $this->assertIdentical('brown', $value);
+    $this->assertSame('brown', $value);
 
     $this->drupalGet('form-test/object-controller-builder');
     $this->assertText('The FormTestControllerObject::create() method was used for this form.');
@@ -81,7 +81,7 @@ public function testObjectFormCallback() {
     $this->assertText('The FormTestControllerObject::validateForm() method was used for this form.');
     $this->assertText('The FormTestControllerObject::submitForm() method was used for this form.');
     $value = $config_factory->get('form_test.object')->get('bananas');
-    $this->assertIdentical('black', $value);
+    $this->assertSame('black', $value);
   }
 
 }
diff --git a/core/modules/system/tests/src/Functional/Form/FormTest.php b/core/modules/system/tests/src/Functional/Form/FormTest.php
index 87c7632457..b241f45fa6 100644
--- a/core/modules/system/tests/src/Functional/Form/FormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormTest.php
@@ -446,7 +446,7 @@ public function testSelect() {
       'multiple_no_default_required' => ['three' => 'three'],
     ];
     foreach ($expected as $key => $value) {
-      $this->assertIdentical($values[$key], $value, format_string('@name: @actual is equal to @expected.', [
+      $this->assertSame($values[$key], $value, format_string('@name: @actual is equal to @expected.', [
         '@name' => $key,
         '@actual' => var_export($values[$key], TRUE),
         '@expected' => var_export($value, TRUE),
@@ -660,7 +660,7 @@ public function assertFormValuesDefault($values, $form) {
           // Checkboxes values are not filtered out.
           $values[$key] = array_filter($values[$key]);
         }
-        $this->assertIdentical($expected_value, $values[$key], format_string('Default value for %type: expected %expected, returned %returned.', ['%type' => $key, '%expected' => var_export($expected_value, TRUE), '%returned' => var_export($values[$key], TRUE)]));
+        $this->assertSame($expected_value, $values[$key], format_string('Default value for %type: expected %expected, returned %returned.', ['%type' => $key, '%expected' => var_export($expected_value, TRUE), '%returned' => var_export($values[$key], TRUE)]));
       }
 
       // Recurse children.
diff --git a/core/modules/system/tests/src/Functional/Form/ResponseTest.php b/core/modules/system/tests/src/Functional/Form/ResponseTest.php
index de5d8fd6c7..f49521c7b3 100644
--- a/core/modules/system/tests/src/Functional/Form/ResponseTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ResponseTest.php
@@ -30,9 +30,9 @@ public function testFormResponse() {
     $this->drupalPostForm('form-test/response', $edit, 'Submit');
     $content = Json::decode($this->getSession()->getPage()->getContent());
     $this->assertResponse(200);
-    $this->assertIdentical($edit['content'], $content, 'Response content matches');
-    $this->assertIdentical('invoked', $this->drupalGetHeader('X-Form-Test-Response-Event'), 'Response handled by kernel response subscriber');
-    $this->assertIdentical('invoked', $this->drupalGetHeader('X-Form-Test-Stack-Middleware'), 'Response handled by kernel middleware');
+    $this->assertSame($edit['content'], $content, 'Response content matches');
+    $this->assertSame('invoked', $this->drupalGetHeader('X-Form-Test-Response-Event'), 'Response handled by kernel response subscriber');
+    $this->assertSame('invoked', $this->drupalGetHeader('X-Form-Test-Stack-Middleware'), 'Response handled by kernel middleware');
 
     $edit = [
       'content' => $this->randomString(),
@@ -41,9 +41,9 @@ public function testFormResponse() {
     $this->drupalPostForm('form-test/response', $edit, 'Submit');
     $content = Json::decode($this->getSession()->getPage()->getContent());
     $this->assertResponse(418);
-    $this->assertIdentical($edit['content'], $content, 'Response content matches');
-    $this->assertIdentical('invoked', $this->drupalGetHeader('X-Form-Test-Response-Event'), 'Response handled by kernel response subscriber');
-    $this->assertIdentical('invoked', $this->drupalGetHeader('X-Form-Test-Stack-Middleware'), 'Response handled by kernel middleware');
+    $this->assertSame($edit['content'], $content, 'Response content matches');
+    $this->assertSame('invoked', $this->drupalGetHeader('X-Form-Test-Response-Event'), 'Response handled by kernel response subscriber');
+    $this->assertSame('invoked', $this->drupalGetHeader('X-Form-Test-Stack-Middleware'), 'Response handled by kernel middleware');
   }
 
 }
diff --git a/core/modules/system/tests/src/Functional/Form/UrlTest.php b/core/modules/system/tests/src/Functional/Form/UrlTest.php
index 82d227bbdf..65270dfdbd 100644
--- a/core/modules/system/tests/src/Functional/Form/UrlTest.php
+++ b/core/modules/system/tests/src/Functional/Form/UrlTest.php
@@ -37,7 +37,7 @@ public function testFormUrl() {
     $edit['url_required'] = 'http://example.com/   ';
     $this->drupalPostForm('form-test/url', $edit, 'Submit');
     $values = Json::decode($this->getSession()->getPage()->getContent());
-    $this->assertIdentical($values['url'], '');
+    $this->assertSame($values['url'], '');
     $this->assertEqual($values['url_required'], 'http://example.com/');
 
     $edit = [];
diff --git a/core/modules/system/tests/src/Functional/Module/InstallTest.php b/core/modules/system/tests/src/Functional/Module/InstallTest.php
index ccbca6d312..44b1775d06 100644
--- a/core/modules/system/tests/src/Functional/Module/InstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/InstallTest.php
@@ -25,7 +25,7 @@ class InstallTest extends BrowserTestBase {
   public function testGetSchemaAtInstallTime() {
     // @see module_test_install()
     $value = db_query("SELECT data FROM {module_test}")->fetchField();
-    $this->assertIdentical($value, 'varchar');
+    $this->assertSame($value, 'varchar');
   }
 
   /**
@@ -37,7 +37,7 @@ public function testGetSchemaAtInstallTime() {
    */
   public function testEnableUserTwice() {
     \Drupal::service('module_installer')->install(['user'], FALSE);
-    $this->assertIdentical($this->config('core.extension')->get('module.user'), 0);
+    $this->assertSame($this->config('core.extension')->get('module.user'), 0);
   }
 
   /**
diff --git a/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php b/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php
index 271774169f..c8a398f6a8 100644
--- a/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php
+++ b/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php
@@ -78,7 +78,7 @@ public function testUrlAlter() {
 
     // Test outbound query string altering.
     $url = Url::fromRoute('user.login');
-    $this->assertIdentical(\Drupal::request()->getBaseUrl() . '/user/login?foo=bar', $url->toString());
+    $this->assertSame(\Drupal::request()->getBaseUrl() . '/user/login?foo=bar', $url->toString());
   }
 
   /**
@@ -95,7 +95,7 @@ public function testUrlAlter() {
   protected function assertUrlOutboundAlter($original, $final) {
     // Test outbound altering.
     $result = $this->container->get('path_processor_manager')->processOutbound($original);
-    return $this->assertIdentical($result, $final, format_string('Altered outbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result]));
+    return $this->assertSame($result, $final, format_string('Altered outbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result]));
   }
 
   /**
@@ -112,7 +112,7 @@ protected function assertUrlOutboundAlter($original, $final) {
   protected function assertUrlInboundAlter($original, $final) {
     // Test inbound altering.
     $result = $this->container->get('path.alias_manager')->getPathByAlias($original);
-    return $this->assertIdentical($result, $final, format_string('Altered inbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result]));
+    return $this->assertSame($result, $final, format_string('Altered inbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result]));
   }
 
 }
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
index e372bb262a..7fc263cb58 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
@@ -66,16 +66,16 @@ public function testStylesheets() {
     // should work nevertheless.
     $this->drupalGet('theme-test/info/stylesheets');
 
-    $this->assertIdentical(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$base/base-add.css"])), "$base/base-add.css found");
-    $this->assertIdentical(0, count($this->xpath('//link[contains(@href, :href)]', [':href' => "base-remove.css"])), "base-remove.css not found");
+    $this->assertSame(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$base/base-add.css"])), "$base/base-add.css found");
+    $this->assertSame(0, count($this->xpath('//link[contains(@href, :href)]', [':href' => "base-remove.css"])), "base-remove.css not found");
 
-    $this->assertIdentical(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$sub/sub-add.css"])), "$sub/sub-add.css found");
-    $this->assertIdentical(0, count($this->xpath('//link[contains(@href, :href)]', [':href' => "sub-remove.css"])), "sub-remove.css not found");
-    $this->assertIdentical(0, count($this->xpath('//link[contains(@href, :href)]', [':href' => "base-add.sub-remove.css"])), "base-add.sub-remove.css not found");
+    $this->assertSame(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$sub/sub-add.css"])), "$sub/sub-add.css found");
+    $this->assertSame(0, count($this->xpath('//link[contains(@href, :href)]', [':href' => "sub-remove.css"])), "sub-remove.css not found");
+    $this->assertSame(0, count($this->xpath('//link[contains(@href, :href)]', [':href' => "base-add.sub-remove.css"])), "base-add.sub-remove.css not found");
 
     // Verify that CSS files with the same name are loaded from both the base theme and subtheme.
-    $this->assertIdentical(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$base/samename.css"])), "$base/samename.css found");
-    $this->assertIdentical(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$sub/samename.css"])), "$sub/samename.css found");
+    $this->assertSame(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$base/samename.css"])), "$base/samename.css found");
+    $this->assertSame(1, count($this->xpath('//link[contains(@href, :href)]', [':href' => "$sub/samename.css"])), "$sub/samename.css found");
 
   }
 
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
index 5e3bc722e3..67aa66c58b 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
@@ -70,8 +70,8 @@ public function testsRenderEscapedZeroValue() {
     $extension = \Drupal::service('twig.extension');
     /** @var \Drupal\Core\Template\TwigEnvironment $twig */
     $twig = \Drupal::service('twig');
-    $this->assertIdentical($extension->escapeFilter($twig, 0), 0, 'TwigExtension::escapeFilter() returns zero correctly when provided as an integer.');
-    $this->assertIdentical($extension->escapeFilter($twig, 0.0), 0, 'TwigExtension::escapeFilter() returns zero correctly when provided as a double.');
+    $this->assertSame($extension->escapeFilter($twig, 0), 0, 'TwigExtension::escapeFilter() returns zero correctly when provided as an integer.');
+    $this->assertSame($extension->escapeFilter($twig, 0.0), 0, 'TwigExtension::escapeFilter() returns zero correctly when provided as a double.');
   }
 
   /**
@@ -82,8 +82,8 @@ public function testsRenderEscapedZeroValue() {
   public function testsRenderZeroValue() {
     /** @var \Drupal\Core\Template\TwigExtension $extension */
     $extension = \Drupal::service('twig.extension');
-    $this->assertIdentical($extension->renderVar(0), 0, 'TwigExtension::renderVar() renders zero correctly when provided as an integer.');
-    $this->assertIdentical($extension->renderVar(0.0), 0, 'TwigExtension::renderVar() renders zero correctly when provided as a double.');
+    $this->assertSame($extension->renderVar(0), 0, 'TwigExtension::renderVar() renders zero correctly when provided as an integer.');
+    $this->assertSame($extension->renderVar(0.0), 0, 'TwigExtension::renderVar() renders zero correctly when provided as a double.');
   }
 
 }
diff --git a/core/modules/system/tests/src/Functional/Update/FilterHtmlUpdateTest.php b/core/modules/system/tests/src/Functional/Update/FilterHtmlUpdateTest.php
index 09e40aa983..4d42721795 100644
--- a/core/modules/system/tests/src/Functional/Update/FilterHtmlUpdateTest.php
+++ b/core/modules/system/tests/src/Functional/Update/FilterHtmlUpdateTest.php
@@ -32,7 +32,7 @@ public function testAllowedHtmlUpdate() {
     ];
     foreach ($filters_before as $name => $before) {
       $config = FilterFormat::load($name)->toArray();
-      $this->assertIdentical($before, $config['filters']['filter_html']['settings']['allowed_html']);
+      $this->assertSame($before, $config['filters']['filter_html']['settings']['allowed_html']);
     }
 
     $this->runUpdates();
@@ -44,7 +44,7 @@ public function testAllowedHtmlUpdate() {
     ];
     foreach ($filters_after as $name => $after) {
       $config = FilterFormat::load($name)->toArray();
-      $this->assertIdentical($after, $config['filters']['filter_html']['settings']['allowed_html']);
+      $this->assertSame($after, $config['filters']['filter_html']['settings']['allowed_html']);
     }
   }
 
diff --git a/core/modules/system/tests/src/Functional/Update/UpdateEntityDisplayTest.php b/core/modules/system/tests/src/Functional/Update/UpdateEntityDisplayTest.php
index 698d331099..b51031722c 100644
--- a/core/modules/system/tests/src/Functional/Update/UpdateEntityDisplayTest.php
+++ b/core/modules/system/tests/src/Functional/Update/UpdateEntityDisplayTest.php
@@ -40,11 +40,11 @@ public function testUpdate() {
     // The region key has been populated with 'content'.
     $entity_form_display = EntityFormDisplay::load('node.article.default');
     $options = $entity_form_display->getComponent('body');
-    $this->assertIdentical('content', $options['region']);
+    $this->assertSame('content', $options['region']);
 
     $entity_view_display = EntityViewDisplay::load('node.article.default');
     $options = $entity_view_display->getComponent('body');
-    $this->assertIdentical('content', $options['region']);
+    $this->assertSame('content', $options['region']);
   }
 
 }
diff --git a/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateFailingTest.php b/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateFailingTest.php
index 03b5d7b0ec..c7f165fd14 100644
--- a/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateFailingTest.php
+++ b/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateFailingTest.php
@@ -31,7 +31,7 @@ public function testPostUpdate() {
     $this->runUpdates();
 
     // There should be no post update hooks registered as being run.
-    $this->assertIdentical([], \Drupal::state()->get('post_update_test_execution', []));
+    $this->assertSame([], \Drupal::state()->get('post_update_test_execution', []));
 
     $key_value = \Drupal::keyValue('update__post_update');
     $this->assertEqual([], $key_value->get('existing_updates', []));
diff --git a/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateTest.php b/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateTest.php
index 1bba498d08..faa92cc745 100644
--- a/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateTest.php
+++ b/core/modules/system/tests/src/Functional/Update/UpdatePostUpdateTest.php
@@ -60,7 +60,7 @@ public function testPostUpdate() {
       'update_test_postupdate_post_update_test_batch-2',
       'update_test_postupdate_post_update_test_batch-3',
     ];
-    $this->assertIdentical($updates, \Drupal::state()->get('post_update_test_execution', []));
+    $this->assertSame($updates, \Drupal::state()->get('post_update_test_execution', []));
 
     // Test post_update key value stores contains a list of the update functions
     // that have run.
diff --git a/core/modules/system/tests/src/Kernel/Action/ActionTest.php b/core/modules/system/tests/src/Kernel/Action/ActionTest.php
index 6c381d7c80..a66afd8932 100644
--- a/core/modules/system/tests/src/Kernel/Action/ActionTest.php
+++ b/core/modules/system/tests/src/Kernel/Action/ActionTest.php
@@ -95,7 +95,7 @@ public function testDependencies() {
         'user',
       ],
     ];
-    $this->assertIdentical($expected, $action->calculateDependencies()->getDependencies());
+    $this->assertSame($expected, $action->calculateDependencies()->getDependencies());
   }
 
 }
diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
index 07cf684b11..df08c0e775 100644
--- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
+++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
@@ -171,7 +171,7 @@ public function testSystemMenuBlockConfigDependencies() {
         'stark'
       ],
     ];
-    $this->assertIdentical($expected, $dependencies);
+    $this->assertSame($expected, $dependencies);
   }
 
   /**
@@ -226,7 +226,7 @@ public function testConfigLevelDepth() {
     foreach ($blocks as $id => $block) {
       $block_build = $block->build();
       $items = isset($block_build['#items']) ? $block_build['#items'] : [];
-      $this->assertIdentical($no_active_trail_expectations[$id], $this->convertBuiltMenuToIdTree($items), format_string('Menu block %id with no active trail renders the expected tree.', ['%id' => $id]));
+      $this->assertSame($no_active_trail_expectations[$id], $this->convertBuiltMenuToIdTree($items), format_string('Menu block %id with no active trail renders the expected tree.', ['%id' => $id]));
     }
 
     // Scenario 2: test all block instances when there's an active trail.
@@ -278,7 +278,7 @@ public function testConfigLevelDepth() {
     foreach ($blocks as $id => $block) {
       $block_build = $block->build();
       $items = isset($block_build['#items']) ? $block_build['#items'] : [];
-      $this->assertIdentical($active_trail_expectations[$id], $this->convertBuiltMenuToIdTree($items), format_string('Menu block %id with an active trail renders the expected tree.', ['%id' => $id]));
+      $this->assertSame($active_trail_expectations[$id], $this->convertBuiltMenuToIdTree($items), format_string('Menu block %id with an active trail renders the expected tree.', ['%id' => $id]));
     }
   }
 
diff --git a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
index d7c2650353..199b048c8d 100644
--- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
@@ -165,7 +165,7 @@ public function testDependencyResolution() {
 
     // Finally, verify that the modules were enabled in the correct order.
     $enable_order = \Drupal::state()->get('module_test.install_order') ?: [];
-    $this->assertIdentical($enable_order, ['help', 'config', 'color']);
+    $this->assertSame($enable_order, ['help', 'config', 'color']);
   }
 
   /**
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php
index b45a36050f..c1707581ae 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php
@@ -26,13 +26,13 @@ protected function setUp() {
    */
   public function testDateFormats() {
     $short_date_format = DateFormat::load('short');
-    $this->assertIdentical('\S\H\O\R\T m/d/Y - H:i', $short_date_format->getPattern());
+    $this->assertSame('\S\H\O\R\T m/d/Y - H:i', $short_date_format->getPattern());
 
     $medium_date_format = DateFormat::load('medium');
-    $this->assertIdentical('\M\E\D\I\U\M D, m/d/Y - H:i', $medium_date_format->getPattern());
+    $this->assertSame('\M\E\D\I\U\M D, m/d/Y - H:i', $medium_date_format->getPattern());
 
     $long_date_format = DateFormat::load('long');
-    $this->assertIdentical('\L\O\N\G l, F j, Y - H:i', $long_date_format->getPattern());
+    $this->assertSame('\L\O\N\G l, F j, Y - H:i', $long_date_format->getPattern());
 
     // Test that we can re-import using the EntityDateFormat destination.
     Database::getConnection('default', 'migrate')
@@ -49,7 +49,7 @@ public function testDateFormats() {
     $this->executeMigration($migration);
 
     $short_date_format = DateFormat::load('short');
-    $this->assertIdentical('\S\H\O\R\T d/m/Y - H:i', $short_date_format->getPattern());
+    $this->assertSame('\S\H\O\R\T d/m/Y - H:i', $short_date_format->getPattern());
 
   }
 
diff --git a/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php b/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php
index 7ff519df94..dca6921ef8 100644
--- a/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php
+++ b/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php
@@ -198,7 +198,7 @@ public function testAutocompleteOrderedResults() {
       ['query' => ['q' => 'bbb']]
     );
 
-    $this->assertIdentical($expected, $data);
+    $this->assertSame($expected, $data);
   }
 
 }
diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php
index 42f92b1b4b..cb461344b8 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -571,17 +571,17 @@ public function testTermBreadcrumbs() {
     // Check the breadcrumb on the term edit page.
     $this->drupalGet('taxonomy/term/' . $term->id() . '/edit');
     $breadcrumbs = $this->cssSelect('nav.breadcrumb ol li a');
-    $this->assertIdentical(count($breadcrumbs), 2, 'The breadcrumbs are present on the page.');
-    $this->assertIdentical((string) $breadcrumbs[0], 'Home', 'First breadcrumb text is Home');
-    $this->assertIdentical((string) $breadcrumbs[1], $term->label(), 'Second breadcrumb text is term name on term edit page.');
+    $this->assertSame(count($breadcrumbs), 2, 'The breadcrumbs are present on the page.');
+    $this->assertSame((string) $breadcrumbs[0], 'Home', 'First breadcrumb text is Home');
+    $this->assertSame((string) $breadcrumbs[1], $term->label(), 'Second breadcrumb text is term name on term edit page.');
     $this->assertEscaped((string) $breadcrumbs[1], 'breadcrumbs displayed and escaped.');
 
     // Check the breadcrumb on the term delete page.
     $this->drupalGet('taxonomy/term/' . $term->id() . '/delete');
     $breadcrumbs = $this->cssSelect('nav.breadcrumb ol li a');
-    $this->assertIdentical(count($breadcrumbs), 2, 'The breadcrumbs are present on the page.');
-    $this->assertIdentical((string) $breadcrumbs[0], 'Home', 'First breadcrumb text is Home');
-    $this->assertIdentical((string) $breadcrumbs[1], $term->label(), 'Second breadcrumb text is term name on term delete page.');
+    $this->assertSame(count($breadcrumbs), 2, 'The breadcrumbs are present on the page.');
+    $this->assertSame((string) $breadcrumbs[0], 'Home', 'First breadcrumb text is Home');
+    $this->assertSame((string) $breadcrumbs[1], $term->label(), 'Second breadcrumb text is term name on term delete page.');
     $this->assertEscaped((string) $breadcrumbs[1], 'breadcrumbs displayed and escaped.');
   }
 
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php
index 85310e9aa9..91747aad2c 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php
@@ -111,9 +111,9 @@ protected function setupQueryTagTestHooks() {
    *   A string describing the invoked function which generated the query.
    */
   protected function assertQueryTagTestResult($expected_generic_invocations, $expected_specific_invocations, $method) {
-    $this->assertIdentical($expected_generic_invocations, \Drupal::state()->get('taxonomy_test_query_alter'), 'hook_query_alter() invoked when executing ' . $method);
-    $this->assertIdentical($expected_specific_invocations, \Drupal::state()->get('taxonomy_test_query_term_access_alter'), 'Deprecated hook_query_term_access_alter() invoked when executing ' . $method);
-    $this->assertIdentical($expected_specific_invocations, \Drupal::state()->get('taxonomy_test_query_taxonomy_term_access_alter'), 'Preferred hook_query_taxonomy_term_access_alter() invoked when executing ' . $method);
+    $this->assertSame($expected_generic_invocations, \Drupal::state()->get('taxonomy_test_query_alter'), 'hook_query_alter() invoked when executing ' . $method);
+    $this->assertSame($expected_specific_invocations, \Drupal::state()->get('taxonomy_test_query_term_access_alter'), 'Deprecated hook_query_term_access_alter() invoked when executing ' . $method);
+    $this->assertSame($expected_specific_invocations, \Drupal::state()->get('taxonomy_test_query_taxonomy_term_access_alter'), 'Preferred hook_query_taxonomy_term_access_alter() invoked when executing ' . $method);
   }
 
 }
diff --git a/core/modules/taxonomy/tests/src/Functional/TermEntityReferenceTest.php b/core/modules/taxonomy/tests/src/Functional/TermEntityReferenceTest.php
index 9d4522ec71..ff491590ee 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermEntityReferenceTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermEntityReferenceTest.php
@@ -73,7 +73,7 @@ public function testSelectionTestVocabularyRestriction() {
       ],
     ];
 
-    $this->assertIdentical($result, $expected_result, 'Terms selection restricted to a single vocabulary.');
+    $this->assertSame($result, $expected_result, 'Terms selection restricted to a single vocabulary.');
   }
 
 }
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php b/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php
index 3469870fa4..2f110b96c9 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php
@@ -29,7 +29,7 @@ public function testViewsHandlerRelationshipNodeTermData() {
         'user',
       ],
     ];
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
     $this->executeView($view, [$this->term1->id(), $this->term2->id()]);
     $expected_result = [
       [
@@ -40,7 +40,7 @@ public function testViewsHandlerRelationshipNodeTermData() {
       ],
     ];
     $column_map = ['nid' => 'nid'];
-    $this->assertIdenticalResultset($view, $expected_result, $column_map);
+    $this->assertSameResultset($view, $expected_result, $column_map);
 
     // Change the view to test relation limited by vocabulary.
     $this->config('views.view.test_taxonomy_node_term_data')
@@ -50,9 +50,9 @@ public function testViewsHandlerRelationshipNodeTermData() {
     $view = Views::getView('test_taxonomy_node_term_data');
     // Tests \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies().
     $expected['config'][] = 'taxonomy.vocabulary.views_testing_tags';
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
     $this->executeView($view, [$this->term1->id(), $this->term2->id()]);
-    $this->assertIdenticalResultset($view, $expected_result, $column_map);
+    $this->assertSameResultset($view, $expected_result, $column_map);
   }
 
 }
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/RelationshipRepresentativeNodeTest.php b/core/modules/taxonomy/tests/src/Functional/Views/RelationshipRepresentativeNodeTest.php
index d1de82efed..a3023d4ef6 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/RelationshipRepresentativeNodeTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/RelationshipRepresentativeNodeTest.php
@@ -35,7 +35,7 @@ public function testRelationship() {
         'tid' => $this->term1->id(),
       ],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $map);
+    $this->assertSameResultset($view, $expected_result, $map);
   }
 
 }
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
index 4de73705d9..4e02b3618f 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
@@ -123,7 +123,7 @@ public function testFilterUI() {
         'user',
       ],
     ];
-    $this->assertIdentical($expected, $view->calculateDependencies()->getDependencies());
+    $this->assertSame($expected, $view->calculateDependencies()->getDependencies());
   }
 
   /**
@@ -152,11 +152,11 @@ public function testExposedFilter() {
     // Only the nodes with the selected term should be shown.
     $this->drupalGet('test-filter-taxonomy-index-tid');
     $xpath = $this->xpath('//div[@class="view-content"]//a');
-    $this->assertIdentical(2, count($xpath));
+    $this->assertSame(2, count($xpath));
     $xpath = $this->xpath('//div[@class="view-content"]//a[@href=:href]', [':href' => $node2->url()]);
-    $this->assertIdentical(1, count($xpath));
+    $this->assertSame(1, count($xpath));
     $xpath = $this->xpath('//div[@class="view-content"]//a[@href=:href]', [':href' => $node3->url()]);
-    $this->assertIdentical(1, count($xpath));
+    $this->assertSame(1, count($xpath));
 
     // Expose the filter.
     $this->drupalPostForm('admin/structure/views/nojs/handler/test_filter_taxonomy_index_tid/default/filter/tid', [], 'Expose filter');
@@ -172,9 +172,9 @@ public function testExposedFilter() {
     // shown.
     $this->drupalGet('test-filter-taxonomy-index-tid');
     $xpath = $this->xpath('//div[@class="view-content"]//a');
-    $this->assertIdentical(1, count($xpath));
+    $this->assertSame(1, count($xpath));
     $xpath = $this->xpath('//div[@class="view-content"]//a[@href=:href]', [':href' => $node1->url()]);
-    $this->assertIdentical(1, count($xpath));
+    $this->assertSame(1, count($xpath));
 
     // Set the operator to 'not empty'.
     $this->drupalPostForm('admin/structure/views/nojs/handler/test_filter_taxonomy_index_tid/default/filter/tid', ['options[operator]' => 'not empty'], 'Apply');
@@ -185,13 +185,13 @@ public function testExposedFilter() {
     // shown.
     $this->drupalGet('test-filter-taxonomy-index-tid');
     $xpath = $this->xpath('//div[@class="view-content"]//a');
-    $this->assertIdentical(3, count($xpath));
+    $this->assertSame(3, count($xpath));
     $xpath = $this->xpath('//div[@class="view-content"]//a[@href=:href]', [':href' => $node2->url()]);
-    $this->assertIdentical(1, count($xpath));
+    $this->assertSame(1, count($xpath));
     $xpath = $this->xpath('//div[@class="view-content"]//a[@href=:href]', [':href' => $node3->url()]);
-    $this->assertIdentical(1, count($xpath));
+    $this->assertSame(1, count($xpath));
     $xpath = $this->xpath('//div[@class="view-content"]//a[@href=:href]', [':href' => $node4->url()]);
-    $this->assertIdentical(1, count($xpath));
+    $this->assertSame(1, count($xpath));
 
     // Select 'Term ID' as the field to be displayed.
     $edit = ['name[taxonomy_term_field_data.tid]' => TRUE];
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
index 4d7a4fdf03..8a918982bf 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
@@ -67,7 +67,7 @@ protected function setUp($import_test_views = TRUE) {
    */
   public function testTermWithDepthFilter() {
     $column_map = ['nid' => 'nid'];
-    $assert_method = 'assertIdentical';
+    $assert_method = 'assertSame';
 
     // Default view has an empty value for this filter, so all nodes should be
     // returned.
@@ -79,7 +79,7 @@ public function testTermWithDepthFilter() {
       ['nid' => 5],
     ];
     $this->executeView($this->view);
-    $this->assertIdenticalResultsetHelper($this->view, $expected, $column_map, $assert_method);
+    $this->assertSameResultsetHelper($this->view, $expected, $column_map, $assert_method);
 
     // Set filter to search on top-level term, with depth 0.
     $expected = [['nid' => 4]];
@@ -130,7 +130,7 @@ protected function assertTermWithDepthResult($tid, $depth, array $expected) {
     $this->view->displayHandlers->get('default')
       ->setOption('filters', $filters);
     $this->executeView($this->view);
-    $this->assertIdenticalResultsetHelper($this->view, $expected, ['nid' => 'nid'], 'assertIdentical');
+    $this->assertSameResultsetHelper($this->view, $expected, ['nid' => 'nid'], 'assertSame');
   }
 
 }
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php
index 2ac2d9de61..7e1076b7cb 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php
@@ -122,7 +122,7 @@ public function testTaxonomyVocabularyLoadMultiple() {
     $vocabularies = Vocabulary::loadMultiple([$vocabulary3->id(), $vocabulary2->id(), $vocabulary1->id()]);
     $loaded_order = array_keys($vocabularies);
     $expected_order = [$vocabulary3->id(), $vocabulary2->id(), $vocabulary1->id()];
-    $this->assertIdentical($loaded_order, $expected_order);
+    $this->assertSame($loaded_order, $expected_order);
 
     // Test loading vocabularies by their properties.
     $controller = $this->container->get('entity.manager')->getStorage('taxonomy_vocabulary');
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
index 92ebe5926a..9f56120802 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
@@ -32,8 +32,8 @@ protected function setUp() {
    */
   public function testTaxonomySettings() {
     $config = $this->config('taxonomy.settings');
-    $this->assertIdentical(100, $config->get('terms_per_page_admin'));
-    $this->assertIdentical(FALSE, $config->get('override_selector'));
+    $this->assertSame(100, $config->get('terms_per_page_admin'));
+    $this->assertSame(FALSE, $config->get('override_selector'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'taxonomy.settings', $config->get());
   }
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
index 2da51e4a43..b8a23fe874 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
@@ -79,7 +79,7 @@ public function testStubWithWeightMapping() {
     $stub_entity = Term::load(2);
     $this->assertTrue($stub_entity, 'Stub successfully created');
     if ($stub_entity) {
-      $this->assertIdentical(count($stub_entity->validate()), 0, 'Stub is a valid entity');
+      $this->assertSame(count($stub_entity->validate()), 0, 'Stub is a valid entity');
     }
   }
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
index 207b528589..737b187bd7 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
@@ -76,12 +76,12 @@ protected function assertEntity($id, $expected_label, $expected_vid, $expected_d
     /** @var \Drupal\taxonomy\TermInterface $entity */
     $entity = Term::load($id);
     $this->assertTrue($entity instanceof TermInterface);
-    $this->assertIdentical($expected_label, $entity->label());
-    $this->assertIdentical($expected_vid, $entity->bundle());
+    $this->assertSame($expected_label, $entity->label());
+    $this->assertSame($expected_vid, $entity->bundle());
     $this->assertEqual($expected_description, $entity->getDescription());
     $this->assertEquals($expected_format, $entity->getFormat());
     $this->assertEqual($expected_weight, $entity->getWeight());
-    $this->assertIdentical($expected_parents, $this->getParentIDs($id));
+    $this->assertSame($expected_parents, $this->getParentIDs($id));
     $this->assertHierarchy($expected_vid, $id, $expected_parents);
     if (!is_null($expected_field_integer_value)) {
       $this->assertTrue($entity->hasField('field_integer'));
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
index c7f560c41d..19bc1f8684 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
@@ -44,10 +44,10 @@ protected function assertEntity($id, $expected_label, $expected_description, $ex
     /** @var \Drupal\taxonomy\VocabularyInterface $entity */
     $entity = Vocabulary::load($id);
     $this->assertTrue($entity instanceof VocabularyInterface);
-    $this->assertIdentical($expected_label, $entity->label());
-    $this->assertIdentical($expected_description, $entity->getDescription());
-    $this->assertIdentical($expected_hierarchy, $entity->getHierarchy());
-    $this->assertIdentical($expected_weight, $entity->get('weight'));
+    $this->assertSame($expected_label, $entity->label());
+    $this->assertSame($expected_description, $entity->getDescription());
+    $this->assertSame($expected_hierarchy, $entity->getHierarchy());
+    $this->assertSame($expected_weight, $entity->get('weight'));
   }
 
   /**
diff --git a/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php b/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php
index 05b37085e6..ef998ef259 100644
--- a/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php
+++ b/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp() {
    */
   public function testTextSettings() {
     $config = $this->config('text.settings');
-    $this->assertIdentical(456, $config->get('default_summary_length'));
+    $this->assertSame(456, $config->get('default_summary_length'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'text.settings', $config->get());
   }
 
diff --git a/core/modules/text/tests/src/Kernel/TextSummaryTest.php b/core/modules/text/tests/src/Kernel/TextSummaryTest.php
index 15d4549472..354c2f8a4e 100644
--- a/core/modules/text/tests/src/Kernel/TextSummaryTest.php
+++ b/core/modules/text/tests/src/Kernel/TextSummaryTest.php
@@ -207,7 +207,7 @@ public function testLength() {
    */
   public function assertTextSummary($text, $expected, $format = NULL, $size = NULL) {
     $summary = text_summary($text, $format, $size);
-    $this->assertIdentical($summary, $expected, format_string('<pre style="white-space: pre-wrap">@actual</pre> is identical to <pre style="white-space: pre-wrap">@expected</pre>', [
+    $this->assertSame($summary, $expected, format_string('<pre style="white-space: pre-wrap">@actual</pre> is identical to <pre style="white-space: pre-wrap">@expected</pre>', [
       '@actual' => $summary,
       '@expected' => $expected,
     ]));
diff --git a/core/modules/tour/tests/src/Kernel/TourPluginTest.php b/core/modules/tour/tests/src/Kernel/TourPluginTest.php
index ce47467df7..835c8b609d 100644
--- a/core/modules/tour/tests/src/Kernel/TourPluginTest.php
+++ b/core/modules/tour/tests/src/Kernel/TourPluginTest.php
@@ -36,7 +36,7 @@ protected function setUp() {
    * Test tour plugins.
    */
   public function testTourPlugins() {
-    $this->assertIdentical(count($this->pluginManager->getDefinitions()), 1, 'Only tour plugins for the enabled modules were returned.');
+    $this->assertSame(count($this->pluginManager->getDefinitions()), 1, 'Only tour plugins for the enabled modules were returned.');
   }
 
 }
diff --git a/core/modules/tracker/tests/src/Functional/TrackerTest.php b/core/modules/tracker/tests/src/Functional/TrackerTest.php
index 1a77d95ac8..9e05b1bade 100644
--- a/core/modules/tracker/tests/src/Functional/TrackerTest.php
+++ b/core/modules/tracker/tests/src/Functional/TrackerTest.php
@@ -440,9 +440,9 @@ public function testTrackerAdminUnpublish() {
    */
   public function assertHistoryMetadata($node_id, $node_timestamp, $node_last_comment_timestamp, $library_is_present = TRUE) {
     $settings = $this->getDrupalSettings();
-    $this->assertIdentical($library_is_present, isset($settings['ajaxPageState']) && in_array('tracker/history', explode(',', $settings['ajaxPageState']['libraries'])), 'drupal.tracker-history library is present.');
-    $this->assertIdentical(1, count($this->xpath('//table/tbody/tr/td[@data-history-node-id="' . $node_id . '" and @data-history-node-timestamp="' . $node_timestamp . '"]')), 'Tracker table cell contains the data-history-node-id and data-history-node-timestamp attributes for the node.');
-    $this->assertIdentical(1, count($this->xpath('//table/tbody/tr/td[@data-history-node-last-comment-timestamp="' . $node_last_comment_timestamp . '"]')), 'Tracker table cell contains the data-history-node-last-comment-timestamp attribute for the node.');
+    $this->assertSame($library_is_present, isset($settings['ajaxPageState']) && in_array('tracker/history', explode(',', $settings['ajaxPageState']['libraries'])), 'drupal.tracker-history library is present.');
+    $this->assertSame(1, count($this->xpath('//table/tbody/tr/td[@data-history-node-id="' . $node_id . '" and @data-history-node-timestamp="' . $node_timestamp . '"]')), 'Tracker table cell contains the data-history-node-id and data-history-node-timestamp attributes for the node.');
+    $this->assertSame(1, count($this->xpath('//table/tbody/tr/td[@data-history-node-last-comment-timestamp="' . $node_last_comment_timestamp . '"]')), 'Tracker table cell contains the data-history-node-last-comment-timestamp attribute for the node.');
   }
 
 }
diff --git a/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php b/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php
index 7bd675b2ed..40002dfaf0 100644
--- a/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php
+++ b/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php
@@ -38,7 +38,7 @@ public function testUserUid() {
     $this->executeView($view);
 
     // We should have no results as the filter is set for uid 0.
-    $this->assertIdenticalResultSet($view, [], $map);
+    $this->assertSameResultSet($view, [], $map);
     $view->destroy();
 
     // Change the filter value to our user.
@@ -47,7 +47,7 @@ public function testUserUid() {
     $this->executeView($view);
 
     // We should have one result as the filter is set for the created user.
-    $this->assertIdenticalResultSet($view, $expected, $map);
+    $this->assertSameResultSet($view, $expected, $map);
     $view->destroy();
 
     // Remove the filter now, so only the argument will affect the query.
@@ -56,13 +56,13 @@ public function testUserUid() {
     // Test the incorrect argument UID.
     $view->initHandlers();
     $this->executeView($view, [rand()]);
-    $this->assertIdenticalResultSet($view, [], $map);
+    $this->assertSameResultSet($view, [], $map);
     $view->destroy();
 
     // Test the correct argument UID.
     $view->initHandlers();
     $this->executeView($view, [$this->node->getOwnerId()]);
-    $this->assertIdenticalResultSet($view, $expected, $map);
+    $this->assertSameResultSet($view, $expected, $map);
   }
 
 }
diff --git a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php
index d37050269f..99041aade0 100644
--- a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php
@@ -53,16 +53,16 @@ public function testMigrateTrackerNode() {
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertIdentical('1', $num_rows);
+    $this->assertSame('1', $num_rows);
 
     $tracker_nodes = $connection
       ->select('tracker_node', 'tn')
       ->fields('tn', ['nid', 'published', 'changed'])
       ->execute();
     $row = $tracker_nodes->fetchAssoc();
-    $this->assertIdentical('1', $row['nid']);
-    $this->assertIdentical('1', $row['published']);
-    $this->assertIdentical('1421727536', $row['changed']);
+    $this->assertSame('1', $row['nid']);
+    $this->assertSame('1', $row['published']);
+    $this->assertSame('1421727536', $row['changed']);
   }
 
 }
diff --git a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php
index ea9732221a..9719c49526 100644
--- a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php
@@ -26,7 +26,7 @@ protected function setUp() {
    * Tests migration of tracker's variables to configuration.
    */
   public function testMigration() {
-    $this->assertIdentical(999, \Drupal::config('tracker.settings')->get('cron_index_limit'));
+    $this->assertSame(999, \Drupal::config('tracker.settings')->get('cron_index_limit'));
   }
 
 }
diff --git a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php
index 3b0c11bb32..40871c651d 100644
--- a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php
@@ -53,17 +53,17 @@ public function testMigrateTrackerUser() {
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertIdentical('1', $num_rows);
+    $this->assertSame('1', $num_rows);
 
     $tracker_nodes = $connection
       ->select('tracker_user', 'tu')
       ->fields('tu', ['nid', 'uid', 'published', 'changed'])
       ->execute();
     $row = $tracker_nodes->fetchAssoc();
-    $this->assertIdentical('1', $row['nid']);
-    $this->assertIdentical('2', $row['uid']);
-    $this->assertIdentical('1', $row['published']);
-    $this->assertIdentical('1421727536', $row['changed']);
+    $this->assertSame('1', $row['nid']);
+    $this->assertSame('2', $row['uid']);
+    $this->assertSame('1', $row['published']);
+    $this->assertSame('1421727536', $row['changed']);
   }
 
 }
diff --git a/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php b/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
index aa3563c608..bc5a932ee5 100644
--- a/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
+++ b/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
@@ -32,11 +32,11 @@ protected function setUp() {
    */
   public function testUpdateSettings() {
     $config = $this->config('update.settings');
-    $this->assertIdentical(2, $config->get('fetch.max_attempts'));
-    $this->assertIdentical('http://updates.drupal.org/release-history', $config->get('fetch.url'));
-    $this->assertIdentical('all', $config->get('notification.threshold'));
-    $this->assertIdentical([], $config->get('notification.emails'));
-    $this->assertIdentical(7, $config->get('check.interval_days'));
+    $this->assertSame(2, $config->get('fetch.max_attempts'));
+    $this->assertSame('http://updates.drupal.org/release-history', $config->get('fetch.url'));
+    $this->assertSame('all', $config->get('notification.threshold'));
+    $this->assertSame([], $config->get('notification.emails'));
+    $this->assertSame(7, $config->get('check.interval_days'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'update.settings', $config->get());
   }
 
diff --git a/core/modules/user/src/Tests/UserLoginTest.php b/core/modules/user/src/Tests/UserLoginTest.php
index d92c1c7ae6..88b2f01639 100644
--- a/core/modules/user/src/Tests/UserLoginTest.php
+++ b/core/modules/user/src/Tests/UserLoginTest.php
@@ -123,7 +123,7 @@ public function testPasswordRehashOnLogin() {
     // Load the stored user. The password hash should reflect $default_count_log2.
     $user_storage = $this->container->get('entity.manager')->getStorage('user');
     $account = User::load($account->id());
-    $this->assertIdentical($password_hasher->getCountLog2($account->getPassword()), $default_count_log2);
+    $this->assertSame($password_hasher->getCountLog2($account->getPassword()), $default_count_log2);
 
     // Change the required number of iterations by loading a test-module
     // containing the necessary container builder code and then verify that the
@@ -137,7 +137,7 @@ public function testPasswordRehashOnLogin() {
     // Load the stored user, which should have a different password hash now.
     $user_storage->resetCache([$account->id()]);
     $account = $user_storage->load($account->id());
-    $this->assertIdentical($password_hasher->getCountLog2($account->getPassword()), $overridden_count_log2);
+    $this->assertSame($password_hasher->getCountLog2($account->getPassword()), $overridden_count_log2);
     $this->assertTrue($password_hasher->check($password, $account->getPassword()));
   }
 
diff --git a/core/modules/user/src/Tests/UserPermissionsTest.php b/core/modules/user/src/Tests/UserPermissionsTest.php
index 4f9e260abc..8388b4a079 100644
--- a/core/modules/user/src/Tests/UserPermissionsTest.php
+++ b/core/modules/user/src/Tests/UserPermissionsTest.php
@@ -55,7 +55,7 @@ public function testUserPermissionChanges() {
     $rid = $this->rid;
     $account = $this->adminUser;
     $previous_permissions_hash = $permissions_hash_generator->generate($account);
-    $this->assertIdentical($previous_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
+    $this->assertSame($previous_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
 
     // Add a permission.
     $this->assertFalse($account->hasPermission('administer users'), 'User does not have "administer users" permission.');
@@ -66,7 +66,7 @@ public function testUserPermissionChanges() {
     $storage->resetCache();
     $this->assertTrue($account->hasPermission('administer users'), 'User now has "administer users" permission.');
     $current_permissions_hash = $permissions_hash_generator->generate($account);
-    $this->assertIdentical($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
+    $this->assertSame($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
     $this->assertNotEqual($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');
     $previous_permissions_hash = $current_permissions_hash;
 
@@ -79,7 +79,7 @@ public function testUserPermissionChanges() {
     $storage->resetCache();
     $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has "access user profiles" permission.');
     $current_permissions_hash = $permissions_hash_generator->generate($account);
-    $this->assertIdentical($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
+    $this->assertSame($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
     $this->assertNotEqual($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');
 
     // Ensure that the admin role doesn't have any checkboxes.
diff --git a/core/modules/user/src/Tests/UserRoleAdminTest.php b/core/modules/user/src/Tests/UserRoleAdminTest.php
index eca9915d77..4a02892df7 100644
--- a/core/modules/user/src/Tests/UserRoleAdminTest.php
+++ b/core/modules/user/src/Tests/UserRoleAdminTest.php
@@ -126,7 +126,7 @@ public function testRoleWeightOrdering() {
       $rids[] = $role->id();
     }
     // The order of the roles should be reversed.
-    $this->assertIdentical($rids, array_reverse($saved_rids));
+    $this->assertSame($rids, array_reverse($saved_rids));
   }
 
 }
diff --git a/core/modules/user/src/Tests/Views/AccessRoleTest.php b/core/modules/user/src/Tests/Views/AccessRoleTest.php
index 57055572d2..57e2d4f4c7 100644
--- a/core/modules/user/src/Tests/Views/AccessRoleTest.php
+++ b/core/modules/user/src/Tests/Views/AccessRoleTest.php
@@ -38,7 +38,7 @@ public function testAccessRole() {
       'config' => ['user.role.' . $this->normalRole],
       'module' => ['user'],
     ];
-    $this->assertIdentical($expected, $view->calculateDependencies()->getDependencies());
+    $this->assertSame($expected, $view->calculateDependencies()->getDependencies());
 
     $executable = Views::executableFactory()->get($view);
     $executable->setDisplay('page_1');
@@ -78,7 +78,7 @@ public function testAccessRole() {
       'config' => $roles,
       'module' => ['user'],
     ];
-    $this->assertIdentical($expected, $view->calculateDependencies()->getDependencies());
+    $this->assertSame($expected, $view->calculateDependencies()->getDependencies());
     $this->drupalLogin($this->webUser);
     $this->drupalGet('test-role');
     $this->assertResponse(403);
diff --git a/core/modules/user/src/Tests/Views/HandlerFilterUserNameTest.php b/core/modules/user/src/Tests/Views/HandlerFilterUserNameTest.php
index c4f70656c8..41f5cc2f55 100644
--- a/core/modules/user/src/Tests/Views/HandlerFilterUserNameTest.php
+++ b/core/modules/user/src/Tests/Views/HandlerFilterUserNameTest.php
@@ -77,7 +77,7 @@ public function testUserNameApi() {
     $view->filter['uid']->value = [$this->accounts[0]->id()];
 
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, [['uid' => $this->accounts[0]->id()]], $this->columnMap);
+    $this->assertSameResultset($view, [['uid' => $this->accounts[0]->id()]], $this->columnMap);
 
     $this->assertEqual($view->filter['uid']->getValueOptions(), NULL);
   }
diff --git a/core/modules/user/src/Tests/Views/RelationshipRepresentativeNodeTest.php b/core/modules/user/src/Tests/Views/RelationshipRepresentativeNodeTest.php
index 14f44123e3..6dadc1cf6f 100644
--- a/core/modules/user/src/Tests/Views/RelationshipRepresentativeNodeTest.php
+++ b/core/modules/user/src/Tests/Views/RelationshipRepresentativeNodeTest.php
@@ -35,7 +35,7 @@ public function testRelationship() {
         'nid' => $this->nodes[0]->id(),
       ],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $map);
+    $this->assertSameResultset($view, $expected_result, $map);
   }
 
 }
diff --git a/core/modules/user/tests/src/Functional/Update/UserUpdateOrderPermissionsTest.php b/core/modules/user/tests/src/Functional/Update/UserUpdateOrderPermissionsTest.php
index 4d6e7f9600..7c9912cd16 100644
--- a/core/modules/user/tests/src/Functional/Update/UserUpdateOrderPermissionsTest.php
+++ b/core/modules/user/tests/src/Functional/Update/UserUpdateOrderPermissionsTest.php
@@ -32,7 +32,7 @@ public function testPermissionsOrder() {
 
     $this->runUpdates();
     $authenticated = Role::load('authenticated');
-    $this->assertIdentical($permissions, $authenticated->getPermissions());
+    $this->assertSame($permissions, $authenticated->getPermissions());
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
index 85cd761bc3..5cfbf985d5 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
@@ -94,15 +94,15 @@ public function testAdminPasswordPreserved() {
     // Verify that admin username and email were changed, but password was not.
     /** @var \Drupal\user\Entity\User $admin_account */
     $admin_account = User::load(1);
-    $this->assertIdentical($admin_account->getUsername(), 'site_admin');
-    $this->assertIdentical($admin_account->getEmail(), 'site_admin@example.com');
-    $this->assertIdentical($admin_account->getPassword(), $this->originalPasswords[1]);
+    $this->assertSame($admin_account->getUsername(), 'site_admin');
+    $this->assertSame($admin_account->getEmail(), 'site_admin@example.com');
+    $this->assertSame($admin_account->getPassword(), $this->originalPasswords[1]);
 
     // Verify that everything changed for the regular user.
     /** @var \Drupal\user\Entity\User $user_account */
     $user_account = User::load(2);
-    $this->assertIdentical($user_account->getUsername(), 'random_user');
-    $this->assertIdentical($user_account->getEmail(), 'random_user@example.com');
+    $this->assertSame($user_account->getUsername(), 'random_user');
+    $this->assertSame($user_account->getEmail(), 'random_user@example.com');
     $this->assertNotIdentical($user_account->getPassword(), $this->originalPasswords[2]);
   }
 
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityDisplayTest.php
index 0d3bb7c206..776a7ad69c 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityDisplayTest.php
@@ -35,9 +35,9 @@ protected function setUp() {
    */
   public function testUserPictureEntityDisplay() {
     $component = EntityViewDisplay::load('user.user.default')->getComponent('user_picture');
-    $this->assertIdentical('image', $component['type']);
-    $this->assertIdentical('', $component['settings']['image_style']);
-    $this->assertIdentical('content', $component['settings']['image_link']);
+    $this->assertSame('image', $component['type']);
+    $this->assertSame('', $component['settings']['image_style']);
+    $this->assertSame('content', $component['settings']['image_link']);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityFormDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityFormDisplayTest.php
index f75382496f..9951204e15 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityFormDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityFormDisplayTest.php
@@ -31,9 +31,9 @@ protected function setUp() {
    */
   public function testEntityFormDisplaySettings() {
     $component = EntityFormDisplay::load('user.user.default')->getComponent('user_picture');
-    $this->assertIdentical('image_image', $component['type']);
-    $this->assertIdentical('throbber', $component['settings']['progress_indicator']);
-    $this->assertIdentical('thumbnail', $component['settings']['preview_image_style']);
+    $this->assertSame('image_image', $component['type']);
+    $this->assertSame('throbber', $component['settings']['progress_indicator']);
+    $this->assertSame('thumbnail', $component['settings']['preview_image_style']);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldInstanceTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldInstanceTest.php
index 9b3829e06d..fa64d9c0b0 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldInstanceTest.php
@@ -33,9 +33,9 @@ public function testUserPictureField() {
     /** @var \Drupal\field\FieldConfigInterface $field */
     $field = FieldConfig::load('user.user.user_picture');
     $this->assertTrue($field instanceof FieldConfigInterface);
-    $this->assertIdentical('user', $field->getTargetEntityTypeId());
-    $this->assertIdentical('user', $field->getTargetBundle());
-    $this->assertIdentical('user_picture', $field->getName());
+    $this->assertSame('user', $field->getTargetEntityTypeId());
+    $this->assertSame('user', $field->getTargetBundle());
+    $this->assertSame('user_picture', $field->getName());
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldTest.php
index 1389693024..79795f0448 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldTest.php
@@ -30,9 +30,9 @@ public function testUserPictureField() {
     /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */
     $field_storage = FieldStorageConfig::load('user.user_picture');
     $this->assertTrue($field_storage instanceof FieldStorageConfigInterface);
-    $this->assertIdentical('user.user_picture', $field_storage->id());
-    $this->assertIdentical('image', $field_storage->getType());
-    $this->assertIdentical('user', $field_storage->getTargetEntityTypeId());
+    $this->assertSame('user.user_picture', $field_storage->id());
+    $this->assertSame('image', $field_storage->getType());
+    $this->assertSame('user', $field_storage->getTargetEntityTypeId());
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityDisplayTest.php
index a4a203685f..ca7f26bc3e 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityDisplayTest.php
@@ -32,15 +32,15 @@ public function testUserProfileFields() {
 
     // Test a text field.
     $component = $display->getComponent('profile_color');
-    $this->assertIdentical('text_default', $component['type']);
+    $this->assertSame('text_default', $component['type']);
 
     // Test a list field.
     $component = $display->getComponent('profile_bands');
-    $this->assertIdentical('text_default', $component['type']);
+    $this->assertSame('text_default', $component['type']);
 
     // Test a date field.
     $component = $display->getComponent('profile_birthdate');
-    $this->assertIdentical('datetime_default', $component['type']);
+    $this->assertSame('datetime_default', $component['type']);
 
     // Test PROFILE_PRIVATE field is hidden.
     $this->assertNull($display->getComponent('profile_sell_address'));
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityFormDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityFormDisplayTest.php
index a2b01aa171..d64ff012bd 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityFormDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileEntityFormDisplayTest.php
@@ -32,15 +32,15 @@ public function testUserProfileEntityFormDisplay() {
 
     // Test a text field.
     $component = $display->getComponent('profile_color');
-    $this->assertIdentical('text_textfield', $component['type']);
+    $this->assertSame('text_textfield', $component['type']);
 
     // Test a list field.
     $component = $display->getComponent('profile_bands');
-    $this->assertIdentical('text_textfield', $component['type']);
+    $this->assertSame('text_textfield', $component['type']);
 
     // Test a date field.
     $component = $display->getComponent('profile_birthdate');
-    $this->assertIdentical('datetime_default', $component['type']);
+    $this->assertSame('datetime_default', $component['type']);
 
     // Test PROFILE_PRIVATE field is hidden.
     $this->assertNull($display->getComponent('profile_sell_address'));
@@ -50,8 +50,8 @@ public function testUserProfileEntityFormDisplay() {
 
     // Test that a checkbox field has the proper display label setting.
     $component = $display->getComponent('profile_love_migrations');
-    $this->assertIdentical('boolean_checkbox', $component['type']);
-    $this->assertIdentical(TRUE, $component['settings']['display_label']);
+    $this->assertSame('boolean_checkbox', $component['type']);
+    $this->assertSame(TRUE, $component['settings']['display_label']);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldInstanceTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldInstanceTest.php
index 9713332587..37b990a5a7 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldInstanceTest.php
@@ -34,43 +34,43 @@ protected function setUp() {
   public function testUserProfileFields() {
     // Migrated a text field.
     $field = FieldConfig::load('user.user.profile_color');
-    $this->assertIdentical('Favorite color', $field->label());
-    $this->assertIdentical('List your favorite color', $field->getDescription());
+    $this->assertSame('Favorite color', $field->label());
+    $this->assertSame('List your favorite color', $field->getDescription());
 
     // Migrated a textarea.
     $field = FieldConfig::load('user.user.profile_biography');
-    $this->assertIdentical('Biography', $field->label());
-    $this->assertIdentical('Tell people a little bit about yourself', $field->getDescription());
+    $this->assertSame('Biography', $field->label());
+    $this->assertSame('Tell people a little bit about yourself', $field->getDescription());
 
     // Migrated checkbox field.
     $field = FieldConfig::load('user.user.profile_sell_address');
-    $this->assertIdentical('Sell your email address?', $field->label());
-    $this->assertIdentical("If you check this box, we'll sell your address to spammers to help line the pockets of our shareholders. Thanks!", $field->getDescription());
+    $this->assertSame('Sell your email address?', $field->label());
+    $this->assertSame("If you check this box, we'll sell your address to spammers to help line the pockets of our shareholders. Thanks!", $field->getDescription());
 
     // Migrated selection field.
     $field = FieldConfig::load('user.user.profile_sold_to');
-    $this->assertIdentical('Sales Category', $field->label());
-    $this->assertIdentical("Select the sales categories to which this user's address was sold.", $field->getDescription());
+    $this->assertSame('Sales Category', $field->label());
+    $this->assertSame("Select the sales categories to which this user's address was sold.", $field->getDescription());
 
     // Migrated list field.
     $field = FieldConfig::load('user.user.profile_bands');
-    $this->assertIdentical('Favorite bands', $field->label());
-    $this->assertIdentical("Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites.", $field->getDescription());
+    $this->assertSame('Favorite bands', $field->label());
+    $this->assertSame("Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites.", $field->getDescription());
 
     // Migrated URL field.
     $field = FieldConfig::load('user.user.profile_blog');
-    $this->assertIdentical('Blog', $field->label());
-    $this->assertIdentical("Paste the full URL, including http://, of your personal blog.", $field->getDescription());
+    $this->assertSame('Blog', $field->label());
+    $this->assertSame("Paste the full URL, including http://, of your personal blog.", $field->getDescription());
 
     // Migrated date field.
     $field = FieldConfig::load('user.user.profile_birthdate');
-    $this->assertIdentical('Birthdate', $field->label());
-    $this->assertIdentical("Enter your birth date and we'll send you a coupon.", $field->getDescription());
+    $this->assertSame('Birthdate', $field->label());
+    $this->assertSame("Enter your birth date and we'll send you a coupon.", $field->getDescription());
 
     // Another migrated checkbox field, with a different source visibility setting.
     $field = FieldConfig::load('user.user.profile_love_migrations');
-    $this->assertIdentical('I love migrations', $field->label());
-    $this->assertIdentical("If you check this box, you love migrations.", $field->getDescription());
+    $this->assertSame('I love migrations', $field->label());
+    $this->assertSame("If you check this box, you love migrations.", $field->getDescription());
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldTest.php
index 75bccf14be..3fb080ce08 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldTest.php
@@ -26,20 +26,20 @@ protected function setUp() {
   public function testUserProfileFields() {
     // Migrated a text field.
     $field_storage = FieldStorageConfig::load('user.profile_color');
-    $this->assertIdentical('text', $field_storage->getType(), 'Field type is text.');
-    $this->assertIdentical(1, $field_storage->getCardinality(), 'Text field has correct cardinality');
+    $this->assertSame('text', $field_storage->getType(), 'Field type is text.');
+    $this->assertSame(1, $field_storage->getCardinality(), 'Text field has correct cardinality');
 
     // Migrated a textarea.
     $field_storage = FieldStorageConfig::load('user.profile_biography');
-    $this->assertIdentical('text_long', $field_storage->getType(), 'Field type is text_long.');
+    $this->assertSame('text_long', $field_storage->getType(), 'Field type is text_long.');
 
     // Migrated checkbox field.
     $field_storage = FieldStorageConfig::load('user.profile_sell_address');
-    $this->assertIdentical('boolean', $field_storage->getType(), 'Field type is boolean.');
+    $this->assertSame('boolean', $field_storage->getType(), 'Field type is boolean.');
 
     // Migrated selection field.
     $field_storage = FieldStorageConfig::load('user.profile_sold_to');
-    $this->assertIdentical('list_string', $field_storage->getType(), 'Field type is list_string.');
+    $this->assertSame('list_string', $field_storage->getType(), 'Field type is list_string.');
     $settings = $field_storage->getSettings();
     $this->assertEqual($settings['allowed_values'], [
       'Pill spammers' => 'Pill spammers',
@@ -50,21 +50,21 @@ public function testUserProfileFields() {
       'Faithful servant' => 'Faithful servant',
       'Anonymous donor' => 'Anonymous donor',
     ]);
-    $this->assertIdentical('list_string', $field_storage->getType(), 'Field type is list_string.');
+    $this->assertSame('list_string', $field_storage->getType(), 'Field type is list_string.');
 
     // Migrated list field.
     $field_storage = FieldStorageConfig::load('user.profile_bands');
-    $this->assertIdentical('text', $field_storage->getType(), 'Field type is text.');
-    $this->assertIdentical(-1, $field_storage->getCardinality(), 'List field has correct cardinality');
+    $this->assertSame('text', $field_storage->getType(), 'Field type is text.');
+    $this->assertSame(-1, $field_storage->getCardinality(), 'List field has correct cardinality');
 
     // Migrated URL field.
     $field_storage = FieldStorageConfig::load('user.profile_blog');
-    $this->assertIdentical('link', $field_storage->getType(), 'Field type is link.');
+    $this->assertSame('link', $field_storage->getType(), 'Field type is link.');
 
     // Migrated date field.
     $field_storage = FieldStorageConfig::load('user.profile_birthdate');
-    $this->assertIdentical('datetime', $field_storage->getType(), 'Field type is datetime.');
-    $this->assertIdentical('date', $field_storage->getSettings()['datetime_type']);
+    $this->assertSame('datetime', $field_storage->getType(), 'Field type is datetime.');
+    $this->assertSame('date', $field_storage->getSettings()['datetime_type']);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php
index eed2be8e79..c401a34fb9 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php
@@ -31,20 +31,20 @@ protected function setUp() {
   public function testUserMail() {
     $config = $this->config('user.mail');
 
-    $this->assertIdentical('Account details for [user:name] at [site:name] (approved)', $config->get('status_activated.subject'));
-    $this->assertIdentical("[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\n\nOnce you have set your own password, you will be able to log in to [site:login-url] in the future using:\n\nusername: [user:name]\n", $config->get('status_activated.body'));
-    $this->assertIdentical('Replacement login information for [user:name] at [site:name]', $config->get('password_reset.subject'));
-    $this->assertIdentical("[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in to [site:url-brief] by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.", $config->get('password_reset.body'));
-    $this->assertIdentical('Account details for [user:name] at [site:name] (deleted)', $config->get('cancel_confirm.subject'));
-    $this->assertIdentical("[user:name],\n\nYour account on [site:name] has been deleted.", $config->get('cancel_confirm.body'));
-    $this->assertIdentical('An administrator created an account for you at [site:name]', $config->get('register_admin_created.subject'));
-    $this->assertIdentical("[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in to [site:login-url] using the following username and password:\n\nusername: [user:name]\npassword: \n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\n\n\n--  [site:name] team", $config->get('register_admin_created.body'));
-    $this->assertIdentical('Account details for [user:name] at [site:name]', $config->get('register_no_approval_required.subject'));
-    $this->assertIdentical("[user:name],\n\nThank you for registering at [site:name]. You may now log in to [site:login-url] using the following username and password:\n\nusername: [user:name]\npassword: \n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\n\n\n--  [site:name] team", $config->get('register_no_approval_required.body'));
-    $this->assertIdentical('Account details for [user:name] at [site:name] (pending admin approval)', $config->get('register_pending_approval.subject'));
-    $this->assertIdentical("[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n--  [site:name] team", $config->get('register_pending_approval.body'));
-    $this->assertIdentical('Account details for [user:name] at [site:name] (blocked)', $config->get('status_blocked.subject'));
-    $this->assertIdentical("[user:name],\n\nYour account on [site:name] has been blocked.", $config->get('status_blocked.body'));
+    $this->assertSame('Account details for [user:name] at [site:name] (approved)', $config->get('status_activated.subject'));
+    $this->assertSame("[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\n\nOnce you have set your own password, you will be able to log in to [site:login-url] in the future using:\n\nusername: [user:name]\n", $config->get('status_activated.body'));
+    $this->assertSame('Replacement login information for [user:name] at [site:name]', $config->get('password_reset.subject'));
+    $this->assertSame("[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in to [site:url-brief] by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.", $config->get('password_reset.body'));
+    $this->assertSame('Account details for [user:name] at [site:name] (deleted)', $config->get('cancel_confirm.subject'));
+    $this->assertSame("[user:name],\n\nYour account on [site:name] has been deleted.", $config->get('cancel_confirm.body'));
+    $this->assertSame('An administrator created an account for you at [site:name]', $config->get('register_admin_created.subject'));
+    $this->assertSame("[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in to [site:login-url] using the following username and password:\n\nusername: [user:name]\npassword: \n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\n\n\n--  [site:name] team", $config->get('register_admin_created.body'));
+    $this->assertSame('Account details for [user:name] at [site:name]', $config->get('register_no_approval_required.subject'));
+    $this->assertSame("[user:name],\n\nThank you for registering at [site:name]. You may now log in to [site:login-url] using the following username and password:\n\nusername: [user:name]\npassword: \n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n[user:one-time-login-url]\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\n\n\n--  [site:name] team", $config->get('register_no_approval_required.body'));
+    $this->assertSame('Account details for [user:name] at [site:name] (pending admin approval)', $config->get('register_pending_approval.subject'));
+    $this->assertSame("[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n--  [site:name] team", $config->get('register_pending_approval.body'));
+    $this->assertSame('Account details for [user:name] at [site:name] (blocked)', $config->get('status_blocked.subject'));
+    $this->assertSame("[user:name],\n\nYour account on [site:name] has been blocked.", $config->get('status_blocked.body'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'user.mail', $config->get());
   }
 
@@ -53,11 +53,11 @@ public function testUserMail() {
    */
   public function testUserSettings() {
     $config = $this->config('user.settings');
-    $this->assertIdentical(TRUE, $config->get('notify.status_blocked'));
-    $this->assertIdentical(FALSE, $config->get('notify.status_activated'));
-    $this->assertIdentical(FALSE, $config->get('verify_mail'));
-    $this->assertIdentical('admin_only', $config->get('register'));
-    $this->assertIdentical('Guest', $config->get('anonymous'));
+    $this->assertSame(TRUE, $config->get('notify.status_blocked'));
+    $this->assertSame(FALSE, $config->get('notify.status_activated'));
+    $this->assertSame(FALSE, $config->get('verify_mail'));
+    $this->assertSame('admin_only', $config->get('register'));
+    $this->assertSame('Guest', $config->get('anonymous'));
 
     // Tests migration of user_register using the AccountSettingsForm.
 
@@ -82,7 +82,7 @@ public function testUserSettings() {
       $migration->getIdMap()->prepareUpdate();
       $this->executeMigration($migration);
       $form = $this->container->get('form_builder')->getForm(AccountSettingsForm::create($this->container));
-      $this->assertIdentical($map[1], $form['registration_cancellation']['user_register']['#value']);
+      $this->assertSame($map[1], $form['registration_cancellation']['user_register']['#value']);
     }
   }
 
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
index fcdaa25426..4144626419 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
@@ -34,15 +34,15 @@ public function testUserContactSettings() {
     $module = $key = 'contact';
     $uid = 2;
     $setting = $user_data->get($module, $uid, $key);
-    $this->assertIdentical('1', $setting);
+    $this->assertSame('1', $setting);
 
     $uid = 8;
     $setting = $user_data->get($module, $uid, $key);
-    $this->assertIdentical('0', $setting);
+    $this->assertSame('0', $setting);
 
     $uid = 15;
     $setting = $user_data->get($module, $uid, $key);
-    $this->assertIdentical(NULL, $setting);
+    $this->assertSame(NULL, $setting);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureFileTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureFileTest.php
index 1d28e2a7dc..bd5df4abdf 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureFileTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureFileTest.php
@@ -36,16 +36,16 @@ public function testUserPictures() {
     $files = File::loadMultiple($file_ids);
     /** @var \Drupal\file\FileInterface $file */
     $file = array_shift($files);
-    $this->assertIdentical('image-test.jpg', $file->getFilename());
-    $this->assertIdentical('public://image-test.jpg', $file->getFileUri());
-    $this->assertIdentical('2', $file->getOwnerId());
-    $this->assertIdentical('1901', $file->getSize());
-    $this->assertIdentical('image/jpeg', $file->getMimeType());
+    $this->assertSame('image-test.jpg', $file->getFilename());
+    $this->assertSame('public://image-test.jpg', $file->getFileUri());
+    $this->assertSame('2', $file->getOwnerId());
+    $this->assertSame('1901', $file->getSize());
+    $this->assertSame('image/jpeg', $file->getMimeType());
 
     $file = array_shift($files);
-    $this->assertIdentical('image-test.png', $file->getFilename());
-    $this->assertIdentical('public://image-test.png', $file->getFileUri());
-    $this->assertIdentical('8', $file->getOwnerId());
+    $this->assertSame('image-test.png', $file->getFilename());
+    $this->assertSame('public://image-test.png', $file->getFileUri());
+    $this->assertSame('8', $file->getOwnerId());
     $this->assertFalse($files);
   }
 
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
index e734517a5e..6fec3a3065 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
@@ -40,32 +40,32 @@ protected function setUp() {
   public function testUserProfileValues() {
     $user = User::load(2);
     $this->assertFalse(is_null($user));
-    $this->assertIdentical('red', $user->profile_color->value);
+    $this->assertSame('red', $user->profile_color->value);
     $expected = <<<EOT
 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nulla sapien, congue nec risus ut, adipiscing aliquet felis. Maecenas quis justo vel nulla varius euismod. Quisque metus metus, cursus sit amet sem non, bibendum vehicula elit. Cras dui nisl, eleifend at iaculis vitae, lacinia ut felis. Nullam aliquam ligula volutpat nulla consectetur accumsan. Maecenas tincidunt molestie diam, a accumsan enim fringilla sit amet. Morbi a tincidunt tellus. Donec imperdiet scelerisque porta. Sed quis sem bibendum eros congue sodales. Vivamus vel fermentum est, at rutrum orci. Nunc consectetur purus ut dolor pulvinar, ut volutpat felis congue. Cras tincidunt odio sed neque sollicitudin, vehicula tempor metus scelerisque.
 EOT;
-    $this->assertIdentical($expected, $user->profile_biography->value);
-    $this->assertIdentical('1', $user->profile_sell_address->value);
-    $this->assertIdentical('Back\slash', $user->profile_sold_to->value);
-    $this->assertIdentical('AC/DC', $user->profile_bands[0]->value);
-    $this->assertIdentical('Eagles', $user->profile_bands[1]->value);
-    $this->assertIdentical('Elton John', $user->profile_bands[2]->value);
-    $this->assertIdentical('Lemonheads', $user->profile_bands[3]->value);
-    $this->assertIdentical('Rolling Stones', $user->profile_bands[4]->value);
-    $this->assertIdentical('Queen', $user->profile_bands[5]->value);
-    $this->assertIdentical('The White Stripes', $user->profile_bands[6]->value);
-    $this->assertIdentical('1974-06-02', $user->profile_birthdate->value);
-    $this->assertIdentical('http://example.com/blog', $user->profile_blog->uri);
+    $this->assertSame($expected, $user->profile_biography->value);
+    $this->assertSame('1', $user->profile_sell_address->value);
+    $this->assertSame('Back\slash', $user->profile_sold_to->value);
+    $this->assertSame('AC/DC', $user->profile_bands[0]->value);
+    $this->assertSame('Eagles', $user->profile_bands[1]->value);
+    $this->assertSame('Elton John', $user->profile_bands[2]->value);
+    $this->assertSame('Lemonheads', $user->profile_bands[3]->value);
+    $this->assertSame('Rolling Stones', $user->profile_bands[4]->value);
+    $this->assertSame('Queen', $user->profile_bands[5]->value);
+    $this->assertSame('The White Stripes', $user->profile_bands[6]->value);
+    $this->assertSame('1974-06-02', $user->profile_birthdate->value);
+    $this->assertSame('http://example.com/blog', $user->profile_blog->uri);
     $this->assertNull($user->profile_blog->title);
-    $this->assertIdentical([], $user->profile_blog->options);
-    $this->assertIdentical('http://example.com/blog', $user->profile_blog->uri);
+    $this->assertSame([], $user->profile_blog->options);
+    $this->assertSame('http://example.com/blog', $user->profile_blog->uri);
     $this->assertNull($user->profile_love_migrations->value);
 
     $user = User::load(8);
-    $this->assertIdentical('Forward/slash', $user->profile_sold_to->value);
+    $this->assertSame('Forward/slash', $user->profile_sold_to->value);
 
     $user = User::load(15);
-    $this->assertIdentical('Dot.in.the.middle', $user->profile_sold_to->value);
+    $this->assertSame('Dot.in.the.middle', $user->profile_sold_to->value);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php
index af2eec9128..cd2e1af5e1 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php
@@ -34,7 +34,7 @@ public function testMigration() {
         'default_config_hash' => 'UYfMzeP1S8jKm9PSvxf7nQNe8DsNS-3bc2WSNNXBQWs',
       ],
     ];
-    $this->assertIdentical($expected, $this->config('user.flood')->get());
+    $this->assertSame($expected, $this->config('user.flood')->get());
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php
index 35c9ca330f..1232a49a10 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php
@@ -25,20 +25,20 @@ protected function setUp() {
    */
   public function testMigration() {
     $config = $this->config('user.mail');
-    $this->assertIdentical('Your account is approved!', $config->get('status_activated.subject'));
-    $this->assertIdentical('Your account was activated, and there was much rejoicing.', $config->get('status_activated.body'));
-    $this->assertIdentical('Fix your password', $config->get('password_reset.subject'));
-    $this->assertIdentical("Nope! You're locked out forever.", $config->get('password_reset.body'));
-    $this->assertIdentical('So long, bub', $config->get('cancel_confirm.subject'));
-    $this->assertIdentical('The gates of Drupal are closed to you. Now you will work in the salt mines.', $config->get('cancel_confirm.body'));
-    $this->assertIdentical('Gawd made you an account', $config->get('register_admin_created.subject'));
-    $this->assertIdentical('...and she could take it away.', $config->get('register_admin_created.body'));
-    $this->assertIdentical('Welcome!', $config->get('register_no_approval_required.subject'));
-    $this->assertIdentical('You can now log in if you can figure out how to use Drupal!', $config->get('register_no_approval_required.body'));
-    $this->assertIdentical('Soon...', $config->get('register_pending_approval.subject'));
-    $this->assertIdentical('...you will join our Circle. Let the Drupal flow through you.', $config->get('register_pending_approval.body'));
-    $this->assertIdentical('BEGONE!', $config->get('status_blocked.subject'));
-    $this->assertIdentical('You no longer please the robot overlords. Go to your room and chill out.', $config->get('status_blocked.body'));
+    $this->assertSame('Your account is approved!', $config->get('status_activated.subject'));
+    $this->assertSame('Your account was activated, and there was much rejoicing.', $config->get('status_activated.body'));
+    $this->assertSame('Fix your password', $config->get('password_reset.subject'));
+    $this->assertSame("Nope! You're locked out forever.", $config->get('password_reset.body'));
+    $this->assertSame('So long, bub', $config->get('cancel_confirm.subject'));
+    $this->assertSame('The gates of Drupal are closed to you. Now you will work in the salt mines.', $config->get('cancel_confirm.body'));
+    $this->assertSame('Gawd made you an account', $config->get('register_admin_created.subject'));
+    $this->assertSame('...and she could take it away.', $config->get('register_admin_created.body'));
+    $this->assertSame('Welcome!', $config->get('register_no_approval_required.subject'));
+    $this->assertSame('You can now log in if you can figure out how to use Drupal!', $config->get('register_no_approval_required.body'));
+    $this->assertSame('Soon...', $config->get('register_pending_approval.subject'));
+    $this->assertSame('...you will join our Circle. Let the Drupal flow through you.', $config->get('register_pending_approval.body'));
+    $this->assertSame('BEGONE!', $config->get('status_blocked.subject'));
+    $this->assertSame('You no longer please the robot overlords. Go to your room and chill out.', $config->get('status_blocked.body'));
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php
index 9b5a7725d7..379f26568e 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php
@@ -36,7 +36,7 @@ protected function assertEntity($id, $label, $original_rid) {
     /** @var \Drupal\user\RoleInterface $entity */
     $entity = Role::load($id);
     $this->assertTrue($entity instanceof RoleInterface);
-    $this->assertIdentical($label, $entity->label());
+    $this->assertSame($label, $entity->label());
 
     if (isset($original_rid)) {
       $permissions = Database::getConnection('default', 'migrate')
@@ -46,7 +46,7 @@ protected function assertEntity($id, $label, $original_rid) {
         ->execute()
         ->fetchCol();
       sort($permissions);
-      $this->assertIdentical($permissions, $entity->getPermissions());
+      $this->assertSame($permissions, $entity->getPermissions());
     }
   }
 
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php
index 85f0688d96..fc7d3df097 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php
@@ -20,9 +20,9 @@ class UserMigrationClassTest extends MigrateDrupal7TestBase {
   public function testClass() {
     $migration = $this->getMigration('d7_user');
     /** @var \Drupal\migrate\Plugin\MigrationInterface[] $migrations */
-    $this->assertIdentical('d7_user', $migration->id());
+    $this->assertSame('d7_user', $migration->id());
     $process = $migration->getProcess();
-    $this->assertIdentical('field_file', $process['field_file'][0]['source']);
+    $this->assertSame('field_file', $process['field_file'][0]['source']);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
index b3d7ff1e1a..b9387af15c 100644
--- a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
+++ b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
@@ -92,24 +92,24 @@ public function testUserTempStore() {
       $this->assertEqual(!$i, $stores[0]->setIfNotExists($key, $this->objects[$i]));
       $metadata = $stores[0]->getMetadata($key);
       $this->assertEqual($users[0], $metadata->owner);
-      $this->assertIdenticalObject($this->objects[0], $stores[0]->get($key));
+      $this->assertSameObject($this->objects[0], $stores[0]->get($key));
       // Another user should get the same result.
       $metadata = $stores[1]->getMetadata($key);
       $this->assertEqual($users[0], $metadata->owner);
-      $this->assertIdenticalObject($this->objects[0], $stores[1]->get($key));
+      $this->assertSameObject($this->objects[0], $stores[1]->get($key));
     }
 
     // Remove the item and try to set it again.
     $stores[0]->delete($key);
     $stores[0]->setIfNotExists($key, $this->objects[1]);
     // This time it should succeed.
-    $this->assertIdenticalObject($this->objects[1], $stores[0]->get($key));
+    $this->assertSameObject($this->objects[1], $stores[0]->get($key));
 
     // This user can update the object.
     $stores[0]->set($key, $this->objects[2]);
-    $this->assertIdenticalObject($this->objects[2], $stores[0]->get($key));
+    $this->assertSameObject($this->objects[2], $stores[0]->get($key));
     // The object is the same when another user loads it.
-    $this->assertIdenticalObject($this->objects[2], $stores[1]->get($key));
+    $this->assertSameObject($this->objects[2], $stores[1]->get($key));
 
     // This user should be allowed to get, update, delete.
     $this->assertTrue($stores[0]->getIfOwner($key) instanceof \stdClass);
@@ -118,8 +118,8 @@ public function testUserTempStore() {
 
     // Another user can update the object and become the owner.
     $stores[1]->set($key, $this->objects[3]);
-    $this->assertIdenticalObject($this->objects[3], $stores[0]->get($key));
-    $this->assertIdenticalObject($this->objects[3], $stores[1]->get($key));
+    $this->assertSameObject($this->objects[3], $stores[0]->get($key));
+    $this->assertSameObject($this->objects[3], $stores[1]->get($key));
     $metadata = $stores[1]->getMetadata($key);
     $this->assertEqual($users[1], $metadata->owner);
 
diff --git a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
index 643302192c..4f0f79e5d0 100644
--- a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
+++ b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
@@ -83,7 +83,7 @@ public function testUserEditForm() {
 
     // Verify that autocomplete is off on all account fields.
     foreach (['mail', 'name', 'pass'] as $key) {
-      $this->assertIdentical($form['account'][$key]['#attributes']['autocomplete'], 'off', "'$key' field: 'autocomplete' attribute is 'off'.");
+      $this->assertSame($form['account'][$key]['#attributes']['autocomplete'], 'off', "'$key' field: 'autocomplete' attribute is 'off'.");
     }
   }
 
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php
index 504c63303a..4487c617ed 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php
@@ -51,7 +51,7 @@ public function testFilterCurrentUserAsAnonymous() {
     $expected[] = ['uid' => 2];
     $expected[] = ['uid' => 3];
     $expected[] = ['uid' => 4];
-    $this->assertIdenticalResultset($view, $expected, $column_map, 'Anonymous account can view all accounts when current filter is FALSE.');
+    $this->assertSameResultset($view, $expected, $column_map, 'Anonymous account can view all accounts when current filter is FALSE.');
     $view->destroy();
 
     $view = Views::getView('test_filter_current_user');
@@ -59,7 +59,7 @@ public function testFilterCurrentUserAsAnonymous() {
     $view->filter['uid_current']->value = 1;
     $this->executeView($view);
     $expected = [];
-    $this->assertIdenticalResultset($view, $expected, $column_map, 'Anonymous account can view zero accounts when current filter is TRUE.');
+    $this->assertSameResultset($view, $expected, $column_map, 'Anonymous account can view zero accounts when current filter is TRUE.');
     $view->destroy();
   }
 
@@ -79,7 +79,7 @@ public function testFilterCurrentUserAsUser() {
     $expected[] = ['uid' => 2];
     $expected[] = ['uid' => 3];
     $expected[] = ['uid' => 4];
-    $this->assertIdenticalResultset($view, $expected, $column_map, 'User can view all users except itself when current filter is FALSE.');
+    $this->assertSameResultset($view, $expected, $column_map, 'User can view all users except itself when current filter is FALSE.');
     $view->destroy();
 
     $view = Views::getView('test_filter_current_user');
@@ -88,7 +88,7 @@ public function testFilterCurrentUserAsUser() {
     $this->executeView($view);
     $expected = [];
     $expected[] = ['uid' => 1];
-    $this->assertIdenticalResultset($view, $expected, $column_map, 'User can only view itself when current filter is TRUE.');
+    $this->assertSameResultset($view, $expected, $column_map, 'User can only view itself when current filter is TRUE.');
     $view->destroy();
   }
 
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php
index b005f62ada..cc56306507 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php
@@ -43,7 +43,7 @@ public function testFilterPermission() {
     $expected[] = ['uid' => 2];
     $expected[] = ['uid' => 3];
     $expected[] = ['uid' => 4];
-    $this->assertIdenticalResultset($view, $expected, $column_map);
+    $this->assertSameResultset($view, $expected, $column_map);
     $view->destroy();
 
     // Filter by a permission.
@@ -54,7 +54,7 @@ public function testFilterPermission() {
     $expected = [];
     $expected[] = ['uid' => 3];
     $expected[] = ['uid' => 4];
-    $this->assertIdenticalResultset($view, $expected, $column_map);
+    $this->assertSameResultset($view, $expected, $column_map);
     $view->destroy();
 
     // Filter by not a permission.
@@ -67,7 +67,7 @@ public function testFilterPermission() {
     $expected[] = ['uid' => 1];
     $expected[] = ['uid' => 2];
     $expected[] = ['uid' => 3];
-    $this->assertIdenticalResultset($view, $expected, $column_map);
+    $this->assertSameResultset($view, $expected, $column_map);
     $view->destroy();
 
     // Filter by not multiple permissions, that are present in multiple roles.
@@ -79,7 +79,7 @@ public function testFilterPermission() {
     $expected = [];
     $expected[] = ['uid' => 1];
     $expected[] = ['uid' => 2];
-    $this->assertIdenticalResultset($view, $expected, $column_map);
+    $this->assertSameResultset($view, $expected, $column_map);
     $view->destroy();
 
     // Filter by another permission of a role with multiple permissions.
@@ -89,7 +89,7 @@ public function testFilterPermission() {
     $this->assertEqual(count($view->result), 1);
     $expected = [];
     $expected[] = ['uid' => 4];
-    $this->assertIdenticalResultset($view, $expected, $column_map);
+    $this->assertSameResultset($view, $expected, $column_map);
     $view->destroy();
 
     $view->initDisplay();
diff --git a/core/modules/user/tests/src/Traits/UserCreationTrait.php b/core/modules/user/tests/src/Traits/UserCreationTrait.php
index ccccfa77ff..5150e1517e 100644
--- a/core/modules/user/tests/src/Traits/UserCreationTrait.php
+++ b/core/modules/user/tests/src/Traits/UserCreationTrait.php
@@ -149,7 +149,7 @@ protected function createRole(array $permissions, $rid = NULL, $name = NULL, $we
     }
     $result = $role->save();
 
-    $this->assertIdentical($result, SAVED_NEW, SafeMarkup::format('Created role ID @rid with name @name.', [
+    $this->assertSame($result, SAVED_NEW, SafeMarkup::format('Created role ID @rid with name @name.', [
       '@name' => var_export($role->label(), TRUE),
       '@rid' => var_export($role->id(), TRUE),
     ]), 'Role');
diff --git a/core/modules/views/src/Tests/FieldApiDataTest.php b/core/modules/views/src/Tests/FieldApiDataTest.php
index f6d5159dd8..143c321d26 100644
--- a/core/modules/views/src/Tests/FieldApiDataTest.php
+++ b/core/modules/views/src/Tests/FieldApiDataTest.php
@@ -287,7 +287,7 @@ public function testEntityFieldFilter() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
 
     // Filter by 'field name 1: fr'.
@@ -304,7 +304,7 @@ public function testEntityFieldFilter() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
 
     // Filter by 'field name 2: es'.
@@ -329,7 +329,7 @@ public function testEntityFieldFilter() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
 
     // Filter by 'field name 2: fr', which doesn't exist.
@@ -337,7 +337,7 @@ public function testEntityFieldFilter() {
     $this->executeView($view);
     $expected = [];
 
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
 
     // Filter by 'field name 3: es'.
@@ -359,7 +359,7 @@ public function testEntityFieldFilter() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
 
     // Filter by 'field name 3: fr'.
@@ -372,7 +372,7 @@ public function testEntityFieldFilter() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
   }
 
diff --git a/core/modules/views/src/Tests/ViewResultAssertionTrait.php b/core/modules/views/src/Tests/ViewResultAssertionTrait.php
index 00501f5f0d..d09741393a 100644
--- a/core/modules/views/src/Tests/ViewResultAssertionTrait.php
+++ b/core/modules/views/src/Tests/ViewResultAssertionTrait.php
@@ -30,14 +30,14 @@
    * @return bool
    *   TRUE if the assertion succeeded, or FALSE otherwise.
    */
-  protected function assertIdenticalResultset($view, $expected_result, $column_map = [], $message = NULL) {
-    return $this->assertIdenticalResultsetHelper($view, $expected_result, $column_map, 'assertIdentical', $message);
+  protected function assertSameResultset($view, $expected_result, $column_map = [], $message = NULL) {
+    return $this->assertSameResultsetHelper($view, $expected_result, $column_map, 'assertSame', $message);
   }
 
   /**
    * Verifies that a result set returned by a View differs from certain values.
    *
-   * Inverse of ViewsTestCase::assertIdenticalResultset().
+   * Inverse of ViewsTestCase::assertSameResultset().
    *
    * @param \Drupal\views\ViewExecutable $view
    *   An executed View.
@@ -54,13 +54,13 @@ protected function assertIdenticalResultset($view, $expected_result, $column_map
    *   TRUE if the assertion succeeded, or FALSE otherwise.
    */
   protected function assertNotIdenticalResultset($view, $expected_result, $column_map = [], $message = NULL) {
-    return $this->assertIdenticalResultsetHelper($view, $expected_result, $column_map, 'assertNotIdentical', $message);
+    return $this->assertSameResultsetHelper($view, $expected_result, $column_map, 'assertNotIdentical', $message);
   }
 
   /**
    * Performs View result assertions.
    *
-   * This is a helper method for ViewTestBase::assertIdenticalResultset() and
+   * This is a helper method for ViewTestBase::assertSameResultset() and
    * ViewTestBase::assertNotIdenticalResultset().
    *
    * @param \Drupal\views\ViewExecutable $view
@@ -71,7 +71,7 @@ protected function assertNotIdenticalResultset($view, $expected_result, $column_
    *   An associative array mapping the columns of the result set
    *   from the view (as keys) and the expected result set (as values).
    * @param string $assert_method
-   *   The TestBase assertion method to use (either 'assertIdentical' or
+   *   The TestBase assertion method to use (either 'assertSame' or
    *   'assertNotIdentical').
    * @param string $message
    *   (optional) The message to display with the assertion.
@@ -79,7 +79,7 @@ protected function assertNotIdenticalResultset($view, $expected_result, $column_
    * @return bool
    *   TRUE if the assertion succeeded, or FALSE otherwise.
    */
-  protected function assertIdenticalResultsetHelper($view, $expected_result, $column_map, $assert_method, $message = NULL) {
+  protected function assertSameResultsetHelper($view, $expected_result, $column_map, $assert_method, $message = NULL) {
     // Convert $view->result to an array of arrays.
     $result = [];
     foreach ($view->result as $key => $value) {
diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
index 3e7d0b48b2..c2a29f2584 100644
--- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
@@ -216,7 +216,7 @@ public function testArchiveView() {
         'num_records' => 2,
       ],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $column_map);
+    $this->assertSameResultset($view, $expected_result, $column_map);
 
     $view->storage->setStatus(TRUE);
     $view->save();
diff --git a/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
index 993293cebf..d1de22d45e 100644
--- a/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
@@ -84,7 +84,7 @@ public function testFilterEntity() {
         'node'
       ],
     ];
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
 
     $this->executeView($view);
 
@@ -97,7 +97,7 @@ public function testFilterEntity() {
     foreach ($this->entityBundles as $key => $info) {
       $expected[$key] = $info['label'];
     }
-    $this->assertIdentical($view->filter['type']->getValueOptions(), $expected);
+    $this->assertSame($view->filter['type']->getValueOptions(), $expected);
 
     $view->destroy();
 
diff --git a/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php b/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php
index d73a11793b..e3b1499256 100644
--- a/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php
@@ -135,7 +135,7 @@ public function testLatestRevisionFilter() {
         $not_expected[] = $revision_id;
       }
     }
-    $this->assertIdenticalResultset($view, $expected, ['vid' => 'vid', 'title' => 'title'], 'The test view only shows the latest revisions.');
+    $this->assertSameResultset($view, $expected, ['vid' => 'vid', 'title' => 'title'], 'The test view only shows the latest revisions.');
     $this->assertNotInResultSet($view, $not_expected, 'Non-latest revisions are not shown by the view.');
     $view->destroy();
   }
diff --git a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
index ec3b52385f..5e4ed148e7 100644
--- a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
@@ -94,7 +94,7 @@ protected function _testOffset() {
     $expected_result = [
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test offset for between operator.
@@ -107,7 +107,7 @@ protected function _testOffset() {
     $expected_result = [
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
   }
 
   /**
@@ -125,7 +125,7 @@ protected function _testBetween() {
     $expected_result = [
       ['nid' => $this->nodes[1]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test between with just max.
@@ -137,7 +137,7 @@ protected function _testBetween() {
       ['nid' => $this->nodes[0]->id()],
       ['nid' => $this->nodes[1]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test not between with min and max.
@@ -151,7 +151,7 @@ protected function _testBetween() {
       ['nid' => $this->nodes[2]->id()],
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
     $view->destroy();
 
     // Test not between with just max.
@@ -163,7 +163,7 @@ protected function _testBetween() {
       ['nid' => $this->nodes[2]->id()],
       ['nid' => $this->nodes[3]->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->map);
+    $this->assertSameResultset($view, $expected_result, $this->map);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
index cffe6d1402..e525af11d3 100644
--- a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
@@ -212,7 +212,7 @@ public function testHandlerWeights() {
 
     foreach ($handler_types as $type) {
       $loaded_order = array_keys($view->display_handler->getOption($type));
-      $this->assertIdentical($original_order[$type], $loaded_order);
+      $this->assertSame($original_order[$type], $loaded_order);
     }
   }
 
diff --git a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
index b3956de8ea..401904e387 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
@@ -72,14 +72,14 @@ public function testArgumentDefaultPlugin() {
     $this->executeView($view);
     $this->assertEqual($view->argument[$id]->getValue(), 'John', 'The correct argument value is used.');
     $expected_result = [['name' => 'John']];
-    $this->assertIdenticalResultset($view, $expected_result, ['views_test_data_name' => 'name']);
+    $this->assertSameResultset($view, $expected_result, ['views_test_data_name' => 'name']);
 
     // Pass in value as argument to be sure that not the default value is used.
     $view->destroy();
     $this->executeView($view, ['George']);
     $this->assertEqual($view->argument[$id]->getValue(), 'George', 'The correct argument value is used.');
     $expected_result = [['name' => 'George']];
-    $this->assertIdenticalResultset($view, $expected_result, ['views_test_data_name' => 'name']);
+    $this->assertSameResultset($view, $expected_result, ['views_test_data_name' => 'name']);
   }
 
 
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
index 6748152987..c7ab24d12a 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
@@ -92,7 +92,7 @@ public function testDisplayPlugin() {
     $this->assertTrue($view->display_handler instanceof DisplayTestPlugin, 'The correct display handler instance is on the view object.');
 
     // Check the test option.
-    $this->assertIdentical($view->display_handler->getOption('test_option'), '');
+    $this->assertSame($view->display_handler->getOption('test_option'), '');
 
     $style = $view->display_handler->getOption('style');
     $style['type'] = 'test_style';
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
index eaa5aaa32f..f3c6a4d74a 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
@@ -322,7 +322,7 @@ protected function assertIds(array $ids) {
       $actual_ids[] = (int) $element->getText();
     }
 
-    return $this->assertIdentical($ids, $actual_ids);
+    return $this->assertSame($ids, $actual_ids);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
index 60424108f5..048737ed39 100644
--- a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
@@ -79,15 +79,15 @@ public function testFilterQuery() {
 
     // Check the data added.
     $where = $view->query->where;
-    $this->assertIdentical($where[0]['conditions'][0]['field'], 'views_test_data.name', 'Where condition field matches');
-    $this->assertIdentical($where[0]['conditions'][0]['value'], 'John', 'Where condition value matches');
-    $this->assertIdentical($where[0]['conditions'][0]['operator'], '=', 'Where condition operator matches');
+    $this->assertSame($where[0]['conditions'][0]['field'], 'views_test_data.name', 'Where condition field matches');
+    $this->assertSame($where[0]['conditions'][0]['value'], 'John', 'Where condition value matches');
+    $this->assertSame($where[0]['conditions'][0]['operator'], '=', 'Where condition operator matches');
 
     $this->executeView($view);
 
     // Check that our operator and value match on the filter.
-    $this->assertIdentical($view->filter['test_filter']->operator, '=');
-    $this->assertIdentical($view->filter['test_filter']->value, 'John');
+    $this->assertSame($view->filter['test_filter']->operator, '=');
+    $this->assertSame($view->filter['test_filter']->value, 'John');
 
     // Check that we have a single element, as a result of applying the '= John'
     // filter.
@@ -112,8 +112,8 @@ public function testFilterQuery() {
     $this->executeView($view);
 
     // Check that our operator and value match on the filter.
-    $this->assertIdentical($view->filter['test_filter']->operator, '<>');
-    $this->assertIdentical($view->filter['test_filter']->value, 'John');
+    $this->assertSame($view->filter['test_filter']->operator, '<>');
+    $this->assertSame($view->filter['test_filter']->value, 'John');
 
     // Check if we have the other elements in the dataset, as a result of
     // applying the '<> John' filter.
diff --git a/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php b/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
index 492d22f987..56f9cea8ba 100644
--- a/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
@@ -75,7 +75,7 @@ public function testMiniPagerRender() {
     $view = Views::getView('test_mini_pager');
     $view->setDisplay('page_4');
     $this->executeView($view);
-    $this->assertIdentical($view->get_total_rows, TRUE, 'The query was set to calculate the total number of rows.');
+    $this->assertSame($view->get_total_rows, TRUE, 'The query was set to calculate the total number of rows.');
     $this->assertEqual(count($this->nodes), $view->total_rows, 'The total row count is equal to the number of nodes.');
 
     $this->drupalGet('test_mini_pager_total', ['query' => ['page' => 1]]);
@@ -121,8 +121,8 @@ public function testMiniPagerRender() {
 
     $view = Views::getView('test_mini_pager');
     $this->executeView($view);
-    $this->assertIdentical($view->get_total_rows, NULL, 'The query was not forced to calculate the total number of results.');
-    $this->assertIdentical($view->total_rows, 1, 'The pager calculated the total number of rows.');
+    $this->assertSame($view->get_total_rows, NULL, 'The query was not forced to calculate the total number of results.');
+    $this->assertSame($view->total_rows, 1, 'The pager calculated the total number of rows.');
 
     // Remove the last node as well and ensure that no "Page 1" is shown.
     $this->nodes[19]->delete();
diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
index 3f6e1eca5f..a6acee77f5 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
@@ -25,7 +25,7 @@ public function testFormWrapper() {
     $this->drupalGet('test_bulk_form');
     // Ensure we have the form tag on the page.
     $xpath = $this->cssSelect('.views-form form');
-    $this->assertIdentical(count($xpath), 1, 'There is one views form on the page.');
+    $this->assertSame(count($xpath), 1, 'There is one views form on the page.');
     // Ensure we don't have nested form elements.
     $result = (bool) preg_match('#<form[^>]*?>(?!/form).*<form#s', $this->getRawContent());
     $this->assertFalse($result, 'The views form element is not nested.');
diff --git a/core/modules/views/tests/src/Functional/Update/BooleanFilterValuesUpdateTest.php b/core/modules/views/tests/src/Functional/Update/BooleanFilterValuesUpdateTest.php
index a4787c4471..e4e71e0047 100644
--- a/core/modules/views/tests/src/Functional/Update/BooleanFilterValuesUpdateTest.php
+++ b/core/modules/views/tests/src/Functional/Update/BooleanFilterValuesUpdateTest.php
@@ -34,7 +34,7 @@ public function testViewsPostUpdateBooleanFilterValues() {
     $view = View::load('test_boolean_filter_values');
     $data = $view->toArray();
     // Check that the field is using the expected string value.
-    $this->assertIdentical('1', $data['display']['default']['display_options']['filters']['status']['value']);
+    $this->assertSame('1', $data['display']['default']['display_options']['filters']['status']['value']);
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/BasicTest.php b/core/modules/views/tests/src/Kernel/BasicTest.php
index 4ef22b1408..4feb7b1d0a 100644
--- a/core/modules/views/tests/src/Kernel/BasicTest.php
+++ b/core/modules/views/tests/src/Kernel/BasicTest.php
@@ -30,7 +30,7 @@ public function testSimpleResultSet() {
 
     // Verify the result.
     $this->assertEqual(5, count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultset($view, $this->dataSet(), [
+    $this->assertSameResultset($view, $this->dataSet(), [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
@@ -89,7 +89,7 @@ public function testSimpleFiltering() {
 
     // Verify the result.
     $this->assertEqual(3, count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultSet($view, $dataset, [
+    $this->assertSameResultSet($view, $dataset, [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
@@ -115,7 +115,7 @@ public function testSimpleArgument() {
 
     // Verify the result.
     $this->assertEqual(1, count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultSet($view, $dataset, [
+    $this->assertSameResultSet($view, $dataset, [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
@@ -128,7 +128,7 @@ public function testSimpleArgument() {
     $dataset = $this->dataSet();
 
     $this->assertEqual(5, count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultSet($view, $dataset, [
+    $this->assertSameResultSet($view, $dataset, [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
index edf0fb0e10..770715d66f 100644
--- a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
@@ -45,7 +45,7 @@ public function testView() {
 
     $view = Views::getView('test_entity_multivalue_basefield');
     $view->execute();
-    $this->assertIdenticalResultset($view, [
+    $this->assertSameResultset($view, [
       ['name' => ['test']],
       ['name' => ['test2', 'test3']],
     ], ['name' => 'name']);
diff --git a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
index a110f00209..a485b6dcf1 100644
--- a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
@@ -145,7 +145,7 @@ public function testFieldRenderers() {
   public function testRevisionBaseTable() {
     $view = Views::getView('test_entity_row_renderers_revisions_base');
     $view->execute();
-    $this->assertIdenticalResultset($view, $this->ids, ['nid' => 'nid', 'uid' => 'uid']);
+    $this->assertSameResultset($view, $this->ids, ['nid' => 'nid', 'uid' => 'uid']);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
index 6eaba132d5..ffc3ad9fa1 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
@@ -36,7 +36,7 @@ public function testViewArea() {
     $view = Views::getView('test_area_view');
 
     // Tests \Drupal\views\Plugin\views\area\View::calculateDependencies().
-    $this->assertIdentical(['config' => ['views.view.test_simple_argument']], $view->getDependencies());
+    $this->assertSame(['config' => ['views.view.test_simple_argument']], $view->getDependencies());
 
     $this->executeView($view);
     $output = $view->render();
diff --git a/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php b/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php
index db26e11a8f..f1fedfb4da 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php
@@ -62,7 +62,7 @@ public function testCreatedFullDateHandler() {
     $this->executeView($view, ['20000102']);
     $expected = [];
     $expected[] = ['id' => 2];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('default');
@@ -72,13 +72,13 @@ public function testCreatedFullDateHandler() {
     $expected[] = ['id' => 3];
     $expected[] = ['id' => 4];
     $expected[] = ['id' => 5];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('default');
     $this->executeView($view, ['20001023']);
     $expected = [];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
   }
 
@@ -93,7 +93,7 @@ public function testDayHandler() {
     $this->executeView($view, ['02']);
     $expected = [];
     $expected[] = ['id' => 2];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_1');
@@ -103,13 +103,13 @@ public function testDayHandler() {
     $expected[] = ['id' => 3];
     $expected[] = ['id' => 4];
     $expected[] = ['id' => 5];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_1');
     $this->executeView($view, ['23']);
     $expected = [];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
   }
 
   /**
@@ -127,13 +127,13 @@ public function testMonthHandler() {
     $expected[] = ['id' => 3];
     $expected[] = ['id' => 4];
     $expected[] = ['id' => 5];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_2');
     $this->executeView($view, ['12']);
     $expected = [];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
   }
 
   /**
@@ -174,7 +174,7 @@ public function testWeekHandler() {
     $this->executeView($view, ['39']);
     $expected = [];
     $expected[] = ['id' => 1];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_3');
@@ -183,7 +183,7 @@ public function testWeekHandler() {
     $this->executeView($view, ['09']);
     $expected = [];
     $expected[] = ['id' => 2];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_3');
@@ -191,27 +191,27 @@ public function testWeekHandler() {
     $this->executeView($view, ['52']);
     $expected = [];
     $expected[] = ['id' => 3];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_3');
     $this->executeView($view, ['02']);
     $expected = [];
     $expected[] = ['id' => 4];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_3');
     $this->executeView($view, ['05']);
     $expected = [];
     $expected[] = ['id' => 5];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_3');
     $this->executeView($view, ['23']);
     $expected = [];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
   }
 
   /**
@@ -241,14 +241,14 @@ public function testYearHandler() {
     $expected = [];
     $expected[] = ['id' => 1];
     $expected[] = ['id' => 2];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_4');
     $this->executeView($view, ['2001']);
     $expected = [];
     $expected[] = ['id' => 3];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_4');
@@ -256,13 +256,13 @@ public function testYearHandler() {
     $expected = [];
     $expected[] = ['id' => 4];
     $expected[] = ['id' => 5];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_4');
     $this->executeView($view, ['23']);
     $expected = [];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
   }
 
   /**
@@ -292,14 +292,14 @@ public function testYearMonthHandler() {
     $expected = [];
     $expected[] = ['id' => 1];
     $expected[] = ['id' => 2];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_5');
     $this->executeView($view, ['200101']);
     $expected = [];
     $expected[] = ['id' => 3];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_5');
@@ -307,13 +307,13 @@ public function testYearMonthHandler() {
     $expected = [];
     $expected[] = ['id' => 4];
     $expected[] = ['id' => 5];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
     $view->destroy();
 
     $view->setDisplay('embed_5');
     $this->executeView($view, ['201301']);
     $expected = [];
-    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $this->assertSameResultset($view, $expected, $this->columnMap);
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
index 1d304f53a1..ffdc11969a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
@@ -232,7 +232,7 @@ public function testSimpleExecute() {
     $this->assertTrue($executable->field['id'] instanceof EntityField);
     $this->assertTrue($executable->field['field_test'] instanceof EntityField);
 
-    $this->assertIdenticalResultset($executable,
+    $this->assertSameResultset($executable,
       [
         ['id' => 1, 'field_test' => 3],
         ['id' => 2, 'field_test' => 0],
@@ -254,7 +254,7 @@ public function testSimpleRender() {
     $this->assertEqual('1', $executable->getStyle()->getField(0, 'id'));
     $this->assertEqual('3', $executable->getStyle()->getField(0, 'field_test'));
     $this->assertEqual('2', $executable->getStyle()->getField(1, 'id'));
-    // @todo Switch this assertion to assertIdentical('', ...) when
+    // @todo Switch this assertion to assertSame('', ...) when
     //   https://www.drupal.org/node/2488006 gets fixed.
     $this->assertEqual('0', $executable->getStyle()->getField(1, 'field_test'));
     $this->assertEqual('3', $executable->getStyle()->getField(2, 'id'));
@@ -303,7 +303,7 @@ public function testFieldAlias() {
     $this->assertTrue($executable->field['name'] instanceof EntityField);
     $this->assertTrue($executable->field['name_alias'] instanceof EntityField);
 
-    $this->assertIdenticalResultset($executable,
+    $this->assertSameResultset($executable,
       [
         ['id' => 1, 'name' => 'test 0', 'name_alias' => 'test 0'],
         ['id' => 2, 'name' => 'test 1', 'name_alias' => 'test 1'],
@@ -353,7 +353,7 @@ public function testComplexExecute() {
     $this->assertTrue($executable->field['field_test_multiple_2'] instanceof EntityField);
     $this->assertTrue($executable->field['timezone'] instanceof EntityField);
 
-    $this->assertIdenticalResultset($executable,
+    $this->assertSameResultset($executable,
       [
         ['timezone' => $timezones[0], 'field_test_multiple' => [1, 3], 'field_test_multiple_1' => [1, 3], 'field_test_multiple_2' => [1, 3]],
         ['timezone' => $timezones[1], 'field_test_multiple' => [7, 0], 'field_test_multiple_1' => [7, 0], 'field_test_multiple_2' => [7, 0]],
@@ -424,7 +424,7 @@ public function testRevisionExecute() {
     $this->assertTrue($executable->field['name'] instanceof EntityField);
     $this->assertTrue($executable->field['field_test'] instanceof EntityField);
 
-    $this->assertIdenticalResultset($executable,
+    $this->assertSameResultset($executable,
       [
         ['id' => 1, 'field_test' => 1, 'revision_id' => 1, 'name' => 'base value'],
         ['id' => 1, 'field_test' => 2, 'revision_id' => 2, 'name' => 'revision value1'],
@@ -482,7 +482,7 @@ public function testRevisionComplexExecute() {
     $this->assertTrue($executable->field['field_test_multiple_1'] instanceof EntityField);
     $this->assertTrue($executable->field['field_test_multiple_2'] instanceof EntityField);
 
-    $this->assertIdenticalResultset($executable,
+    $this->assertSameResultset($executable,
       [
         ['id' => 1, 'field_test' => 1, 'revision_id' => 1, 'uid' => $this->testUsers[0]->id(), 'timezone' => $timezones[0], 'field_test_multiple' => [1, 3, 7], 'field_test_multiple_1' => [1, 3, 7], 'field_test_multiple_2' => [1, 3, 7]],
         ['id' => 1, 'field_test' => 2, 'revision_id' => 2, 'uid' => $this->testUsers[1]->id(), 'timezone' => $timezones[1], 'field_test_multiple' => [0, 3, 5], 'field_test_multiple_1' => [0, 3, 5], 'field_test_multiple_2' => [0, 3, 5]],
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
index 677a3f5e40..c55affc337 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
@@ -421,7 +421,7 @@ public function testEmpty() {
    * Tests the hide if empty functionality.
    *
    * This tests alters the result to get easier and less coupled results. It is
-   * important that assertIdentical() is used in this test since in PHP 0 == ''.
+   * important that assertSame() is used in this test since in PHP 0 == ''.
    */
   public function _testHideIfEmpty() {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
@@ -446,28 +446,28 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_name, 'By default, a string should not be treated as empty.');
+    $this->assertSame((string) $render, $random_name, 'By default, a string should not be treated as empty.');
 
     // Test an empty string.
     $view->result[0]->{$column_map_reversed['name']} = "";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'By default, "" should not be treated as empty.');
+    $this->assertSame($render, "", 'By default, "" should not be treated as empty.');
 
     // Test zero as an integer.
     $view->result[0]->{$column_map_reversed['name']} = 0;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, '0', 'By default, 0 should not be treated as empty.');
+    $this->assertSame((string) $render, '0', 'By default, 0 should not be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'By default, "0" should not be treated as empty.');
+    $this->assertSame((string) $render, "0", 'By default, "0" should not be treated as empty.');
 
     // Test when results are not rewritten and non-zero empty values are hidden.
     $view->field['name']->options['hide_alter_empty'] = TRUE;
@@ -479,28 +479,28 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_name, 'If hide_empty is checked, a string should not be treated as empty.');
+    $this->assertSame((string) $render, $random_name, 'If hide_empty is checked, a string should not be treated as empty.');
 
     // Test an empty string.
     $view->result[0]->{$column_map_reversed['name']} = "";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If hide_empty is checked, "" should be treated as empty.');
+    $this->assertSame($render, "", 'If hide_empty is checked, "" should be treated as empty.');
 
     // Test zero as an integer.
     $view->result[0]->{$column_map_reversed['name']} = 0;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, '0', 'If hide_empty is checked, but not empty_zero, 0 should not be treated as empty.');
+    $this->assertSame((string) $render, '0', 'If hide_empty is checked, but not empty_zero, 0 should not be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'If hide_empty is checked, but not empty_zero, "0" should not be treated as empty.');
+    $this->assertSame((string) $render, "0", 'If hide_empty is checked, but not empty_zero, "0" should not be treated as empty.');
 
     // Test when results are not rewritten and all empty values are hidden.
     $view->field['name']->options['hide_alter_empty'] = TRUE;
@@ -512,14 +512,14 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If hide_empty and empty_zero are checked, 0 should be treated as empty.');
+    $this->assertSame($render, "", 'If hide_empty and empty_zero are checked, 0 should be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If hide_empty and empty_zero are checked, "0" should be treated as empty.');
+    $this->assertSame($render, "", 'If hide_empty and empty_zero are checked, "0" should be treated as empty.');
 
     // Test when results are rewritten to a valid string and non-zero empty
     // results are hidden.
@@ -534,28 +534,28 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_name, 'If the rewritten string is not empty, it should not be treated as empty.');
+    $this->assertSame((string) $render, $random_name, 'If the rewritten string is not empty, it should not be treated as empty.');
 
     // Test an empty string.
     $view->result[0]->{$column_map_reversed['name']} = "";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_name, 'If the rewritten string is not empty, "" should not be treated as empty.');
+    $this->assertSame((string) $render, $random_name, 'If the rewritten string is not empty, "" should not be treated as empty.');
 
     // Test zero as an integer.
     $view->result[0]->{$column_map_reversed['name']} = 0;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_name, 'If the rewritten string is not empty, 0 should not be treated as empty.');
+    $this->assertSame((string) $render, $random_name, 'If the rewritten string is not empty, 0 should not be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_name, 'If the rewritten string is not empty, "0" should not be treated as empty.');
+    $this->assertSame((string) $render, $random_name, 'If the rewritten string is not empty, "0" should not be treated as empty.');
 
     // Test when results are rewritten to an empty string and non-zero empty results are hidden.
     $view->field['name']->options['hide_alter_empty'] = TRUE;
@@ -569,28 +569,28 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_name, 'If the rewritten string is empty, it should not be treated as empty.');
+    $this->assertSame((string) $render, $random_name, 'If the rewritten string is empty, it should not be treated as empty.');
 
     // Test an empty string.
     $view->result[0]->{$column_map_reversed['name']} = "";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If the rewritten string is empty, "" should be treated as empty.');
+    $this->assertSame($render, "", 'If the rewritten string is empty, "" should be treated as empty.');
 
     // Test zero as an integer.
     $view->result[0]->{$column_map_reversed['name']} = 0;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, '0', 'If the rewritten string is empty, 0 should not be treated as empty.');
+    $this->assertSame((string) $render, '0', 'If the rewritten string is empty, 0 should not be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'If the rewritten string is empty, "0" should not be treated as empty.');
+    $this->assertSame((string) $render, "0", 'If the rewritten string is empty, "0" should not be treated as empty.');
 
     // Test when results are rewritten to zero as a string and non-zero empty
     // results are hidden.
@@ -605,28 +605,28 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, the string rewritten as 0 should not be treated as empty.');
+    $this->assertSame((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, the string rewritten as 0 should not be treated as empty.');
 
     // Test an empty string.
     $view->result[0]->{$column_map_reversed['name']} = "";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, "" rewritten as 0 should not be treated as empty.');
+    $this->assertSame((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, "" rewritten as 0 should not be treated as empty.');
 
     // Test zero as an integer.
     $view->result[0]->{$column_map_reversed['name']} = 0;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, 0 should not be treated as empty.');
+    $this->assertSame((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, 0 should not be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, "0" should not be treated as empty.');
+    $this->assertSame((string) $render, "0", 'If the rewritten string is zero and empty_zero is not checked, "0" should not be treated as empty.');
 
     // Test when results are rewritten to a valid string and non-zero empty
     // results are hidden.
@@ -641,28 +641,28 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_value, 'If the original and rewritten strings are valid, it should not be treated as empty.');
+    $this->assertSame((string) $render, $random_value, 'If the original and rewritten strings are valid, it should not be treated as empty.');
 
     // Test an empty string.
     $view->result[0]->{$column_map_reversed['name']} = "";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If either the original or rewritten string is invalid, "" should be treated as empty.');
+    $this->assertSame($render, "", 'If either the original or rewritten string is invalid, "" should be treated as empty.');
 
     // Test zero as an integer.
     $view->result[0]->{$column_map_reversed['name']} = 0;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_value, 'If the original and rewritten strings are valid, 0 should not be treated as empty.');
+    $this->assertSame((string) $render, $random_value, 'If the original and rewritten strings are valid, 0 should not be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $random_value, 'If the original and rewritten strings are valid, "0" should not be treated as empty.');
+    $this->assertSame((string) $render, $random_value, 'If the original and rewritten strings are valid, "0" should not be treated as empty.');
 
     // Test when results are rewritten to zero as a string and all empty
     // original values and results are hidden.
@@ -677,28 +677,28 @@ public function _testHideIfEmpty() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "", 'If the rewritten string is zero, it should be treated as empty.');
+    $this->assertSame((string) $render, "", 'If the rewritten string is zero, it should be treated as empty.');
 
     // Test an empty string.
     $view->result[0]->{$column_map_reversed['name']} = "";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If the rewritten string is zero, "" should be treated as empty.');
+    $this->assertSame($render, "", 'If the rewritten string is zero, "" should be treated as empty.');
 
     // Test zero as an integer.
     $view->result[0]->{$column_map_reversed['name']} = 0;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If the rewritten string is zero, 0 should not be treated as empty.');
+    $this->assertSame($render, "", 'If the rewritten string is zero, 0 should not be treated as empty.');
 
     // Test zero as a string.
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical($render, "", 'If the rewritten string is zero, "0" should not be treated as empty.');
+    $this->assertSame($render, "", 'If the rewritten string is zero, "0" should not be treated as empty.');
   }
 
   /**
@@ -720,20 +720,20 @@ public function _testEmptyText() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $empty_text, 'If a field is empty, the empty text should be used for the output.');
+    $this->assertSame((string) $render, $empty_text, 'If a field is empty, the empty text should be used for the output.');
 
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, "0", 'If a field is 0 and empty_zero is not checked, the empty text should not be used for the output.');
+    $this->assertSame((string) $render, "0", 'If a field is 0 and empty_zero is not checked, the empty text should not be used for the output.');
 
     $view->result[0]->{$column_map_reversed['name']} = "0";
     $view->field['name']->options['empty_zero'] = TRUE;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $empty_text, 'If a field is 0 and empty_zero is checked, the empty text should be used for the output.');
+    $this->assertSame((string) $render, $empty_text, 'If a field is 0 and empty_zero is checked, the empty text should be used for the output.');
 
     $view->result[0]->{$column_map_reversed['name']} = "";
     $view->field['name']->options['alter']['alter_text'] = TRUE;
@@ -742,13 +742,13 @@ public function _testEmptyText() {
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $alter_text, 'If a field is empty, some rewrite text exists, but hide_alter_empty is not checked, render the rewrite text.');
+    $this->assertSame((string) $render, $alter_text, 'If a field is empty, some rewrite text exists, but hide_alter_empty is not checked, render the rewrite text.');
 
     $view->field['name']->options['hide_alter_empty'] = TRUE;
     $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
       return $view->field['name']->advancedRender($view->result[0]);
     });
-    $this->assertIdentical((string) $render, $empty_text, 'If a field is empty, some rewrite text exists, and hide_alter_empty is checked, use the empty text.');
+    $this->assertSame((string) $render, $empty_text, 'If a field is empty, some rewrite text exists, and hide_alter_empty is checked, use the empty text.');
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
index 325da5106e..9d11ba5629 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
@@ -107,7 +107,7 @@ public function testFilterBooleanOperatorString() {
     ];
 
     $this->assertEqual(2, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
 
     $view->destroy();
     $view->setDisplay();
@@ -130,7 +130,7 @@ public function testFilterBooleanOperatorString() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   /**
@@ -153,7 +153,7 @@ public function testFilterGroupedExposed() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
 
     $view->setExposedInput(['status' => 2]);
@@ -168,7 +168,7 @@ public function testFilterGroupedExposed() {
     ];
 
     $this->assertEqual(2, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
index 7cdd41f525..a4133ce5a4 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
@@ -60,7 +60,7 @@ public function testFilterBooleanOperator() {
     ];
 
     $this->assertEqual(2, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
 
     $view->destroy();
     $view->setDisplay();
@@ -83,7 +83,7 @@ public function testFilterBooleanOperator() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
 
     $view->destroy();
     $view->setDisplay();
@@ -107,7 +107,7 @@ public function testFilterBooleanOperator() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   /**
@@ -130,7 +130,7 @@ public function testFilterGroupedExposed() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
 
     $view->setExposedInput(['status' => 2]);
@@ -145,7 +145,7 @@ public function testFilterGroupedExposed() {
     ];
 
     $this->assertEqual(2, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
 
     $view->destroy();
 
@@ -163,7 +163,7 @@ public function testFilterGroupedExposed() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
index e5d37119df..5deb10fde5 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
@@ -92,7 +92,7 @@ public function testFilterCombineContains() {
         'job' => NULL,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   /**
@@ -143,7 +143,7 @@ public function testFilterCombineWord() {
         'job' => 'Drummer',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   /**
@@ -187,7 +187,7 @@ public function testFilterCombineAllWords() {
         'job' => 'Singer',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
index d78f7c92e2..19b73ee268 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
@@ -58,7 +58,7 @@ public function testEqual() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testEqualGroupedExposed() {
@@ -79,7 +79,7 @@ public function testEqualGroupedExposed() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testNotEqual() {
@@ -113,7 +113,7 @@ public function testNotEqual() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testEqualGroupedNotExposed() {
@@ -143,7 +143,7 @@ public function testEqualGroupedNotExposed() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
index e02a8430c7..1eda40d60e 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
@@ -66,7 +66,7 @@ public function testFilterInOperatorSimple() {
     ];
 
     $this->assertEqual(2, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
 
     $view->destroy();
     $view->setDisplay();
@@ -100,7 +100,7 @@ public function testFilterInOperatorSimple() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   public function testFilterInOperatorGroupedExposedSimple() {
@@ -126,7 +126,7 @@ public function testFilterInOperatorGroupedExposedSimple() {
     ];
 
     $this->assertEqual(2, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   public function testFilterNotInOperatorGroupedExposedSimple() {
@@ -156,7 +156,7 @@ public function testFilterNotInOperatorGroupedExposedSimple() {
     ];
 
     $this->assertEqual(3, count($view->result));
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   protected function getGroupedExposedFilters() {
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
index e1093e47f7..c6e701f192 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
@@ -62,7 +62,7 @@ public function testFilterNumericSimple() {
         'age' => 28,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterNumericExposedGroupedSimple() {
@@ -84,7 +84,7 @@ public function testFilterNumericExposedGroupedSimple() {
         'age' => 28,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterNumericBetween() {
@@ -121,7 +121,7 @@ public function testFilterNumericBetween() {
         'age' => 26,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
 
     // test not between
     $view->destroy();
@@ -153,7 +153,7 @@ public function testFilterNumericBetween() {
         'age' => 30,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterNumericExposedGroupedBetween() {
@@ -183,7 +183,7 @@ public function testFilterNumericExposedGroupedBetween() {
         'age' => 26,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterNumericExposedGroupedNotBetween() {
@@ -209,7 +209,7 @@ public function testFilterNumericExposedGroupedNotBetween() {
         'age' => 30,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   /**
@@ -240,7 +240,7 @@ public function testFilterNumericRegularExpression() {
         'age' => 28,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   /**
@@ -269,7 +269,7 @@ public function testFilterNumericExposedGroupedRegularExpression() {
         'age' => 28,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterNumericEmpty() {
@@ -289,7 +289,7 @@ public function testFilterNumericEmpty() {
 
     $this->executeView($view);
     $resultset = [];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
 
     $view->destroy();
     $view->setDisplay();
@@ -328,7 +328,7 @@ public function testFilterNumericEmpty() {
         'age' => 30,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterNumericExposedGroupedEmpty() {
@@ -345,7 +345,7 @@ public function testFilterNumericExposedGroupedEmpty() {
 
     $this->executeView($view);
     $resultset = [];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterNumericExposedGroupedNotEmpty() {
@@ -383,7 +383,7 @@ public function testFilterNumericExposedGroupedNotEmpty() {
         'age' => 30,
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testAllowEmpty() {
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
index c24cc6ff03..9f152853c5 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
@@ -103,7 +103,7 @@ public function testFilterStringEqual() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedEqual() {
@@ -125,7 +125,7 @@ public function testFilterStringGroupedExposedEqual() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringNotEqual() {
@@ -159,7 +159,7 @@ public function testFilterStringNotEqual() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedNotEqual() {
@@ -191,7 +191,7 @@ public function testFilterStringGroupedExposedNotEqual() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringContains() {
@@ -216,7 +216,7 @@ public function testFilterStringContains() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
 
@@ -239,7 +239,7 @@ public function testFilterStringGroupedExposedContains() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
 
@@ -268,7 +268,7 @@ public function testFilterStringWord() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
     $view->destroy();
 
     $view = Views::getView('test_view');
@@ -292,7 +292,7 @@ public function testFilterStringWord() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
     $view->destroy();
 
     $view = Views::getView('test_view');
@@ -328,7 +328,7 @@ public function testFilterStringWord() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset);
+    $this->assertSameResultset($view, $resultset);
   }
 
 
@@ -351,7 +351,7 @@ public function testFilterStringGroupedExposedWord() {
       ],
     ];
 
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
     $view->destroy();
 
     $filters = $this->getGroupedExposedFilters();
@@ -371,7 +371,7 @@ public function testFilterStringGroupedExposedWord() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringStarts() {
@@ -396,7 +396,7 @@ public function testFilterStringStarts() {
         'name' => 'George',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedStarts() {
@@ -417,7 +417,7 @@ public function testFilterStringGroupedExposedStarts() {
         'name' => 'George',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringNotStarts() {
@@ -449,7 +449,7 @@ public function testFilterStringNotStarts() {
       ],
       // There is no Meredith returned because his description is empty
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedNotStarts() {
@@ -477,7 +477,7 @@ public function testFilterStringGroupedExposedNotStarts() {
       ],
       // There is no Meredith returned because his description is empty
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringEnds() {
@@ -505,7 +505,7 @@ public function testFilterStringEnds() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedEnds() {
@@ -529,7 +529,7 @@ public function testFilterStringGroupedExposedEnds() {
         'name' => 'Ringo',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringNotEnds() {
@@ -558,7 +558,7 @@ public function testFilterStringNotEnds() {
       ],
       // There is no Meredith returned because his description is empty
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedNotEnds() {
@@ -583,7 +583,7 @@ public function testFilterStringGroupedExposedNotEnds() {
       ],
       // There is no Meredith returned because his description is empty
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringNot() {
@@ -612,7 +612,7 @@ public function testFilterStringNot() {
       ],
       // There is no Meredith returned because his description is empty
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
 
@@ -638,7 +638,7 @@ public function testFilterStringGroupedExposedNot() {
       ],
       // There is no Meredith returned because his description is empty
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
 
   }
 
@@ -667,7 +667,7 @@ public function testFilterStringShorter() {
         'name' => 'Paul',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedShorter() {
@@ -690,7 +690,7 @@ public function testFilterStringGroupedExposedShorter() {
         'name' => 'Paul',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringLonger() {
@@ -715,7 +715,7 @@ public function testFilterStringLonger() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedLonger() {
@@ -735,7 +735,7 @@ public function testFilterStringGroupedExposedLonger() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
 
@@ -760,7 +760,7 @@ public function testFilterStringEmpty() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   public function testFilterStringGroupedExposedEmpty() {
@@ -780,7 +780,7 @@ public function testFilterStringGroupedExposedEmpty() {
         'name' => 'Meredith',
       ],
     ];
-    $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
+    $this->assertSameResultset($view, $resultset, $this->columnMap);
   }
 
   protected function getGroupedExposedFilters() {
diff --git a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
index 53d25b38e6..75fcc2ced0 100644
--- a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
@@ -61,11 +61,11 @@ public function testPluginAliases() {
     $filter = $view->filter['test_filter'];
 
     // Check the definition values are present.
-    $this->assertIdentical($filter->definition['real table'], 'views_test_data');
-    $this->assertIdentical($filter->definition['real field'], 'name');
+    $this->assertSame($filter->definition['real table'], 'views_test_data');
+    $this->assertSame($filter->definition['real field'], 'name');
 
-    $this->assertIdentical($filter->table, 'views_test_data');
-    $this->assertIdentical($filter->realField, 'name');
+    $this->assertSame($filter->table, 'views_test_data');
+    $this->assertSame($filter->realField, 'name');
 
     // Test an existing user uid field.
     $view = Views::getView('test_alias');
@@ -74,11 +74,11 @@ public function testPluginAliases() {
 
     $filter = $view->filter['uid_raw'];
 
-    $this->assertIdentical($filter->definition['real field'], 'uid');
+    $this->assertSame($filter->definition['real field'], 'uid');
 
-    $this->assertIdentical($filter->field, 'uid_raw');
-    $this->assertIdentical($filter->table, 'users_field_data');
-    $this->assertIdentical($filter->realField, 'uid');
+    $this->assertSame($filter->field, 'uid_raw');
+    $this->assertSame($filter->table, 'users_field_data');
+    $this->assertSame($filter->realField, 'uid');
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php b/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
index 2d1a2fcc2f..456d72375d 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
@@ -191,7 +191,7 @@ public function testDateOrdering() {
 
         // Verify the result.
         $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
-        $this->assertIdenticalResultset($view, $this->expectedResultSet($granularity, $reverse), [
+        $this->assertSameResultset($view, $this->expectedResultSet($granularity, $reverse), [
           'views_test_data_name' => 'name',
         ], SafeMarkup::format('Result is returned correctly when ordering by granularity @granularity, @reverse.', ['@granularity' => $granularity, '@reverse' => $reverse ? 'reverse' : 'forward']));
         $view->destroy();
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php b/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php
index 941ed8d9ef..6ddbcc02f5 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php
@@ -76,7 +76,7 @@ public function testRandomOrdering() {
 
     // Verify the result.
     $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultset($view, $this->dataSet(), [
+    $this->assertSameResultset($view, $this->dataSet(), [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortTest.php b/core/modules/views/tests/src/Kernel/Handler/SortTest.php
index 91560495fb..17a189ad63 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortTest.php
@@ -42,7 +42,7 @@ public function testNumericOrdering() {
 
     // Verify the result.
     $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'age'), [
+    $this->assertSameResultset($view, $this->orderResultSet($this->dataSet(), 'age'), [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
@@ -66,7 +66,7 @@ public function testNumericOrdering() {
 
     // Verify the result.
     $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'age', TRUE), [
+    $this->assertSameResultset($view, $this->orderResultSet($this->dataSet(), 'age', TRUE), [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
@@ -95,7 +95,7 @@ public function testStringOrdering() {
 
     // Verify the result.
     $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'name'), [
+    $this->assertSameResultset($view, $this->orderResultSet($this->dataSet(), 'name'), [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
@@ -119,7 +119,7 @@ public function testStringOrdering() {
 
     // Verify the result.
     $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'name', TRUE), [
+    $this->assertSameResultset($view, $this->orderResultSet($this->dataSet(), 'name', TRUE), [
       'views_test_data_name' => 'name',
       'views_test_data_age' => 'age',
     ]);
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
index 549761d540..d7ceb4f123 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
@@ -121,7 +121,7 @@ public function testSortbyUntranslatedIntegerField() {
         'langcode' => 'en',
       ],
     ];
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
 
     $view = Views::getView('test_view_sort_translation');
@@ -145,7 +145,7 @@ public function testSortbyUntranslatedIntegerField() {
 
     // The weight field is not translated, we sort by it so the nodes
     // should come out in the same order in both languages.
-    $this->assertIdenticalResultset($view, $expected, $map);
+    $this->assertSameResultset($view, $expected, $map);
     $view->destroy();
   }
 
diff --git a/core/modules/views/tests/src/Kernel/ModuleTest.php b/core/modules/views/tests/src/Kernel/ModuleTest.php
index 68612b78f4..268124898c 100644
--- a/core/modules/views/tests/src/Kernel/ModuleTest.php
+++ b/core/modules/views/tests/src/Kernel/ModuleTest.php
@@ -171,24 +171,24 @@ public function testLoadFunctions() {
 
     // Test Views::getViewsAsOptions().
     // Test the $views_only parameter.
-    $this->assertIdentical(array_keys($all_views), array_keys(Views::getViewsAsOptions(TRUE)), 'Expected option keys for all views were returned.');
+    $this->assertSame(array_keys($all_views), array_keys(Views::getViewsAsOptions(TRUE)), 'Expected option keys for all views were returned.');
     $expected_options = [];
     foreach ($all_views as $id => $view) {
       $expected_options[$id] = $view->label();
     }
-    $this->assertIdentical($expected_options, $this->castSafeStrings(Views::getViewsAsOptions(TRUE)), 'Expected options array was returned.');
+    $this->assertSame($expected_options, $this->castSafeStrings(Views::getViewsAsOptions(TRUE)), 'Expected options array was returned.');
 
     // Test the default.
-    $this->assertIdentical($this->formatViewOptions($all_views), $this->castSafeStrings(Views::getViewsAsOptions()), 'Expected options array for all views was returned.');
+    $this->assertSame($this->formatViewOptions($all_views), $this->castSafeStrings(Views::getViewsAsOptions()), 'Expected options array for all views was returned.');
     // Test enabled views.
-    $this->assertIdentical($this->formatViewOptions($expected_enabled), $this->castSafeStrings(Views::getViewsAsOptions(FALSE, 'enabled')), 'Expected enabled options array was returned.');
+    $this->assertSame($this->formatViewOptions($expected_enabled), $this->castSafeStrings(Views::getViewsAsOptions(FALSE, 'enabled')), 'Expected enabled options array was returned.');
     // Test disabled views.
-    $this->assertIdentical($this->formatViewOptions($expected_disabled), $this->castSafeStrings(Views::getViewsAsOptions(FALSE, 'disabled')), 'Expected disabled options array was returned.');
+    $this->assertSame($this->formatViewOptions($expected_disabled), $this->castSafeStrings(Views::getViewsAsOptions(FALSE, 'disabled')), 'Expected disabled options array was returned.');
 
     // Test the sort parameter.
     $all_views_sorted = $all_views;
     ksort($all_views_sorted);
-    $this->assertIdentical(array_keys($all_views_sorted), array_keys(Views::getViewsAsOptions(TRUE, 'all', NULL, FALSE, TRUE)), 'All view id keys returned in expected sort order');
+    $this->assertSame(array_keys($all_views_sorted), array_keys(Views::getViewsAsOptions(TRUE, 'all', NULL, FALSE, TRUE)), 'All view id keys returned in expected sort order');
 
     // Test $exclude_view parameter.
     $this->assertFalse(array_key_exists('archive', Views::getViewsAsOptions(TRUE, 'all', 'archive')), 'View excluded from options based on name');
@@ -202,7 +202,7 @@ public function testLoadFunctions() {
         $expected_opt_groups[$view->id()][$view->id() . ':' . $display['id']] = (string) t('@view : @display', ['@view' => $view->id(), '@display' => $display['id']]);
       }
     }
-    $this->assertIdentical($expected_opt_groups, $this->castSafeStrings(Views::getViewsAsOptions(FALSE, 'all', NULL, TRUE)), 'Expected option array for an option group returned.');
+    $this->assertSame($expected_opt_groups, $this->castSafeStrings(Views::getViewsAsOptions(FALSE, 'all', NULL, TRUE)), 'Expected option array for an option group returned.');
   }
 
   /**
@@ -234,16 +234,16 @@ public function testViewsFetchPluginNames() {
       $expected[$id] = $definition['title'];
     }
     asort($expected);
-    $this->assertIdentical(array_keys($plugins), array_keys($expected));
+    $this->assertSame(array_keys($plugins), array_keys($expected));
 
     // Test using the 'test' style plugin type only returns the test_style and
     // mapping_test plugins.
     $plugins = Views::fetchPluginNames('style', 'test');
-    $this->assertIdentical(array_keys($plugins), ['mapping_test', 'test_style', 'test_template_style']);
+    $this->assertSame(array_keys($plugins), ['mapping_test', 'test_style', 'test_template_style']);
 
     // Test a non existent style plugin type returns no plugins.
     $plugins = Views::fetchPluginNames('style', $this->randomString());
-    $this->assertIdentical($plugins, []);
+    $this->assertSame($plugins, []);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
index 1a9f32eff7..801a750be4 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
@@ -39,7 +39,7 @@ public function testExposedBlock() {
       'module' => ['views'],
       'theme' => ['stark']
     ];
-    $this->assertIdentical($expected, $dependencies);
+    $this->assertSame($expected, $dependencies);
   }
 
   /**
@@ -55,7 +55,7 @@ public function testViewsBlock() {
       'module' => ['views'],
       'theme' => ['stark']
     ];
-    $this->assertIdentical($expected, $dependencies);
+    $this->assertSame($expected, $dependencies);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
index 9f6066eff3..d77a2ce1c4 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
@@ -142,7 +142,7 @@ public function testTimeResultCachingWithFilter() {
 
     // Verify the result.
     $this->assertEqual(1, count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultSet($view, $dataset, [
+    $this->assertSameResultSet($view, $dataset, [
       'views_test_data_name' => 'name',
     ]);
 
@@ -173,7 +173,7 @@ public function testTimeResultCachingWithFilter() {
 
     // Verify the result.
     $this->assertEqual(1, count($view->result), 'The number of returned rows match.');
-    $this->assertIdenticalResultSet($view, $dataset, [
+    $this->assertSameResultSet($view, $dataset, [
       'views_test_data_name' => 'name',
     ]);
   }
@@ -197,25 +197,25 @@ public function testTimeResultCachingWithPager() {
     $view->setDisplay('page_1');
     $view->setCurrentPage(0);
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, [['name' => 'John'], ['name' => 'George']], $mapping);
+    $this->assertSameResultset($view, [['name' => 'John'], ['name' => 'George']], $mapping);
     $view->destroy();
 
     $view->setDisplay('page_1');
     $view->setCurrentPage(1);
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, [['name' => 'Ringo'], ['name' => 'Paul']], $mapping);
+    $this->assertSameResultset($view, [['name' => 'Ringo'], ['name' => 'Paul']], $mapping);
     $view->destroy();
 
     $view->setDisplay('page_1');
     $view->setCurrentPage(0);
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, [['name' => 'John'], ['name' => 'George']], $mapping);
+    $this->assertSameResultset($view, [['name' => 'John'], ['name' => 'George']], $mapping);
     $view->destroy();
 
     $view->setDisplay('page_1');
     $view->setCurrentPage(2);
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, [['name' => 'Meredith']], $mapping);
+    $this->assertSameResultset($view, [['name' => 'Meredith']], $mapping);
     $view->destroy();
   }
 
@@ -346,8 +346,8 @@ public function testCacheData() {
     // Assert each row doesn't contain '_entity' or '_relationship_entities'
     // items.
     foreach ($cache->data['result'] as $row) {
-      $this->assertIdentical($row->_entity, NULL, 'Cached row "_entity" property is NULL');
-      $this->assertIdentical($row->_relationship_entities, [], 'Cached row "_relationship_entities" property is empty');
+      $this->assertSame($row->_entity, NULL, 'Cached row "_entity" property is NULL');
+      $this->assertSame($row->_relationship_entities, [], 'Cached row "_relationship_entities" property is empty');
     }
   }
 
@@ -361,7 +361,7 @@ public function testCacheContextIntegration() {
     $this->executeView($view);
 
     $map = ['views_test_data_name' => 'name'];
-    $this->assertIdenticalResultset($view, [['name' => 'George']], $map);
+    $this->assertSameResultset($view, [['name' => 'George']], $map);
 
     // Update the entry in the DB to ensure that result caching works.
     \Drupal::database()->update('views_test_data')
@@ -372,7 +372,7 @@ public function testCacheContextIntegration() {
     $view = Views::getView('test_cache');
     $view->setDisplay('page_2');
     $this->executeView($view);
-    $this->assertIdenticalResultset($view, [['name' => 'George']], $map);
+    $this->assertSameResultset($view, [['name' => 'George']], $map);
 
     // Now change the cache context value, a different query should be executed.
     $view = Views::getView('test_cache');
@@ -380,7 +380,7 @@ public function testCacheContextIntegration() {
     \Drupal::state()->set('views_test_cache_context', 'Paul');
     $this->executeView($view);
 
-    $this->assertIdenticalResultset($view, [['name' => 'Paul']], $map);
+    $this->assertSameResultset($view, [['name' => 'Paul']], $map);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
index 69666cf342..3df26457e2 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
@@ -76,12 +76,12 @@ public function testDefaultOptions() {
       // Test the view plugin options against the storage.
       foreach ($this->pluginTypes as $type) {
         $options = $display->getOption($type);
-        $this->assertIdentical($display_data[$id]['display_options'][$type]['options'], $options['options']);
+        $this->assertSame($display_data[$id]['display_options'][$type]['options'], $options['options']);
       }
       // Test the view handler options against the storage.
       foreach ($this->handlerTypes as $type) {
         $options = $display->getOption($type);
-        $this->assertIdentical($display_data[$id]['display_options'][$type], $options);
+        $this->assertSame($display_data[$id]['display_options'][$type], $options);
       }
     }
   }
@@ -112,7 +112,7 @@ public function testGetPlugin() {
     $view->initDisplay();
     $first = spl_object_hash($display_handler->getPlugin('style'));
     $second = spl_object_hash($display_handler->getPlugin('style'));
-    $this->assertIdentical($first, $second, 'The same plugin instance was returned.');
+    $this->assertSame($first, $second, 'The same plugin instance was returned.');
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
index 3232ecb815..01321c288a 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
@@ -131,14 +131,14 @@ public function testMenuLinks() {
    */
   public function testDependencies() {
     $view = Views::getView('test_page_display');
-    $this->assertIdentical([], $view->getDependencies());
+    $this->assertSame([], $view->getDependencies());
 
     $view = Views::getView('test_page_display_route');
     $expected = [
       'content' => ['StaticTest'],
       'module' => ['views_test_data'],
     ];
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
 
     $view = Views::getView('test_page_display_menu');
     $expected = [
@@ -147,7 +147,7 @@ public function testDependencies() {
         'system.menu.tools',
       ],
     ];
-    $this->assertIdentical($expected, $view->getDependencies());
+    $this->assertSame($expected, $view->getDependencies());
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php b/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
index c6f581a655..d8fdeb0a0e 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
@@ -52,7 +52,7 @@ public function testSetPagerMethods() {
     $output = $view->preview();
 
     \Drupal::service('renderer')->renderPlain($output);
-    $this->assertIdentical(CacheBackendInterface::CACHE_PERMANENT, $output['#cache']['max-age']);
+    $this->assertSame(CacheBackendInterface::CACHE_PERMANENT, $output['#cache']['max-age']);
 
     foreach (['setItemsPerPage', 'setOffset', 'setCurrentPage'] as $method) {
       $view = Views::getView('test_pager_full');
@@ -61,7 +61,7 @@ public function testSetPagerMethods() {
       $output = $view->preview();
 
       \Drupal::service('renderer')->renderPlain($output);
-      $this->assertIdentical(CacheBackendInterface::CACHE_PERMANENT, $output['#cache']['max-age'], 'Max age kept.');
+      $this->assertSame(CacheBackendInterface::CACHE_PERMANENT, $output['#cache']['max-age'], 'Max age kept.');
     }
 
   }
diff --git a/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php b/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
index 681cf39052..3a4681fc8d 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
@@ -40,7 +40,7 @@ public function testViewsTokenReplace() {
       return $this->testPluginBase->viewsTokenReplace($text, $tokens);
     });
 
-    $this->assertIdentical($result, 'en means English');
+    $this->assertSame($result, 'en means English');
   }
 
   /**
@@ -54,7 +54,7 @@ public function testViewsTokenReplaceWithDots() {
       return $this->testPluginBase->viewsTokenReplace($text, $tokens);
     });
 
-    $this->assertIdentical($result, 'first comes before second');
+    $this->assertSame($result, 'first comes before second');
 
     // Test tokens with numeric indexes.
     $text = '{{ argument.0.first }} comes before {{ argument.1.second }}';
@@ -64,7 +64,7 @@ public function testViewsTokenReplaceWithDots() {
       return $this->testPluginBase->viewsTokenReplace($text, $tokens);
     });
 
-    $this->assertIdentical($result, 'first comes before second');
+    $this->assertSame($result, 'first comes before second');
   }
 
   /**
@@ -74,7 +74,7 @@ public function testViewsTokenReplaceWithTwigTokens() {
     $text = 'Just some text';
     $tokens = [];
     $result = $this->testPluginBase->viewsTokenReplace($text, $tokens);
-    $this->assertIdentical($result, 'Just some text');
+    $this->assertSame($result, 'Just some text');
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
index 82b787ce80..e716755aad 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
@@ -88,7 +88,7 @@ public function testRelationshipInQuery() {
       ['name' => 'John', 'uid' => $account_k->id()],
       ['name' => 'George', 'uid' => $account_k->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
 
     // Check for all beatles created by Django. This should not return anything
@@ -99,7 +99,7 @@ public function testRelationshipInQuery() {
     $this->executeView($view);
 
     $expected_result = [];
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
 
     // Check for all people created by anyone.
@@ -110,7 +110,7 @@ public function testRelationshipInQuery() {
       ['name' => 'George', 'uid' => $account_k->id()],
       ['name' => 'Meredith', 'uid' => $account_s->id()],
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
   }
 
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php
index 802befe1ca..d8ed16081a 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php
@@ -81,7 +81,7 @@ public function testRelationshipQuery() {
         'uid' => 1
       ]
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
 
     // Check for all beatles created by another user, which so doesn't exist.
@@ -89,7 +89,7 @@ public function testRelationshipQuery() {
     $view->filter['uid']->value = [3];
     $this->executeView($view);
     $expected_result = [];
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
 
     // Set the relationship to required, so only results authored by the admin
@@ -104,7 +104,7 @@ public function testRelationshipQuery() {
         'uid' => 1
       ]
     ];
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
     $view->destroy();
 
     // Set the relationship to optional should cause to return all beatles.
@@ -125,7 +125,7 @@ public function testRelationshipQuery() {
       }
     }
 
-    $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
+    $this->assertSameResultset($view, $expected_result, $this->columnMap);
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
index 3e3bbaca36..6d60ddc842 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
@@ -73,7 +73,7 @@ public function testViewWithNonDefaultPendingRevision() {
         'vid' => $revision2->getRevisionId(),
       ],
     ];
-    $this->assertIdenticalResultset($view, $expected, [
+    $this->assertSameResultset($view, $expected, [
       'node_field_data_node_field_revision_nid' => 'nid',
       'vid_1' => 'vid_1',
       'vid' => 'vid',
diff --git a/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php b/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php
index 6846f77630..3a8a39df3d 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php
@@ -50,8 +50,8 @@ public function testExecuteMetadata() {
       $this->assertTrue($query->hasTag('test_tag'));
 
       // Check metadata.
-      $this->assertIdentical($query->getMetaData('key1'), 'test_metadata');
-      $this->assertIdentical($query->getMetaData('key2'), 'test_metadata2');
+      $this->assertSame($query->getMetaData('key1'), 'test_metadata');
+      $this->assertSame($query->getMetaData('key2'), 'test_metadata2');
     }
 
     $query_options = $view->display_handler->getOption('query');
@@ -74,8 +74,8 @@ public function testExecuteMetadata() {
       $this->assertFalse($query->hasTag('test_tag'));
 
       // Check metadata.
-      $this->assertIdentical($query->getMetaData('key1'), NULL);
-      $this->assertIdentical($query->getMetaData('key2'), NULL);
+      $this->assertSame($query->getMetaData('key1'), NULL);
+      $this->assertSame($query->getMetaData('key2'), NULL);
     }
   }
 
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
index d0683deb47..ce48897da5 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
@@ -68,7 +68,7 @@ protected function mappedOutputHelper($view) {
         // separated by ':'.
         $expected_result = $name . ':' . $data_set[$count][$field_id];
         $actual_result = (string) $field;
-        $this->assertIdentical($expected_result, $actual_result, format_string('The fields were mapped successfully: %name => %field_id', ['%name' => $name, '%field_id' => $field_id]));
+        $this->assertSame($expected_result, $actual_result, format_string('The fields were mapped successfully: %name => %field_id', ['%name' => $name, '%field_id' => $field_id]));
       }
 
       $count++;
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php
index 365b0c78e8..7ed68e35d6 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php
@@ -64,8 +64,8 @@ public function testTable() {
     $style_plugin = $view->style_plugin;
     $style_plugin->options['default'] = '';
     $style_plugin->buildSortPost();
-    $this->assertIdentical($style_plugin->order, NULL, 'No sort order was set, when no order was specified and no default column was selected.');
-    $this->assertIdentical($style_plugin->active, NULL, 'No sort field was set, when no order was specified and no default column was selected.');
+    $this->assertSame($style_plugin->order, NULL, 'No sort order was set, when no order was specified and no default column was selected.');
+    $this->assertSame($style_plugin->active, NULL, 'No sort field was set, when no order was specified and no default column was selected.');
     $view->destroy();
 
     // Setup a valid default + column specific default sort order.
@@ -74,8 +74,8 @@ public function testTable() {
     $style_plugin->options['default'] = 'id';
     $style_plugin->options['info']['id']['default_sort_order'] = 'desc';
     $style_plugin->buildSortPost();
-    $this->assertIdentical($style_plugin->order, 'desc', 'Fallback to the right default sort order.');
-    $this->assertIdentical($style_plugin->active, 'id', 'Fallback to the right default sort field.');
+    $this->assertSame($style_plugin->order, 'desc', 'Fallback to the right default sort order.');
+    $this->assertSame($style_plugin->active, 'id', 'Fallback to the right default sort field.');
     $view->destroy();
 
     // Setup a valid default + table default sort order.
@@ -85,8 +85,8 @@ public function testTable() {
     $style_plugin->options['info']['id']['default_sort_order'] = NULL;
     $style_plugin->options['order'] = 'asc';
     $style_plugin->buildSortPost();
-    $this->assertIdentical($style_plugin->order, 'asc', 'Fallback to the right default sort order.');
-    $this->assertIdentical($style_plugin->active, 'id', 'Fallback to the right default sort field.');
+    $this->assertSame($style_plugin->order, 'asc', 'Fallback to the right default sort order.');
+    $this->assertSame($style_plugin->active, 'id', 'Fallback to the right default sort field.');
     $view->destroy();
 
     // Use an invalid field.
@@ -96,8 +96,8 @@ public function testTable() {
     $random_name = $this->randomMachineName();
     $request->query->set('order', $random_name);
     $style_plugin->buildSortPost();
-    $this->assertIdentical($style_plugin->order, 'asc', 'No sort order was set, when invalid sort order was specified.');
-    $this->assertIdentical($style_plugin->active, NULL, 'No sort field was set, when invalid sort order was specified.');
+    $this->assertSame($style_plugin->order, 'asc', 'No sort order was set, when invalid sort order was specified.');
+    $this->assertSame($style_plugin->active, NULL, 'No sort field was set, when invalid sort order was specified.');
     $view->destroy();
 
     // Use a existing field, and sort both ascending and descending.
@@ -107,8 +107,8 @@ public function testTable() {
       $request->query->set('sort', $order);
       $request->query->set('order', 'id');
       $style_plugin->buildSortPost();
-      $this->assertIdentical($style_plugin->order, $order, 'Ensure the right sort order was set.');
-      $this->assertIdentical($style_plugin->active, 'id', 'Ensure the right order was set.');
+      $this->assertSame($style_plugin->order, $order, 'Ensure the right sort order was set.');
+      $this->assertSame($style_plugin->active, 'id', 'Ensure the right order was set.');
       $view->destroy();
     }
 
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php
index af58b70006..f62ce1876d 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php
@@ -36,7 +36,7 @@ public function testDefaultRowClasses() {
       $class = (string) $attributes['class'][0];
       $this->assertTrue(strpos($class, 'views-row') !== FALSE, 'Make sure that the views row class is set right.');
     }
-    $this->assertIdentical($count, $count_result);
+    $this->assertSame($count, $count_result);
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
index 4b1cfc362c..01e0a8b66e 100644
--- a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
+++ b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
@@ -68,7 +68,7 @@ public function testTokenReplacement() {
     foreach ($expected as $token => $expected_output) {
       $bubbleable_metadata = new BubbleableMetadata();
       $output = $token_handler->replace($token, ['view' => $view], [], $bubbleable_metadata);
-      $this->assertIdentical($output, $expected_output, format_string('Token %token replaced correctly.', ['%token' => $token]));
+      $this->assertSame($output, $expected_output, format_string('Token %token replaced correctly.', ['%token' => $token]));
       $this->assertEqual($bubbleable_metadata, $metadata_tests[$token]);
     }
   }
@@ -125,7 +125,7 @@ public function testTokenReplacementNoResults() {
 
     foreach ($expected as $token => $expected_output) {
       $output = $token_handler->replace($token, ['view' => $view]);
-      $this->assertIdentical($output, $expected_output, format_string('Token %token replaced correctly.', ['%token' => $token]));
+      $this->assertSame($output, $expected_output, format_string('Token %token replaced correctly.', ['%token' => $token]));
     }
   }
 
@@ -144,7 +144,7 @@ public function testTokenReplacementNoPath() {
 
     foreach ($expected as $token => $expected_output) {
       $output = $token_handler->replace($token, ['view' => $view]);
-      $this->assertIdentical($output, $expected_output, format_string('Token %token replaced correctly.', ['%token' => $token]));
+      $this->assertSame($output, $expected_output, format_string('Token %token replaced correctly.', ['%token' => $token]));
     }
   }
 
diff --git a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
index b49d0c32fb..5e5d77250a 100644
--- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
@@ -153,22 +153,22 @@ public function testInitMethods() {
     $display_plugin = $view->getDisplay();
     $this->assertTrue($display_plugin instanceof DefaultDisplay, 'An instance of DefaultDisplay was returned.');
     $this->assertTrue($view->display_handler instanceof DefaultDisplay, 'The display_handler property has been set.');
-    $this->assertIdentical($display_plugin, $view->getDisplay(), 'The same display plugin instance was returned.');
+    $this->assertSame($display_plugin, $view->getDisplay(), 'The same display plugin instance was returned.');
 
     $style_plugin = $view->getStyle();
     $this->assertTrue($style_plugin instanceof DefaultStyle, 'An instance of DefaultStyle was returned.');
     $this->assertTrue($view->style_plugin instanceof DefaultStyle, 'The style_plugin property has been set.');
-    $this->assertIdentical($style_plugin, $view->getStyle(), 'The same style plugin instance was returned.');
+    $this->assertSame($style_plugin, $view->getStyle(), 'The same style plugin instance was returned.');
 
     $pager_plugin = $view->getPager();
     $this->assertTrue($pager_plugin instanceof PagerPluginBase, 'An instance of PagerPluginBase was returned.');
     $this->assertTrue($view->pager instanceof PagerPluginBase, 'The pager property has been set.');
-    $this->assertIdentical($pager_plugin, $view->getPager(), 'The same pager plugin instance was returned.');
+    $this->assertSame($pager_plugin, $view->getPager(), 'The same pager plugin instance was returned.');
 
     $query_plugin = $view->getQuery();
     $this->assertTrue($query_plugin instanceof QueryPluginBase, 'An instance of QueryPluginBase was returned.');
     $this->assertTrue($view->query instanceof QueryPluginBase, 'The query property has been set.');
-    $this->assertIdentical($query_plugin, $view->getQuery(), 'The same query plugin instance was returned.');
+    $this->assertSame($query_plugin, $view->getQuery(), 'The same query plugin instance was returned.');
   }
 
   /**
@@ -311,13 +311,13 @@ public function testPropertyMethods() {
       'views_test_data' => TRUE,
       '#global' => TRUE,
     ];
-    $this->assertIdentical($view->getBaseTables(), $expected);
+    $this->assertSame($view->getBaseTables(), $expected);
 
     // Test response methods.
     $this->assertTrue($view->getResponse() instanceof Response, 'New response object returned.');
     $new_response = new Response();
     $view->setResponse($new_response);
-    $this->assertIdentical(spl_object_hash($view->getResponse()), spl_object_hash($new_response), 'New response object correctly set.');
+    $this->assertSame(spl_object_hash($view->getResponse()), spl_object_hash($new_response), 'New response object correctly set.');
 
     // Test the getPath() method.
     $path = $this->randomMachineName();
@@ -365,7 +365,7 @@ protected function assertViewDestroy($view) {
     );
 
     foreach ($defaults as $property => $default) {
-      $this->assertIdentical($this->getProtectedProperty($view, $property), $default);
+      $this->assertSame($this->getProtectedProperty($view, $property), $default);
     }
   }
 
@@ -465,8 +465,8 @@ public function testValidateNestedLoops() {
       return $carry;
     });
     // Assert that there were 9 total errors across 3 displays.
-    $this->assertIdentical(9, $total_error_count);
-    $this->assertIdentical(3, count($errors));
+    $this->assertSame(9, $total_error_count);
+    $this->assertSame(3, count($errors));
   }
 
   /**
@@ -482,16 +482,16 @@ public function testSerialization() {
 
     // Test the view storage object is not present in the actual serialized
     // string.
-    $this->assertIdentical(strpos($serialized, '"Drupal\views\Entity\View"'), FALSE, 'The Drupal\views\Entity\View class was not found in the serialized string.');
+    $this->assertSame(strpos($serialized, '"Drupal\views\Entity\View"'), FALSE, 'The Drupal\views\Entity\View class was not found in the serialized string.');
 
     /** @var \Drupal\views\ViewExecutable $unserialized */
     $unserialized = unserialize($serialized);
 
     $this->assertTrue($unserialized instanceof ViewExecutable);
-    $this->assertIdentical($view->storage->id(), $unserialized->storage->id(), 'The expected storage entity was loaded on the unserialized view.');
-    $this->assertIdentical($unserialized->current_display, 'page_1', 'The expected display was set on the unserialized view.');
-    $this->assertIdentical($unserialized->args, ['test'], 'The expected argument was set on the unserialized view.');
-    $this->assertIdentical($unserialized->getCurrentPage(), 2, 'The expected current page was set on the unserialized view.');
+    $this->assertSame($view->storage->id(), $unserialized->storage->id(), 'The expected storage entity was loaded on the unserialized view.');
+    $this->assertSame($unserialized->current_display, 'page_1', 'The expected display was set on the unserialized view.');
+    $this->assertSame($unserialized->args, ['test'], 'The expected argument was set on the unserialized view.');
+    $this->assertSame($unserialized->getCurrentPage(), 2, 'The expected current page was set on the unserialized view.');
 
     // Get the definition of node's nid field, for example. Only get it not from
     // the field manager directly, but from the item data definition. It should
diff --git a/core/modules/views/tests/src/Kernel/ViewStorageTest.php b/core/modules/views/tests/src/Kernel/ViewStorageTest.php
index 7cf953af74..2bd0f7163a 100644
--- a/core/modules/views/tests/src/Kernel/ViewStorageTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewStorageTest.php
@@ -101,7 +101,7 @@ protected function loadTests() {
       // exists.
       $original_options = $data['display'][$key];
       foreach ($original_options as $orig_key => $value) {
-        $this->assertIdentical($display[$orig_key], $value, format_string('@key is identical to saved data', ['@key' => $key]));
+        $this->assertSame($display[$orig_key], $value, format_string('@key is identical to saved data', ['@key' => $key]));
       }
     }
 
@@ -138,13 +138,13 @@ protected function createTests() {
     // Test all properties except displays.
     foreach ($properties as $property) {
       $this->assertTrue($created->get($property) !== NULL, format_string('Property: @property created on View.', ['@property' => $property]));
-      $this->assertIdentical($values[$property], $created->get($property), format_string('Property value: @property matches configuration value.', ['@property' => $property]));
+      $this->assertSame($values[$property], $created->get($property), format_string('Property value: @property matches configuration value.', ['@property' => $property]));
     }
 
     // Check the UUID of the loaded View.
     $created->save();
     $created_loaded = View::load('test_view_storage_new');
-    $this->assertIdentical($created->uuid(), $created_loaded->uuid(), 'The created UUID has been saved correctly.');
+    $this->assertSame($created->uuid(), $created_loaded->uuid(), 'The created UUID has been saved correctly.');
   }
 
   /**
@@ -323,7 +323,7 @@ public function testCreateDuplicate() {
 
     // Check the 'name' (ID) is using the View objects default value (NULL) as it
     // gets unset.
-    $this->assertIdentical($copy->id(), NULL, 'The ID has been reset.');
+    $this->assertSame($copy->id(), NULL, 'The ID has been reset.');
 
     // Check the other properties.
     // @todo Create a reusable property on the base test class for these?
@@ -337,13 +337,13 @@ public function testCreateDuplicate() {
     ];
 
     foreach ($config_properties as $property) {
-      $this->assertIdentical($view->storage->get($property), $copy->get($property), format_string('@property property is identical.', ['@property' => $property]));
+      $this->assertSame($view->storage->get($property), $copy->get($property), format_string('@property property is identical.', ['@property' => $property]));
     }
 
     // Check the displays are the same.
     $copy_display = $copy->get('display');
     foreach ($view->storage->get('display') as $id => $display) {
-      // assertIdentical will not work here.
+      // assertSame will not work here.
       $this->assertEqual($display, $copy_display[$id], format_string('The @display display has been copied correctly.', ['@display' => $id]));
     }
   }
diff --git a/core/modules/views_ui/src/Tests/ViewEditTest.php b/core/modules/views_ui/src/Tests/ViewEditTest.php
index a939f97ae6..d0af20c120 100644
--- a/core/modules/views_ui/src/Tests/ViewEditTest.php
+++ b/core/modules/views_ui/src/Tests/ViewEditTest.php
@@ -61,7 +61,7 @@ public function testOtherOptions() {
     $view = \Drupal::entityManager()->getStorage('view')->load('test_view');
     $displays = $view->get('display');
     $this->assertTrue(!empty($displays['test_1']), 'Display data found for new display ID key.');
-    $this->assertIdentical($displays['test_1']['id'], 'test_1', 'New display ID matches the display ID key.');
+    $this->assertSame($displays['test_1']['id'], 'test_1', 'New display ID matches the display ID key.');
     $this->assertFalse(array_key_exists('attachment_1', $displays), 'Old display ID not found.');
 
     // Set to the same machine name and save the View.
diff --git a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
index 91ee05be0c..c0e2dc172e 100644
--- a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
@@ -170,21 +170,21 @@ public function testSplitListing() {
     $this->drupalGet('admin/structure/views');
 
     $elements = $this->xpath($xpath, $arguments);
-    $this->assertIdentical(count($elements), 0, 'A disabled view is not found in the enabled views table.');
+    $this->assertSame(count($elements), 0, 'A disabled view is not found in the enabled views table.');
 
     $arguments[':status'] = 'views-list-section disabled';
     $elements = $this->xpath($xpath, $arguments);
-    $this->assertIdentical(count($elements), 1, 'A disabled view is found in the disabled views table.');
+    $this->assertSame(count($elements), 1, 'A disabled view is found in the disabled views table.');
 
     // Enable the view.
     $this->clickViewsOperationLink(t('Enable'), '/test_view_status/');
 
     $elements = $this->xpath($xpath, $arguments);
-    $this->assertIdentical(count($elements), 0, 'After enabling a view, it is not found in the disabled views table.');
+    $this->assertSame(count($elements), 0, 'After enabling a view, it is not found in the disabled views table.');
 
     $arguments[':status'] = 'views-list-section enabled';
     $elements = $this->xpath($xpath, $arguments);
-    $this->assertIdentical(count($elements), 1, 'After enabling a view, it is found in the enabled views table.');
+    $this->assertSame(count($elements), 1, 'After enabling a view, it is found in the enabled views table.');
 
     // Attempt to disable the view by path directly, with no token.
     $this->drupalGet('admin/structure/views/view/test_view_status/disable');
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
index 44724b4211..b85eb2ce35 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
@@ -109,7 +109,7 @@ public function testDisplayPluginsAlter() {
 
     // Test the expected views_ui array exists on each definition.
     foreach ($definitions as $definition) {
-      $this->assertIdentical($definition['contextual links']['entity.view.edit_form'], $expected, 'Expected views_ui array found in plugin definition.');
+      $this->assertSame($definition['contextual links']['entity.view.edit_form'], $expected, 'Expected views_ui array found in plugin definition.');
     }
   }
 
diff --git a/core/modules/views_ui/tests/src/Functional/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
index 826cdc24e5..fd3602a35e 100644
--- a/core/modules/views_ui/tests/src/Functional/HandlerTest.php
+++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
@@ -208,7 +208,7 @@ public function testBrokenHandlers() {
 
       $text = 'Broken/missing handler';
 
-      $this->assertIdentical($result[0]->getText(), $text, 'Ensure the broken handler text was found.');
+      $this->assertSame($result[0]->getText(), $text, 'Ensure the broken handler text was found.');
 
       $this->drupalGet($href);
       $result = $this->xpath('//h1[@class="page-title"]');
diff --git a/core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php
index 789369ceeb..c56a7278d8 100644
--- a/core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php
@@ -81,8 +81,8 @@ public function testDerivative() {
     $blur = $operation_manager->getToolkitOperation($toolkit, 'blur');
     $invert = $operation_manager->getToolkitOperation($toolkit, 'invert');
 
-    $this->assertIdentical('foo_derived', $blur->getPluginId(), "'Blur' operation overwritten by derivative.");
-    $this->assertIdentical('bar', $invert->getPluginId(), '"Invert" operation inherited from base plugin.');
+    $this->assertSame('foo_derived', $blur->getPluginId(), "'Blur' operation overwritten by derivative.");
+    $this->assertSame('bar', $invert->getPluginId(), '"Invert" operation inherited from base plugin.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/AssertLegacyTrait.php b/core/tests/Drupal/KernelTests/AssertLegacyTrait.php
index f63c4bf0b6..40491de828 100644
--- a/core/tests/Drupal/KernelTests/AssertLegacyTrait.php
+++ b/core/tests/Drupal/KernelTests/AssertLegacyTrait.php
@@ -88,12 +88,12 @@ protected function assertNotIdentical($actual, $expected, $message = '') {
   }
 
   /**
-   * @see \Drupal\simpletest\TestBase::assertIdenticalObject()
+   * @see \Drupal\simpletest\TestBase::assertSameObject()
    *
    * @deprecated Scheduled for removal in Drupal 9.0.0. Use self::assertEquals()
    *   instead.
    */
-  protected function assertIdenticalObject($actual, $expected, $message = '') {
+  protected function assertSameObject($actual, $expected, $message = '') {
     // Note: ::assertSame checks whether its the same object. ::assertEquals
     // though compares
 
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
index 13af30f6c0..e3090e26f4 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
@@ -210,17 +210,17 @@ public function testSettings() {
 
     // Test whether the settings for core/drupalSettings are available.
     $this->assertTrue(isset($parsed_settings['path']['baseUrl']), 'drupalSettings.path.baseUrl is present.');
-    $this->assertIdentical($parsed_settings['path']['pathPrefix'], 'yarhar', 'drupalSettings.path.pathPrefix is present and has the correct (overridden) value.');
-    $this->assertIdentical($parsed_settings['path']['currentPath'], '', 'drupalSettings.path.currentPath is present and has the correct value.');
-    $this->assertIdentical($parsed_settings['path']['currentPathIsAdmin'], FALSE, 'drupalSettings.path.currentPathIsAdmin is present and has the correct value.');
-    $this->assertIdentical($parsed_settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is present and has the correct value.');
-    $this->assertIdentical($parsed_settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is present and has the correct value.');
+    $this->assertSame($parsed_settings['path']['pathPrefix'], 'yarhar', 'drupalSettings.path.pathPrefix is present and has the correct (overridden) value.');
+    $this->assertSame($parsed_settings['path']['currentPath'], '', 'drupalSettings.path.currentPath is present and has the correct value.');
+    $this->assertSame($parsed_settings['path']['currentPathIsAdmin'], FALSE, 'drupalSettings.path.currentPathIsAdmin is present and has the correct value.');
+    $this->assertSame($parsed_settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is present and has the correct value.');
+    $this->assertSame($parsed_settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is present and has the correct value.');
 
     // Tests whether altering JavaScript settings via hook_js_settings_alter()
     // is working as expected.
     // @see common_test_js_settings_alter()
-    $this->assertIdentical($parsed_settings['pluralDelimiter'], '☃');
-    $this->assertIdentical($parsed_settings['foo'], 'bar');
+    $this->assertSame($parsed_settings['pluralDelimiter'], '☃');
+    $this->assertSame($parsed_settings['foo'], 'bar');
   }
 
   /**
@@ -318,7 +318,7 @@ public function testRenderOrder() {
     else {
       $result = [];
     }
-    $this->assertIdentical($result, $expected_order_js, 'JavaScript is added in the expected weight order.');
+    $this->assertSame($result, $expected_order_js, 'JavaScript is added in the expected weight order.');
 
     // Construct the expected result from the regex.
     $expected_order_css = [
@@ -360,7 +360,7 @@ public function testRenderOrder() {
     else {
       $result = [];
     }
-    $this->assertIdentical($result, $expected_order_css, 'CSS is added in the expected weight order.');
+    $this->assertSame($result, $expected_order_css, 'CSS is added in the expected weight order.');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php b/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php
index 4c5448718e..4d2347ff32 100644
--- a/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php
@@ -36,18 +36,18 @@ public function testDrupalGetFilename() {
     system_rebuild_module_data();
 
     // Retrieving the location of a module.
-    $this->assertIdentical(drupal_get_filename('module', 'system'), 'core/modules/system/system.info.yml');
+    $this->assertSame(drupal_get_filename('module', 'system'), 'core/modules/system/system.info.yml');
 
     // Retrieving the location of a theme.
     \Drupal::service('theme_handler')->install(['stark']);
-    $this->assertIdentical(drupal_get_filename('theme', 'stark'), 'core/themes/stark/stark.info.yml');
+    $this->assertSame(drupal_get_filename('theme', 'stark'), 'core/themes/stark/stark.info.yml');
 
     // Retrieving the location of a theme engine.
-    $this->assertIdentical(drupal_get_filename('theme_engine', 'twig'), 'core/themes/engines/twig/twig.info.yml');
+    $this->assertSame(drupal_get_filename('theme_engine', 'twig'), 'core/themes/engines/twig/twig.info.yml');
 
     // Retrieving the location of a profile. Profiles are a special case with
     // a fixed location and naming.
-    $this->assertIdentical(drupal_get_filename('profile', 'testing'), 'core/profiles/testing/testing.info.yml');
+    $this->assertSame(drupal_get_filename('profile', 'testing'), 'core/profiles/testing/testing.info.yml');
 
 
     // Generate a non-existing module name.
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
index a08d0f9ef1..1e7c3d9bc5 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
@@ -321,10 +321,10 @@ public function testGetMultiple() {
     $this->assertFalse(isset($ret['test19']), "Nonexistent cache id test19 is not set.");
     $this->assertFalse(isset($ret['test21']), "Nonexistent cache id test21 is not set.");
     // Test values.
-    $this->assertIdentical($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
-    $this->assertIdentical($ret['test3']->data, 5, "Existing cache id test3 has the correct value.");
-    $this->assertIdentical($ret['test6']->data, 13, "Existing cache id test6 has the correct value.");
-    $this->assertIdentical($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
+    $this->assertSame($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
+    $this->assertSame($ret['test3']->data, 5, "Existing cache id test3 has the correct value.");
+    $this->assertSame($ret['test6']->data, 13, "Existing cache id test6 has the correct value.");
+    $this->assertSame($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
     // Test $cids array - ensure it contains cache id's that do not exist.
     $this->assert(in_array('test19', $cids), "Nonexistent cache id test19 is in cids array.");
     $this->assert(in_array('test21', $cids), "Nonexistent cache id test21 is in cids array.");
@@ -351,9 +351,9 @@ public function testGetMultiple() {
     $this->assertFalse(isset($ret['test6']), "Deleted cache id test6 is not set");
     $this->assertFalse(isset($ret['test21']), "Nonexistent cache id test21 is not set");
     // Test values.
-    $this->assertIdentical($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
-    $this->assertIdentical($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
-    $this->assertIdentical($ret['test19']->data, 57, "Added cache id test19 has the correct value.");
+    $this->assertSame($ret['test2']->data, 3, "Existing cache id test2 has the correct value.");
+    $this->assertSame($ret['test7']->data, 17, "Existing cache id test7 has the correct value.");
+    $this->assertSame($ret['test19']->data, 57, "Added cache id test19 has the correct value.");
     // Test $cids array - ensure it contains cache id's that do not exist.
     $this->assert(in_array('test3', $cids), "Deleted cache id test3 is in cids array.");
     $this->assert(in_array('test6', $cids), "Deleted cache id test6 is in cids array.");
diff --git a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
index 17b6ae41da..5bd69fb1bf 100644
--- a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
@@ -212,7 +212,7 @@ public function testScriptLoad() {
 
     // Ensure the test config has been replaced.
     $config = unserialize(db_query("SELECT data FROM {config} WHERE name = 'test_config'")->fetchField());
-    $this->assertIdentical($config, $this->data, 'Script has properly restored the config table data.');
+    $this->assertSame($config, $this->data, 'Script has properly restored the config table data.');
 
     // Ensure the cache data was not exported.
     $this->assertFalse(\Drupal::cache('discovery')
diff --git a/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php b/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
index 23754879eb..ceaa5efeea 100644
--- a/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
@@ -48,9 +48,9 @@ public function testBadProtocolStripping() {
     $url = 'javascript:http://www.example.com/?x=1&y=2';
     $expected_plain = 'http://www.example.com/?x=1&y=2';
     $expected_html = 'http://www.example.com/?x=1&amp;y=2';
-    $this->assertIdentical(check_url($url), $expected_html, 'check_url() filters a URL and encodes it for HTML.');
-    $this->assertIdentical(UrlHelper::filterBadProtocol($url), $expected_html, '\Drupal\Component\Utility\UrlHelper::filterBadProtocol() filters a URL and encodes it for HTML.');
-    $this->assertIdentical(UrlHelper::stripDangerousProtocols($url), $expected_plain, '\Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() filters a URL and returns plain text.');
+    $this->assertSame(check_url($url), $expected_html, 'check_url() filters a URL and encodes it for HTML.');
+    $this->assertSame(UrlHelper::filterBadProtocol($url), $expected_html, '\Drupal\Component\Utility\UrlHelper::filterBadProtocol() filters a URL and encodes it for HTML.');
+    $this->assertSame(UrlHelper::stripDangerousProtocols($url), $expected_plain, '\Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() filters a URL and returns plain text.');
 
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
index 9f2a1a75ff..e2b1bb776b 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
@@ -43,30 +43,30 @@ public function testCRUD() {
     $name = 'config_test.crud';
 
     $config = $this->config($name);
-    $this->assertIdentical($config->isNew(), TRUE);
+    $this->assertSame($config->isNew(), TRUE);
 
     // Create a new configuration object.
     $config->set('value', 'initial');
     $config->save();
-    $this->assertIdentical($config->isNew(), FALSE);
+    $this->assertSame($config->isNew(), FALSE);
 
     // Verify the active configuration contains the saved value.
     $actual_data = $storage->read($name);
-    $this->assertIdentical($actual_data, ['value' => 'initial']);
+    $this->assertSame($actual_data, ['value' => 'initial']);
 
     // Update the configuration object instance.
     $config->set('value', 'instance-update');
     $config->save();
-    $this->assertIdentical($config->isNew(), FALSE);
+    $this->assertSame($config->isNew(), FALSE);
 
     // Verify the active configuration contains the updated value.
     $actual_data = $storage->read($name);
-    $this->assertIdentical($actual_data, ['value' => 'instance-update']);
+    $this->assertSame($actual_data, ['value' => 'instance-update']);
 
     // Verify a call to $this->config() immediately returns the updated value.
     $new_config = $this->config($name);
-    $this->assertIdentical($new_config->get(), $config->get());
-    $this->assertIdentical($config->isNew(), FALSE);
+    $this->assertSame($new_config->get(), $config->get());
+    $this->assertSame($config->isNew(), FALSE);
 
     // Pollute the config factory static cache.
     $config_factory->getEditable($name);
@@ -75,48 +75,48 @@ public function testCRUD() {
     $config->delete();
 
     // Verify the configuration object is empty.
-    $this->assertIdentical($config->get(), []);
-    $this->assertIdentical($config->isNew(), TRUE);
+    $this->assertSame($config->get(), []);
+    $this->assertSame($config->isNew(), TRUE);
 
     // Verify that all copies of the configuration has been removed from the
     // static cache.
-    $this->assertIdentical($config_factory->getEditable($name)->isNew(), TRUE);
+    $this->assertSame($config_factory->getEditable($name)->isNew(), TRUE);
 
     // Verify the active configuration contains no value.
     $actual_data = $storage->read($name);
-    $this->assertIdentical($actual_data, FALSE);
+    $this->assertSame($actual_data, FALSE);
 
     // Verify $this->config() returns no data.
     $new_config = $this->config($name);
-    $this->assertIdentical($new_config->get(), $config->get());
-    $this->assertIdentical($config->isNew(), TRUE);
+    $this->assertSame($new_config->get(), $config->get());
+    $this->assertSame($config->isNew(), TRUE);
 
     // Re-create the configuration object.
     $config->set('value', 're-created');
     $config->save();
-    $this->assertIdentical($config->isNew(), FALSE);
+    $this->assertSame($config->isNew(), FALSE);
 
     // Verify the active configuration contains the updated value.
     $actual_data = $storage->read($name);
-    $this->assertIdentical($actual_data, ['value' => 're-created']);
+    $this->assertSame($actual_data, ['value' => 're-created']);
 
     // Verify a call to $this->config() immediately returns the updated value.
     $new_config = $this->config($name);
-    $this->assertIdentical($new_config->get(), $config->get());
-    $this->assertIdentical($config->isNew(), FALSE);
+    $this->assertSame($new_config->get(), $config->get());
+    $this->assertSame($config->isNew(), FALSE);
 
     // Rename the configuration object.
     $new_name = 'config_test.crud_rename';
     $this->container->get('config.factory')->rename($name, $new_name);
     $renamed_config = $this->config($new_name);
-    $this->assertIdentical($renamed_config->get(), $config->get());
-    $this->assertIdentical($renamed_config->isNew(), FALSE);
+    $this->assertSame($renamed_config->get(), $config->get());
+    $this->assertSame($renamed_config->isNew(), FALSE);
 
     // Ensure that the old configuration object is removed from both the cache
     // and the configuration storage.
     $config = $this->config($name);
-    $this->assertIdentical($config->get(), []);
-    $this->assertIdentical($config->isNew(), TRUE);
+    $this->assertSame($config->get(), []);
+    $this->assertSame($config->isNew(), TRUE);
 
     // Test renaming when config.factory does not have the object in its static
     // cache.
@@ -129,12 +129,12 @@ public function testCRUD() {
     $new_name = 'config_test.crud_rename_no_cache';
     $config_factory->rename($name, $new_name);
     $renamed_config = $config_factory->get($new_name);
-    $this->assertIdentical($renamed_config->get(), $config->get());
-    $this->assertIdentical($renamed_config->isNew(), FALSE);
+    $this->assertSame($renamed_config->get(), $config->get());
+    $this->assertSame($renamed_config->isNew(), FALSE);
     // Ensure the overrides static cache has been cleared.
-    $this->assertIdentical($config_factory->get($name)->isNew(), TRUE);
+    $this->assertSame($config_factory->get($name)->isNew(), TRUE);
     // Ensure the non-overrides static cache has been cleared.
-    $this->assertIdentical($config_factory->getEditable($name)->isNew(), TRUE);
+    $this->assertSame($config_factory->getEditable($name)->isNew(), TRUE);
 
     // Merge data into the configuration object.
     $new_config = $this->config($new_name);
@@ -144,8 +144,8 @@ public function testCRUD() {
     ];
     $new_config->merge($expected_values);
     $new_config->save();
-    $this->assertIdentical($new_config->get('value'), $expected_values['value']);
-    $this->assertIdentical($new_config->get('404'), $expected_values['404']);
+    $this->assertSame($new_config->get('value'), $expected_values['value']);
+    $this->assertSame($new_config->get('404'), $expected_values['404']);
 
     // Test that getMultiple() does not return new config objects that were
     // previously accessed with get()
@@ -260,22 +260,22 @@ public function testDataTypes() {
       'string_int' => '1',
     ];
     $data['_core']['default_config_hash'] = Crypt::hashBase64(serialize($data));
-    $this->assertIdentical($config->get(), $data);
+    $this->assertSame($config->get(), $data);
 
     // Re-set each key using Config::set().
     foreach ($data as $key => $value) {
       $config->set($key, $value);
     }
     $config->save();
-    $this->assertIdentical($config->get(), $data);
+    $this->assertSame($config->get(), $data);
     // Assert the data against the file storage.
-    $this->assertIdentical($storage->read($name), $data);
+    $this->assertSame($storage->read($name), $data);
     $this->verbose('<pre>' . $name . var_export($storage->read($name), TRUE));
 
     // Set data using config::setData().
     $config->setData($data)->save();
-    $this->assertIdentical($config->get(), $data);
-    $this->assertIdentical($storage->read($name), $data);
+    $this->assertSame($config->get(), $data);
+    $this->assertSame($storage->read($name), $data);
 
     // Test that schema type enforcement can be overridden by trusting the data.
     $this->assertSame(99, $config->get('int'));
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
index b69735ea91..cdd601f773 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
@@ -166,11 +166,11 @@ protected function assertYamlEdit(array $edits, $field, $type, $orig = NULL, $cl
             $this->assertEqual($edit->type, $type, "The $field item in the diff is a $type");
             // If an original value was given, assert that it matches.
             if (isset($orig)) {
-              $this->assertIdentical($edit->orig, $orig, "The original value for key '$field' is correct.");
+              $this->assertSame($edit->orig, $orig, "The original value for key '$field' is correct.");
             }
             // If a closing value was given, assert that it matches.
             if (isset($closing)) {
-              $this->assertIdentical($edit->closing, $closing, "The closing value for key '$field' is correct.");
+              $this->assertSame($edit->closing, $closing, "The closing value for key '$field' is correct.");
             }
             // Break out of the search entirely.
             break 2;
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
index 5a137b9f4f..da680afd5e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
@@ -40,7 +40,7 @@ public function testNormalize() {
     $config_entity->save();
 
     $config = $this->config('config_test.dynamic.system');
-    $this->assertIdentical($config_entity->toArray(), $config->getRawData(), 'Stored config entity is equivalent to config schema.');
+    $this->assertSame($config_entity->toArray(), $config->getRawData(), 'Stored config entity is equivalent to config schema.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
index 1cd9cb1753..b968b6b395 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
@@ -73,7 +73,7 @@ public function testReset() {
     $entity->label = 'New label';
     $entity->save();
     $entity = $storage->load($this->entityId);
-    $this->assertIdentical($entity->label, 'New label');
+    $this->assertSame($entity->label, 'New label');
 
     // Ensure loading after a delete retrieves NULL rather than an obsolete
     // cached one.
@@ -94,7 +94,7 @@ public function testConfigOverride() {
     // despite the prior cache priming.
     \Drupal::configFactory()->addOverride(new ConfigOverrider());
     $entity_override = $storage->load($this->entityId);
-    $this->assertIdentical($entity_override->label, 'Overridden label');
+    $this->assertSame($entity_override->label, 'Overridden label');
 
     // Load override free to ensure that loading the config entity again does
     // not return the overridden value.
@@ -103,10 +103,10 @@ public function testConfigOverride() {
     $this->assertNotIdentical($entity_override->_loadStamp, $entity_no_override->_loadStamp);
 
     // Reload the entity and ensure the cache is used.
-    $this->assertIdentical($storage->loadOverrideFree($this->entityId)->_loadStamp, $entity_no_override->_loadStamp);
+    $this->assertSame($storage->loadOverrideFree($this->entityId)->_loadStamp, $entity_no_override->_loadStamp);
 
     // Enable overrides and reload the entity and ensure the cache is used.
-    $this->assertIdentical($storage->load($this->entityId)->_loadStamp, $entity_override->_loadStamp);
+    $this->assertSame($storage->load($this->entityId)->_loadStamp, $entity_override->_loadStamp);
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
index ce9a928d53..fe48673b8d 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
@@ -48,7 +48,7 @@ public function testUUIDConflict() {
 
     // Ensure that the config entity was not corrupted.
     $entity = entity_load('config_test', $entity->id(), TRUE);
-    $this->assertIdentical($entity->toArray(), $original_properties);
+    $this->assertSame($entity->toArray(), $original_properties);
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
index 807152bfed..83dab6a1ed 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
@@ -52,7 +52,7 @@ public function testStorageMethods() {
     $expected_id = 'test_id';
     $config_name = $entity_type->getConfigPrefix() . '.' . $expected_id;
     $storage = $this->storage;
-    $this->assertIdentical($storage::getIDFromConfigName($config_name, $entity_type->getConfigPrefix()), $expected_id);
+    $this->assertSame($storage::getIDFromConfigName($config_name, $entity_type->getConfigPrefix()), $expected_id);
 
     // Create three entities, two with the same style.
     $style = $this->randomMachineName(8);
@@ -90,7 +90,7 @@ public function testStorageMethods() {
 
     // Assert that both returned entities have a matching style property.
     foreach ($entities as $entity) {
-      $this->assertIdentical($entity->get('style'), $style, 'The loaded entity has the correct style value specified.');
+      $this->assertSame($entity->get('style'), $style, 'The loaded entity has the correct style value specified.');
     }
 
     // Test that schema type enforcement can be overridden by trusting the data.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
index 74bb7984e6..9c66d5be6c 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
@@ -28,28 +28,28 @@ public function testConfigEvents() {
 
     $config = new Config($name, \Drupal::service('config.storage'), \Drupal::service('event_dispatcher'), \Drupal::service('config.typed'));
     $config->set('key', 'initial');
-    $this->assertIdentical(\Drupal::state()->get('config_events_test.event', []), [], 'No events fired by creating a new configuration object');
+    $this->assertSame(\Drupal::state()->get('config_events_test.event', []), [], 'No events fired by creating a new configuration object');
     $config->save();
 
     $event = \Drupal::state()->get('config_events_test.event', []);
-    $this->assertIdentical($event['event_name'], ConfigEvents::SAVE);
-    $this->assertIdentical($event['current_config_data'], ['key' => 'initial']);
-    $this->assertIdentical($event['raw_config_data'], ['key' => 'initial']);
-    $this->assertIdentical($event['original_config_data'], []);
+    $this->assertSame($event['event_name'], ConfigEvents::SAVE);
+    $this->assertSame($event['current_config_data'], ['key' => 'initial']);
+    $this->assertSame($event['raw_config_data'], ['key' => 'initial']);
+    $this->assertSame($event['original_config_data'], []);
 
     $config->set('key', 'updated')->save();
     $event = \Drupal::state()->get('config_events_test.event', []);
-    $this->assertIdentical($event['event_name'], ConfigEvents::SAVE);
-    $this->assertIdentical($event['current_config_data'], ['key' => 'updated']);
-    $this->assertIdentical($event['raw_config_data'], ['key' => 'updated']);
-    $this->assertIdentical($event['original_config_data'], ['key' => 'initial']);
+    $this->assertSame($event['event_name'], ConfigEvents::SAVE);
+    $this->assertSame($event['current_config_data'], ['key' => 'updated']);
+    $this->assertSame($event['raw_config_data'], ['key' => 'updated']);
+    $this->assertSame($event['original_config_data'], ['key' => 'initial']);
 
     $config->delete();
     $event = \Drupal::state()->get('config_events_test.event', []);
-    $this->assertIdentical($event['event_name'], ConfigEvents::DELETE);
-    $this->assertIdentical($event['current_config_data'], []);
-    $this->assertIdentical($event['raw_config_data'], []);
-    $this->assertIdentical($event['original_config_data'], ['key' => 'updated']);
+    $this->assertSame($event['event_name'], ConfigEvents::DELETE);
+    $this->assertSame($event['current_config_data'], []);
+    $this->assertSame($event['raw_config_data'], []);
+    $this->assertSame($event['original_config_data'], ['key' => 'updated']);
   }
 
   /**
@@ -64,18 +64,18 @@ public function testConfigRenameEvent() {
     $config = $this->config($name);
     $config->set('key', 'initial')->save();
     $event = \Drupal::state()->get('config_events_test.event', []);
-    $this->assertIdentical($event['event_name'], ConfigEvents::SAVE);
-    $this->assertIdentical($event['current_config_data'], ['key' => 'initial']);
+    $this->assertSame($event['event_name'], ConfigEvents::SAVE);
+    $this->assertSame($event['current_config_data'], ['key' => 'initial']);
 
     // Override applies when getting runtime config.
     $this->assertEqual($GLOBALS['config'][$name], \Drupal::config($name)->get());
 
     \Drupal::configFactory()->rename($name, $new_name);
     $event = \Drupal::state()->get('config_events_test.event', []);
-    $this->assertIdentical($event['event_name'], ConfigEvents::RENAME);
-    $this->assertIdentical($event['current_config_data'], ['key' => 'new overridden']);
-    $this->assertIdentical($event['raw_config_data'], ['key' => 'initial']);
-    $this->assertIdentical($event['original_config_data'], ['key' => 'new overridden']);
+    $this->assertSame($event['event_name'], ConfigEvents::RENAME);
+    $this->assertSame($event['current_config_data'], ['key' => 'new overridden']);
+    $this->assertSame($event['raw_config_data'], ['key' => 'initial']);
+    $this->assertSame($event['original_config_data'], ['key' => 'new overridden']);
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
index b449064e04..c73623fd67 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
@@ -62,7 +62,7 @@ public function testReadWriteConfig() {
 
     // Verify nothing was saved.
     $data = $storage->read($name);
-    $this->assertIdentical($data, FALSE);
+    $this->assertSame($data, FALSE);
 
     // Add a top level value.
     $config = $this->config($name);
@@ -122,7 +122,7 @@ public function testReadWriteConfig() {
     $this->assertTrue($config->get($true_key), "Boolean TRUE value returned the TRUE.");
 
     // Read null value.
-    $this->assertIdentical($config->get('null'), NULL);
+    $this->assertSame($config->get('null'), NULL);
 
     // Read false that had been nested in an array value.
     $this->assertSame($config->get($casting_array_false_value_key), FALSE, "Nested boolean FALSE value returned FALSE.");
@@ -181,7 +181,7 @@ public function testReadWriteConfig() {
 
     // Verify the database entry no longer exists.
     $data = $storage->read($name);
-    $this->assertIdentical($data, FALSE);
+    $this->assertSame($data, FALSE);
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
index 9d3989cf18..5f87fb297d 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
@@ -68,7 +68,7 @@ public function testNoImport() {
 
     // Verify the default configuration values exist.
     $config = $this->config($dynamic_name);
-    $this->assertIdentical($config->get('id'), 'dotted.default');
+    $this->assertSame($config->get('id'), 'dotted.default');
 
     // Verify that a bare $this->config() does not involve module APIs.
     $this->assertFalse(isset($GLOBALS['hook_config_test']));
@@ -121,7 +121,7 @@ public function testDeleted() {
 
     // Verify the default configuration values exist.
     $config = $this->config($dynamic_name);
-    $this->assertIdentical($config->get('id'), 'dotted.default');
+    $this->assertSame($config->get('id'), 'dotted.default');
 
     // Delete the file from the sync directory.
     $sync->delete($dynamic_name);
@@ -130,10 +130,10 @@ public function testDeleted() {
     $this->configImporter->reset()->import();
 
     // Verify the file has been removed.
-    $this->assertIdentical($storage->read($dynamic_name), FALSE);
+    $this->assertSame($storage->read($dynamic_name), FALSE);
 
     $config = $this->config($dynamic_name);
-    $this->assertIdentical($config->get('id'), NULL);
+    $this->assertSame($config->get('id'), NULL);
 
     // Verify that appropriate module API hooks have been invoked.
     $this->assertTrue(isset($GLOBALS['hook_config_test']['load']));
@@ -157,7 +157,7 @@ public function testNew() {
     $sync = $this->container->get('config.storage.sync');
 
     // Verify the configuration to create does not exist yet.
-    $this->assertIdentical($storage->exists($dynamic_name), FALSE, $dynamic_name . ' not found.');
+    $this->assertSame($storage->exists($dynamic_name), FALSE, $dynamic_name . ' not found.');
 
     // Create new config entity.
     $original_dynamic_data = [
@@ -175,14 +175,14 @@ public function testNew() {
     ];
     $sync->write($dynamic_name, $original_dynamic_data);
 
-    $this->assertIdentical($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.');
+    $this->assertSame($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.');
 
     // Import.
     $this->configImporter->reset()->import();
 
     // Verify the values appeared.
     $config = $this->config($dynamic_name);
-    $this->assertIdentical($config->get('label'), $original_dynamic_data['label']);
+    $this->assertSame($config->get('label'), $original_dynamic_data['label']);
 
     // Verify that appropriate module API hooks have been invoked.
     $this->assertFalse(isset($GLOBALS['hook_config_test']['load']));
@@ -478,8 +478,8 @@ public function testUpdated() {
     $sync = $this->container->get('config.storage.sync');
 
     // Verify that the configuration objects to import exist.
-    $this->assertIdentical($storage->exists($name), TRUE, $name . ' found.');
-    $this->assertIdentical($storage->exists($dynamic_name), TRUE, $dynamic_name . ' found.');
+    $this->assertSame($storage->exists($name), TRUE, $name . ' found.');
+    $this->assertSame($storage->exists($dynamic_name), TRUE, $dynamic_name . ' found.');
 
     // Replace the file content of the existing configuration objects in the
     // sync directory.
@@ -493,9 +493,9 @@ public function testUpdated() {
 
     // Verify the active configuration still returns the default values.
     $config = $this->config($name);
-    $this->assertIdentical($config->get('foo'), 'bar');
+    $this->assertSame($config->get('foo'), 'bar');
     $config = $this->config($dynamic_name);
-    $this->assertIdentical($config->get('label'), 'Default');
+    $this->assertSame($config->get('label'), 'Default');
 
     // Import.
     $this->configImporter->reset()->import();
@@ -503,13 +503,13 @@ public function testUpdated() {
     // Verify the values were updated.
     \Drupal::configFactory()->reset($name);
     $config = $this->config($name);
-    $this->assertIdentical($config->get('foo'), 'beer');
+    $this->assertSame($config->get('foo'), 'beer');
     $config = $this->config($dynamic_name);
-    $this->assertIdentical($config->get('label'), 'Updated');
+    $this->assertSame($config->get('label'), 'Updated');
 
     // Verify that the original file content is still the same.
-    $this->assertIdentical($sync->read($name), $original_name_data);
-    $this->assertIdentical($sync->read($dynamic_name), $original_dynamic_data);
+    $this->assertSame($sync->read($name), $original_name_data);
+    $this->assertSame($sync->read($dynamic_name), $original_dynamic_data);
 
     // Verify that appropriate module API hooks have been invoked.
     $this->assertTrue(isset($GLOBALS['hook_config_test']['load']));
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
index 9e473c29ff..054a2948f1 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
@@ -40,9 +40,9 @@ public function testModuleInstallation() {
 
     // Verify that default module config does not exist before installation yet.
     $config = $this->config($default_config);
-    $this->assertIdentical($config->isNew(), TRUE);
+    $this->assertSame($config->isNew(), TRUE);
     $config = $this->config($default_configuration_entity);
-    $this->assertIdentical($config->isNew(), TRUE);
+    $this->assertSame($config->isNew(), TRUE);
 
     // Ensure that schema provided by modules that are not installed is not
     // available.
@@ -55,9 +55,9 @@ public function testModuleInstallation() {
     \Drupal::configFactory()->reset($default_config);
     \Drupal::configFactory()->reset($default_configuration_entity);
     $config = $this->config($default_config);
-    $this->assertIdentical($config->isNew(), FALSE);
+    $this->assertSame($config->isNew(), FALSE);
     $config = $this->config($default_configuration_entity);
-    $this->assertIdentical($config->isNew(), FALSE);
+    $this->assertSame($config->isNew(), FALSE);
 
     // Verify that config_test API hooks were invoked for the dynamic default
     // configuration entity.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
index 5bf6f0ec47..bc1e6ca7e0 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
@@ -36,22 +36,22 @@ public function testConfigLanguageOverride() {
     // English overrides work.
     \Drupal::languageManager()->setConfigOverrideLanguage(\Drupal::languageManager()->getLanguage('en'));
     $config = \Drupal::config('config_test.system');
-    $this->assertIdentical($config->get('foo'), 'en bar');
+    $this->assertSame($config->get('foo'), 'en bar');
 
     // Ensure that the raw data is not translated.
     $raw = $config->getRawData();
-    $this->assertIdentical($raw['foo'], 'bar');
+    $this->assertSame($raw['foo'], 'bar');
 
     ConfigurableLanguage::createFromLangcode('fr')->save();
     ConfigurableLanguage::createFromLangcode('de')->save();
 
     \Drupal::languageManager()->setConfigOverrideLanguage(\Drupal::languageManager()->getLanguage('fr'));
     $config = \Drupal::config('config_test.system');
-    $this->assertIdentical($config->get('foo'), 'fr bar');
+    $this->assertSame($config->get('foo'), 'fr bar');
 
     \Drupal::languageManager()->setConfigOverrideLanguage(\Drupal::languageManager()->getLanguage('de'));
     $config = \Drupal::config('config_test.system');
-    $this->assertIdentical($config->get('foo'), 'de bar');
+    $this->assertSame($config->get('foo'), 'de bar');
 
     // Test overrides of completely new configuration objects. In normal runtime
     // this should only happen for configuration entities as we should not be
@@ -62,8 +62,8 @@ public function testConfigLanguageOverride() {
       ->save();
     $config = \Drupal::config('config_test.new');
     $this->assertTrue($config->isNew(), 'The configuration object config_test.new is new');
-    $this->assertIdentical($config->get('language'), 'override');
-    $this->assertIdentical($config->getOriginal('language', FALSE), NULL);
+    $this->assertSame($config->get('language'), 'override');
+    $this->assertSame($config->getOriginal('language', FALSE), NULL);
 
     // Test how overrides react to base configuration changes. Set up some base
     // values.
@@ -82,7 +82,7 @@ public function testConfigLanguageOverride() {
       ->save();
     \Drupal::configFactory()->clearStaticCache();
     $config = \Drupal::config('config_test.foo');
-    $this->assertIdentical($config->get('value'), ['key' => 'override']);
+    $this->assertSame($config->get('value'), ['key' => 'override']);
 
     // Ensure renaming the config will rename the override.
     \Drupal::languageManager()->setConfigOverrideLanguage(\Drupal::languageManager()->getLanguage('en'));
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
index a94123d4cb..dfe78fc7b2 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
@@ -42,8 +42,8 @@ public function testSimpleModuleOverrides() {
     // creating simple configuration objects on the fly.
     $config = $config_factory->get('config_override_test.new');
     $this->assertTrue($config->isNew(), 'The configuration object config_override_test.new is new');
-    $this->assertIdentical($config->get('module'), 'override');
-    $this->assertIdentical($config->getOriginal('module', FALSE), NULL);
+    $this->assertSame($config->get('module'), 'override');
+    $this->assertSame($config->getOriginal('module', FALSE), NULL);
 
     unset($GLOBALS['config_test_run_module_overrides']);
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
index b2ddaa396d..9b2a961cc4 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
@@ -46,25 +46,25 @@ public function testConfOverride() {
     // directly otherwise overrides will apply.
     $active = $this->container->get('config.storage');
     $data = $active->read('config_test.system');
-    $this->assertIdentical($data['foo'], $expected_original_data['foo']);
+    $this->assertSame($data['foo'], $expected_original_data['foo']);
     $this->assertFalse(isset($data['baz']));
-    $this->assertIdentical($data['404'], $expected_original_data['404']);
+    $this->assertSame($data['404'], $expected_original_data['404']);
 
     // Get the configuration object with overrides.
     $config = \Drupal::configFactory()->get('config_test.system');
 
     // Verify that it contains the overridden data from $config.
-    $this->assertIdentical($config->get('foo'), $overrides['config_test.system']['foo']);
-    $this->assertIdentical($config->get('baz'), $overrides['config_test.system']['baz']);
-    $this->assertIdentical($config->get('404'), $overrides['config_test.system']['404']);
+    $this->assertSame($config->get('foo'), $overrides['config_test.system']['foo']);
+    $this->assertSame($config->get('baz'), $overrides['config_test.system']['baz']);
+    $this->assertSame($config->get('404'), $overrides['config_test.system']['404']);
 
     // Get the configuration object which does not have overrides.
     $config = \Drupal::configFactory()->getEditable('config_test.system');
 
     // Verify that it does not contains the overridden data from $config.
-    $this->assertIdentical($config->get('foo'), $expected_original_data['foo']);
-    $this->assertIdentical($config->get('baz'), NULL);
-    $this->assertIdentical($config->get('404'), $expected_original_data['404']);
+    $this->assertSame($config->get('foo'), $expected_original_data['foo']);
+    $this->assertSame($config->get('baz'), NULL);
+    $this->assertSame($config->get('404'), $expected_original_data['404']);
 
     // Set the value for 'baz' (on the original data).
     $expected_original_data['baz'] = 'original baz';
@@ -79,14 +79,14 @@ public function testConfOverride() {
 
     // Reload it and verify that it still contains overridden data from $config.
     $config = \Drupal::config('config_test.system');
-    $this->assertIdentical($config->get('foo'), $overrides['config_test.system']['foo']);
-    $this->assertIdentical($config->get('baz'), $overrides['config_test.system']['baz']);
-    $this->assertIdentical($config->get('404'), $overrides['config_test.system']['404']);
+    $this->assertSame($config->get('foo'), $overrides['config_test.system']['foo']);
+    $this->assertSame($config->get('baz'), $overrides['config_test.system']['baz']);
+    $this->assertSame($config->get('404'), $overrides['config_test.system']['404']);
 
     // Verify that raw config data has changed.
-    $this->assertIdentical($config->getOriginal('foo', FALSE), $expected_original_data['foo']);
-    $this->assertIdentical($config->getOriginal('baz', FALSE), $expected_original_data['baz']);
-    $this->assertIdentical($config->getOriginal('404', FALSE), $expected_original_data['404']);
+    $this->assertSame($config->getOriginal('foo', FALSE), $expected_original_data['foo']);
+    $this->assertSame($config->getOriginal('baz', FALSE), $expected_original_data['baz']);
+    $this->assertSame($config->getOriginal('404', FALSE), $expected_original_data['404']);
 
     // Write file to sync.
     $sync = $this->container->get('config.storage.sync');
@@ -102,15 +102,15 @@ public function testConfOverride() {
 
     // Verify that the new configuration data exists. Have to read storage
     // directly otherwise overrides will apply.
-    $this->assertIdentical($data['foo'], $expected_new_data['foo']);
+    $this->assertSame($data['foo'], $expected_new_data['foo']);
     $this->assertFalse(isset($data['baz']));
-    $this->assertIdentical($data['404'], $expected_new_data['404']);
+    $this->assertSame($data['404'], $expected_new_data['404']);
 
     // Verify that the overrides are still working.
     $config = \Drupal::config('config_test.system');
-    $this->assertIdentical($config->get('foo'), $overrides['config_test.system']['foo']);
-    $this->assertIdentical($config->get('baz'), $overrides['config_test.system']['baz']);
-    $this->assertIdentical($config->get('404'), $overrides['config_test.system']['404']);
+    $this->assertSame($config->get('foo'), $overrides['config_test.system']['foo']);
+    $this->assertSame($config->get('baz'), $overrides['config_test.system']['baz']);
+    $this->assertSame($config->get('404'), $overrides['config_test.system']['404']);
 
     // Test overrides of completely new configuration objects. In normal runtime
     // this should only happen for configuration entities as we should not be
@@ -118,9 +118,9 @@ public function testConfOverride() {
     $GLOBALS['config']['config_test.new']['key'] = 'override';
     $config = \Drupal::config('config_test.new');
     $this->assertTrue($config->isNew(), 'The configuration object config_test.new is new');
-    $this->assertIdentical($config->get('key'), 'override');
+    $this->assertSame($config->get('key'), 'override');
     $config_raw = \Drupal::configFactory()->getEditable('config_test.new');
-    $this->assertIdentical($config_raw->get('key'), NULL);
+    $this->assertSame($config_raw->get('key'), NULL);
     $config_raw
       ->set('key', 'raw')
       ->set('new_key', 'new_value')
@@ -129,10 +129,10 @@ public function testConfOverride() {
     // accordingly.
     $config = \Drupal::config('config_test.new');
     $this->assertFalse($config->isNew(), 'The configuration object config_test.new is not new');
-    $this->assertIdentical($config->get('key'), 'override');
-    $this->assertIdentical($config->get('new_key'), 'new_value');
+    $this->assertSame($config->get('key'), 'override');
+    $this->assertSame($config->get('new_key'), 'new_value');
     $raw_data = $config->getRawData();
-    $this->assertIdentical($raw_data['key'], 'raw');
+    $this->assertSame($raw_data['key'], 'raw');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
index b3dab6d2b8..caa540ec1d 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
@@ -391,13 +391,13 @@ public function testConfigSaveWithSchema() {
     $this->config('config_schema_test.schema_data_types')
       ->setData($untyped_to_typed)
       ->save();
-    $this->assertIdentical($this->config('config_schema_test.schema_data_types')->get(), $typed_values);
+    $this->assertSame($this->config('config_schema_test.schema_data_types')->get(), $typed_values);
 
     // Save config which does not have a schema that enforces types.
     $this->config('config_schema_test.no_schema_data_types')
       ->setData($untyped_values)
       ->save();
-    $this->assertIdentical($this->config('config_schema_test.no_schema_data_types')->get(), $untyped_values);
+    $this->assertSame($this->config('config_schema_test.no_schema_data_types')->get(), $untyped_values);
 
     // Ensure that configuration objects with keys marked as ignored are not
     // changed when saved. The 'config_schema_test.ignore' will have been saved
@@ -407,7 +407,7 @@ public function testConfigSaveWithSchema() {
     $original_data = $install_storage->read('config_schema_test.ignore');
     $installed_data = $this->config('config_schema_test.ignore')->get();
     unset($installed_data['_core']);
-    $this->assertIdentical($installed_data, $original_data);
+    $this->assertSame($installed_data, $original_data);
   }
 
   /**
@@ -619,7 +619,7 @@ public function testConfigSaveWithWrappingSchema() {
     \Drupal::configFactory()->getEditable('wrapping.config_schema_test.plugin_types')
       ->setData($untyped_values)
       ->save();
-    $this->assertIdentical(\Drupal::config('wrapping.config_schema_test.plugin_types')
+    $this->assertSame(\Drupal::config('wrapping.config_schema_test.plugin_types')
       ->get(), $typed_values);
   }
 
@@ -655,7 +655,7 @@ public function testConfigSaveWithWrappingSchemaDoubleBrackets() {
     \Drupal::configFactory()->getEditable('wrapping.config_schema_test.double_brackets')
       ->setData($untyped_values)
       ->save();
-    $this->assertIdentical(\Drupal::config('wrapping.config_schema_test.double_brackets')
+    $this->assertSame(\Drupal::config('wrapping.config_schema_test.double_brackets')
       ->get(), $typed_values);
 
     $tests = \Drupal::service('config.typed')->get('wrapping.config_schema_test.double_brackets')->get('tests')->getElements();
@@ -689,7 +689,7 @@ public function testConfigSaveWithWrappingSchemaDoubleBrackets() {
     \Drupal::configFactory()->getEditable('wrapping.config_schema_test.double_brackets')
       ->setData($untyped_values)
       ->save();
-    $this->assertIdentical(\Drupal::config('wrapping.config_schema_test.double_brackets')
+    $this->assertSame(\Drupal::config('wrapping.config_schema_test.double_brackets')
       ->get(), $typed_values);
 
     $tests = \Drupal::service('config.typed')->get('wrapping.config_schema_test.double_brackets')->get('tests')->getElements();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
index 62eff04d41..b476d00a16 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
@@ -76,7 +76,7 @@ public function testSnapshot() {
 
     // Verify changed config was properly imported.
     \Drupal::configFactory()->reset($config_name);
-    $this->assertIdentical($this->config($config_name)->get($config_key), $new_data);
+    $this->assertSame($this->config($config_name)->get($config_key), $new_data);
 
     // Verify that a new snapshot was created which and that it matches
     // the active config.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
index 68a8962e56..6badf222bb 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
@@ -44,12 +44,12 @@ protected function setUp() {
   public function testTrait() {
     // Test a non existing schema.
     $ret = $this->checkConfigSchema($this->typedConfig, 'config_schema_test.noschema', $this->config('config_schema_test.noschema')->get());
-    $this->assertIdentical($ret, FALSE);
+    $this->assertSame($ret, FALSE);
 
     // Test an existing schema with valid data.
     $config_data = $this->config('config_test.types')->get();
     $ret = $this->checkConfigSchema($this->typedConfig, 'config_test.types', $config_data);
-    $this->assertIdentical($ret, TRUE);
+    $this->assertSame($ret, TRUE);
 
     // Add a new key, a new array and overwrite boolean with array to test the
     // error messages.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php
index 5bdbc74deb..78e8b7a837 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php
@@ -37,26 +37,26 @@ public function testCRUD() {
     $name = 'config_test.storage';
 
     // Checking whether a non-existing name exists returns FALSE.
-    $this->assertIdentical($this->storage->exists($name), FALSE);
+    $this->assertSame($this->storage->exists($name), FALSE);
 
     // Reading a non-existing name returns FALSE.
     $data = $this->storage->read($name);
-    $this->assertIdentical($data, FALSE);
+    $this->assertSame($data, FALSE);
 
     // Writing data returns TRUE and the data has been written.
     $data = ['foo' => 'bar'];
     $result = $this->storage->write($name, $data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
 
     $raw_data = $this->read($name);
-    $this->assertIdentical($raw_data, $data);
+    $this->assertSame($raw_data, $data);
 
     // Checking whether an existing name exists returns TRUE.
-    $this->assertIdentical($this->storage->exists($name), TRUE);
+    $this->assertSame($this->storage->exists($name), TRUE);
 
     // Writing the identical data again still returns TRUE.
     $result = $this->storage->write($name, $data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
 
     // Listing all names returns all.
     $names = $this->storage->listAll();
@@ -72,17 +72,17 @@ public function testCRUD() {
     $new_name = 'config_test.storage_rename';
     $this->storage->rename($name, $new_name);
     $raw_data = $this->read($new_name);
-    $this->assertIdentical($raw_data, $data);
+    $this->assertSame($raw_data, $data);
     // Rename it back so further tests work.
     $this->storage->rename($new_name, $name);
 
     // Deleting an existing name returns TRUE.
     $result = $this->storage->delete($name);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
 
     // Deleting a non-existing name returns FALSE.
     $result = $this->storage->delete($name);
-    $this->assertIdentical($result, FALSE);
+    $this->assertSame($result, FALSE);
 
     // Deleting all names with prefix deletes the appropriate data and returns
     // TRUE.
@@ -97,8 +97,8 @@ public function testCRUD() {
 
     $result = $this->storage->deleteAll('config_test.');
     $names = $this->storage->listAll('config_test.');
-    $this->assertIdentical($result, TRUE);
-    $this->assertIdentical($names, []);
+    $this->assertSame($result, TRUE);
+    $this->assertSame($names, []);
 
     // Test renaming an object that does not exist throws an exception.
     try {
@@ -129,14 +129,14 @@ public function testInvalidStorage() {
     // pollute one another.
     $data = ['foo' => 'bar'];
     $result = $this->storage->write($name, $data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
 
     $raw_data = $this->read($name);
-    $this->assertIdentical($raw_data, $data);
+    $this->assertSame($raw_data, $data);
 
     // Reading from a non-existing storage bin returns FALSE.
     $result = $this->invalidStorage->read($name);
-    $this->assertIdentical($result, FALSE);
+    $this->assertSame($result, FALSE);
 
     // Deleting from a non-existing storage bin throws an exception.
     try {
@@ -150,11 +150,11 @@ public function testInvalidStorage() {
 
     // Listing on a non-existing storage bin returns an empty array.
     $result = $this->invalidStorage->listAll();
-    $this->assertIdentical($result, []);
+    $this->assertSame($result, []);
     // Writing to a non-existing storage bin creates the bin.
     $this->invalidStorage->write($name, ['foo' => 'bar']);
     $result = $this->invalidStorage->read($name);
-    $this->assertIdentical($result, ['foo' => 'bar']);
+    $this->assertSame($result, ['foo' => 'bar']);
   }
 
   /**
@@ -175,10 +175,10 @@ public function testDataTypes() {
     ];
 
     $result = $this->storage->write($name, $data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
 
     $read_data = $this->storage->read($name);
-    $this->assertIdentical($read_data, $data);
+    $this->assertSame($read_data, $data);
   }
 
   /**
@@ -188,7 +188,7 @@ public function testCollection() {
     $name = 'config_test.storage';
     $data = ['foo' => 'bar'];
     $result = $this->storage->write($name, $data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
     $this->assertSame($data, $this->storage->read($name));
 
     // Create configuration in a new collection.
@@ -196,13 +196,13 @@ public function testCollection() {
     $this->assertFalse($new_storage->exists($name));
     $this->assertEqual([], $new_storage->listAll());
     $new_storage->write($name, $data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
     $this->assertSame($data, $new_storage->read($name));
     $this->assertEqual([$name], $new_storage->listAll());
     $this->assertTrue($new_storage->exists($name));
     $new_data = ['foo' => 'baz'];
     $new_storage->write($name, $new_data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
     $this->assertSame($new_data, $new_storage->read($name));
 
     // Create configuration in another collection.
@@ -210,7 +210,7 @@ public function testCollection() {
     $this->assertFalse($another_storage->exists($name));
     $this->assertEqual([], $another_storage->listAll());
     $another_storage->write($name, $new_data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
     $this->assertSame($new_data, $another_storage->read($name));
     $this->assertEqual([$name], $another_storage->listAll());
     $this->assertTrue($another_storage->exists($name));
@@ -218,7 +218,7 @@ public function testCollection() {
     // Create configuration in yet another collection.
     $alt_storage = $this->storage->createCollection('alternate');
     $alt_storage->write($name, $new_data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
     $this->assertSame($new_data, $alt_storage->read($name));
 
     // Switch back to the collection-less mode and check the data still exists
@@ -239,7 +239,7 @@ public function testCollection() {
     $this->assertFalse($parent_storage->exists($name));
     $this->assertEqual([], $parent_storage->listAll());
     $parent_storage->write($name, $new_data);
-    $this->assertIdentical($result, TRUE);
+    $this->assertSame($result, TRUE);
     $this->assertSame($new_data, $parent_storage->read($name));
     $this->assertEqual([$name], $parent_storage->listAll());
     $this->assertTrue($parent_storage->exists($name));
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php
index 805af8aedd..9f5c8613cc 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php
@@ -63,7 +63,7 @@ public function testlistAll() {
     ];
 
     $config_files = $this->storage->listAll();
-    $this->assertIdentical($config_files, $expected_files, 'Relative path, two config files found.');
+    $this->assertSame($config_files, $expected_files, 'Relative path, two config files found.');
 
     // @todo https://www.drupal.org/node/2666954 FileStorage::listAll() is
     //   case-sensitive. However, \Drupal\Core\Config\DatabaseStorage::listAll()
diff --git a/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php b/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php
index 53a87b7dbf..270e332d57 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php
@@ -23,7 +23,7 @@ public function testConcatLiterals() {
       ':a4' => ' a ',
       ':a5' => 'test.',
     ]);
-    $this->assertIdentical($result->fetchField(), 'This is a test.', 'Basic CONCAT works.');
+    $this->assertSame($result->fetchField(), 'This is a test.', 'Basic CONCAT works.');
   }
 
   /**
@@ -36,7 +36,7 @@ public function testConcatFields() {
       ':a3' => '.',
       ':age' => 25,
     ]);
-    $this->assertIdentical($result->fetchField(), 'The age of John is 25.', 'Field CONCAT works.');
+    $this->assertSame($result->fetchField(), 'The age of John is 25.', 'Field CONCAT works.');
   }
 
   /**
@@ -49,7 +49,7 @@ public function testConcatWsLiterals() {
       ':a3' => '',
       ':a4' => 'world.',
     ]);
-    $this->assertIdentical($result->fetchField(), 'Hello, , world.');
+    $this->assertSame($result->fetchField(), 'Hello, , world.');
   }
 
   /**
@@ -61,7 +61,7 @@ public function testConcatWsFields() {
       ':a2' => 'age',
       ':age' => 25,
     ]);
-    $this->assertIdentical($result->fetchField(), 'name-John-age-25');
+    $this->assertSame($result->fetchField(), 'name-John-age-25');
   }
 
   /**
@@ -80,14 +80,14 @@ public function testLikeEscape() {
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Found 2 records.');
+    $this->assertSame($num_matches, '2', 'Found 2 records.');
     // Match only "Ring_" using a LIKE expression with no wildcards.
     $num_matches = db_select('test', 't')
       ->condition('name', db_like('Ring_'), 'LIKE')
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertIdentical($num_matches, '1', 'Found 1 record.');
+    $this->assertSame($num_matches, '1', 'Found 1 record.');
   }
 
   /**
@@ -111,14 +111,14 @@ public function testLikeBackslash() {
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Found 2 records.');
+    $this->assertSame($num_matches, '2', 'Found 2 records.');
     // Match only the former using a LIKE expression with no wildcards.
     $num_matches = db_select('test', 't')
       ->condition('name', db_like('abc%\_'), 'LIKE')
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertIdentical($num_matches, '1', 'Found 1 record.');
+    $this->assertSame($num_matches, '1', 'Found 1 record.');
   }
 
   /**
@@ -130,7 +130,7 @@ public function testGetFullQualifiedTableName() {
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertIdentical($num_matches, '4', 'Found 4 records.');
+    $this->assertSame($num_matches, '4', 'Found 4 records.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php b/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php
index abd9d4c07d..9d90126b14 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php
@@ -25,7 +25,7 @@ public function testCaseSensitiveInsert() {
     $num_records_after = db_query('SELECT COUNT(*) FROM {test}')->fetchField();
     $this->assertSame($num_records_before + 1, (int) $num_records_after, 'Record inserts correctly.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'john'])->fetchField();
-    $this->assertIdentical($saved_age, '2', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '2', 'Can retrieve after inserting.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php b/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php
index 5d2f7f005c..103ff53940 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php
@@ -103,7 +103,7 @@ public function testConnectionOptions() {
 
     // Get a fresh copy of the default connection options.
     $connectionOptions = $db->getConnectionOptions();
-    $this->assertIdentical($connectionOptions, $connectionOptions2, 'The default and replica connection options are identical.');
+    $this->assertSame($connectionOptions, $connectionOptions2, 'The default and replica connection options are identical.');
 
     // Set up a new connection with different connection info.
     $test = $connection_info['default'];
@@ -168,9 +168,9 @@ public function testPostgresqlReservedWords() {
     $stmt->execute();
     foreach ($stmt->fetchAllAssoc('word') as $word => $row) {
       $expected = '"' . $word . '"';
-      $this->assertIdentical($db->escapeTable($word), $expected, format_string('The reserved word %word was correctly escaped when used as a table name.', ['%word' => $word]));
-      $this->assertIdentical($db->escapeField($word), $expected, format_string('The reserved word %word was correctly escaped when used as a column name.', ['%word' => $word]));
-      $this->assertIdentical($db->escapeAlias($word), $expected, format_string('The reserved word %word was correctly escaped when used as an alias.', ['%word' => $word]));
+      $this->assertSame($db->escapeTable($word), $expected, format_string('The reserved word %word was correctly escaped when used as a table name.', ['%word' => $word]));
+      $this->assertSame($db->escapeField($word), $expected, format_string('The reserved word %word was correctly escaped when used as a column name.', ['%word' => $word]));
+      $this->assertSame($db->escapeAlias($word), $expected, format_string('The reserved word %word was correctly escaped when used as an alias.', ['%word' => $word]));
     }
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php
index f73f4155fb..392b6214cf 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php
@@ -55,7 +55,7 @@ protected function addConnection() {
     // Verify that the new target exists.
     $info = Database::getConnectionInfo($this->key);
     // Note: Custom assertion message to not expose database credentials.
-    $this->assertIdentical($info[$this->target], $connection_info[$this->key], 'New connection info found.');
+    $this->assertSame($info[$this->target], $connection_info[$this->key], 'New connection info found.');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php b/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php
index 8d736613c6..45fc18c667 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php
@@ -47,7 +47,7 @@ public function testSimpleDelete() {
     $num_deleted = db_delete('test')
       ->condition('id', 1)
       ->execute();
-    $this->assertIdentical($num_deleted, 1, 'Deleted 1 record.');
+    $this->assertSame($num_deleted, 1, 'Deleted 1 record.');
 
     $num_records_after = db_query('SELECT COUNT(*) FROM {test}')->fetchField();
     $this->assertEqual($num_records_before, $num_records_after + $num_deleted, 'Deletion adds up.');
@@ -75,7 +75,7 @@ public function testSpecialColumnDelete() {
     $num_deleted = db_delete('test_special_columns')
       ->condition('id', 1)
       ->execute();
-    $this->assertIdentical($num_deleted, 1, 'Deleted 1 special column record.');
+    $this->assertSame($num_deleted, 1, 'Deleted 1 special column record.');
 
     $num_records_after = db_query('SELECT COUNT(*) FROM {test_special_columns}')->fetchField();
     $this->assertEqual($num_records_before, $num_records_after + $num_deleted, 'Deletion adds up.');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php b/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
index d0439c5f10..ef60ba093a 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
@@ -25,10 +25,10 @@ public function testQueryFetchDefault() {
     foreach ($result as $record) {
       $records[] = $record;
       $this->assertTrue(is_object($record), 'Record is an object.');
-      $this->assertIdentical($record->name, 'John', '25 year old is John.');
+      $this->assertSame($record->name, 'John', '25 year old is John.');
     }
 
-    $this->assertIdentical(count($records), 1, 'There is only one record.');
+    $this->assertSame(count($records), 1, 'There is only one record.');
   }
 
   /**
@@ -40,10 +40,10 @@ public function testQueryFetchObject() {
     foreach ($result as $record) {
       $records[] = $record;
       $this->assertTrue(is_object($record), 'Record is an object.');
-      $this->assertIdentical($record->name, 'John', '25 year old is John.');
+      $this->assertSame($record->name, 'John', '25 year old is John.');
     }
 
-    $this->assertIdentical(count($records), 1, 'There is only one record.');
+    $this->assertSame(count($records), 1, 'There is only one record.');
   }
 
   /**
@@ -55,11 +55,11 @@ public function testQueryFetchArray() {
     foreach ($result as $record) {
       $records[] = $record;
       if ($this->assertTrue(is_array($record), 'Record is an array.')) {
-        $this->assertIdentical($record['name'], 'John', 'Record can be accessed associatively.');
+        $this->assertSame($record['name'], 'John', 'Record can be accessed associatively.');
       }
     }
 
-    $this->assertIdentical(count($records), 1, 'There is only one record.');
+    $this->assertSame(count($records), 1, 'There is only one record.');
   }
 
   /**
@@ -73,11 +73,11 @@ public function testQueryFetchClass() {
     foreach ($result as $record) {
       $records[] = $record;
       if ($this->assertTrue($record instanceof FakeRecord, 'Record is an object of class FakeRecord.')) {
-        $this->assertIdentical($record->name, 'John', '25 year old is John.');
+        $this->assertSame($record->name, 'John', '25 year old is John.');
       }
     }
 
-    $this->assertIdentical(count($records), 1, 'There is only one record.');
+    $this->assertSame(count($records), 1, 'There is only one record.');
   }
 
   /**
@@ -89,11 +89,11 @@ public function testQueryFetchNum() {
     foreach ($result as $record) {
       $records[] = $record;
       if ($this->assertTrue(is_array($record), 'Record is an array.')) {
-        $this->assertIdentical($record[0], 'John', 'Record can be accessed numerically.');
+        $this->assertSame($record[0], 'John', 'Record can be accessed numerically.');
       }
     }
 
-    $this->assertIdentical(count($records), 1, 'There is only one record');
+    $this->assertSame(count($records), 1, 'There is only one record');
   }
 
   /**
@@ -105,12 +105,12 @@ public function testQueryFetchBoth() {
     foreach ($result as $record) {
       $records[] = $record;
       if ($this->assertTrue(is_array($record), 'Record is an array.')) {
-        $this->assertIdentical($record[0], 'John', 'Record can be accessed numerically.');
-        $this->assertIdentical($record['name'], 'John', 'Record can be accessed associatively.');
+        $this->assertSame($record[0], 'John', 'Record can be accessed numerically.');
+        $this->assertSame($record['name'], 'John', 'Record can be accessed associatively.');
       }
     }
 
-    $this->assertIdentical(count($records), 1, 'There is only one record.');
+    $this->assertSame(count($records), 1, 'There is only one record.');
   }
 
   /**
@@ -132,12 +132,12 @@ public function testQueryFetchAllColumn() {
   public function testQueryFetchCol() {
     $result = db_query('SELECT name FROM {test} WHERE age > :age', [':age' => 25]);
     $column = $result->fetchCol();
-    $this->assertIdentical(count($column), 3, 'fetchCol() returns the right number of records.');
+    $this->assertSame(count($column), 3, 'fetchCol() returns the right number of records.');
 
     $result = db_query('SELECT name FROM {test} WHERE age > :age', [':age' => 25]);
     $i = 0;
     foreach ($result as $record) {
-      $this->assertIdentical($record->name, $column[$i++], 'Column matches direct access.');
+      $this->assertSame($record->name, $column[$i++], 'Column matches direct access.');
     }
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
index dc5f075a5e..506720016c 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
@@ -22,13 +22,13 @@ public function testSimpleInsert() {
     ]);
 
     // Check how many records are queued for insertion.
-    $this->assertIdentical($query->count(), 1, 'One record is queued for insertion.');
+    $this->assertSame($query->count(), 1, 'One record is queued for insertion.');
     $query->execute();
 
     $num_records_after = db_query('SELECT COUNT(*) FROM {test}')->fetchField();
     $this->assertSame($num_records_before + 1, (int) $num_records_after, 'Record inserts correctly.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Yoko'])->fetchField();
-    $this->assertIdentical($saved_age, '29', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '29', 'Can retrieve after inserting.');
   }
 
   /**
@@ -50,24 +50,24 @@ public function testMultiInsert() {
     ]);
 
     // Check how many records are queued for insertion.
-    $this->assertIdentical($query->count(), 2, 'Two records are queued for insertion.');
+    $this->assertSame($query->count(), 2, 'Two records are queued for insertion.');
 
     // We should be able to say "use the field order".
     // This is not the recommended mechanism for most cases, but it should work.
     $query->values(['Moe', '32']);
 
     // Check how many records are queued for insertion.
-    $this->assertIdentical($query->count(), 3, 'Three records are queued for insertion.');
+    $this->assertSame($query->count(), 3, 'Three records are queued for insertion.');
     $query->execute();
 
     $num_records_after = (int) db_query('SELECT COUNT(*) FROM {test}')->fetchField();
     $this->assertSame($num_records_before + 3, $num_records_after, 'Record inserts correctly.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Larry'])->fetchField();
-    $this->assertIdentical($saved_age, '30', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '30', 'Can retrieve after inserting.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Curly'])->fetchField();
-    $this->assertIdentical($saved_age, '31', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '31', 'Can retrieve after inserting.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Moe'])->fetchField();
-    $this->assertIdentical($saved_age, '32', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '32', 'Can retrieve after inserting.');
   }
 
   /**
@@ -83,7 +83,7 @@ public function testRepeatedInsert() {
       'age' => '30',
     ]);
     // Check how many records are queued for insertion.
-    $this->assertIdentical($query->count(), 1, 'One record is queued for insertion.');
+    $this->assertSame($query->count(), 1, 'One record is queued for insertion.');
     $query->execute();  // This should run the insert, but leave the fields intact.
 
     // We should be able to specify values in any order if named.
@@ -92,24 +92,24 @@ public function testRepeatedInsert() {
       'name' => 'Curly',
     ]);
     // Check how many records are queued for insertion.
-    $this->assertIdentical($query->count(), 1, 'One record is queued for insertion.');
+    $this->assertSame($query->count(), 1, 'One record is queued for insertion.');
     $query->execute();
 
     // We should be able to say "use the field order".
     $query->values(['Moe', '32']);
 
     // Check how many records are queued for insertion.
-    $this->assertIdentical($query->count(), 1, 'One record is queued for insertion.');
+    $this->assertSame($query->count(), 1, 'One record is queued for insertion.');
     $query->execute();
 
     $num_records_after = db_query('SELECT COUNT(*) FROM {test}')->fetchField();
     $this->assertSame((int) $num_records_before + 3, (int) $num_records_after, 'Record inserts correctly.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Larry'])->fetchField();
-    $this->assertIdentical($saved_age, '30', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '30', 'Can retrieve after inserting.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Curly'])->fetchField();
-    $this->assertIdentical($saved_age, '31', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '31', 'Can retrieve after inserting.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Moe'])->fetchField();
-    $this->assertIdentical($saved_age, '32', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '32', 'Can retrieve after inserting.');
   }
 
   /**
@@ -125,11 +125,11 @@ public function testInsertFieldOnlyDefinition() {
       ->values(['Moe', '32'])
       ->execute();
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Larry'])->fetchField();
-    $this->assertIdentical($saved_age, '30', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '30', 'Can retrieve after inserting.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Curly'])->fetchField();
-    $this->assertIdentical($saved_age, '31', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '31', 'Can retrieve after inserting.');
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Moe'])->fetchField();
-    $this->assertIdentical($saved_age, '32', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '32', 'Can retrieve after inserting.');
   }
 
   /**
@@ -143,7 +143,7 @@ public function testInsertLastInsertID() {
       ])
       ->execute();
 
-    $this->assertIdentical($id, '5', 'Auto-increment ID returned successfully.');
+    $this->assertSame($id, '5', 'Auto-increment ID returned successfully.');
   }
 
   /**
@@ -169,7 +169,7 @@ public function testInsertSelectFields() {
       ->execute();
 
     $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Meredith'])->fetchField();
-    $this->assertIdentical($saved_age, '30', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '30', 'Can retrieve after inserting.');
   }
 
   /**
@@ -190,7 +190,7 @@ public function testInsertSelectAll() {
       ->execute();
 
     $saved_age = db_query('SELECT age FROM {test_people_copy} WHERE name = :name', [':name' => 'Meredith'])->fetchField();
-    $this->assertIdentical($saved_age, '30', 'Can retrieve after inserting.');
+    $this->assertSame($saved_age, '30', 'Can retrieve after inserting.');
   }
 
   /**
@@ -204,7 +204,7 @@ public function testSpecialColumnInsert() {
       ])
       ->execute();
     $saved_value = db_query('SELECT "offset" FROM {test_special_columns} WHERE id = :id', [':id' => 2])->fetchField();
-    $this->assertIdentical($saved_value, 'Offset value 2', 'Can retrieve special column name value after inserting.');
+    $this->assertSame($saved_value, 'Offset value 2', 'Can retrieve special column name value after inserting.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
index e239098715..fcad1ece2a 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
@@ -93,12 +93,12 @@ public function testSchema() {
 
     // Test for fake index and test for the boolean result of indexExists().
     $index_exists = Database::getConnection()->schema()->indexExists('test_table', 'test_field');
-    $this->assertIdentical($index_exists, FALSE, 'Fake index does not exists');
+    $this->assertSame($index_exists, FALSE, 'Fake index does not exists');
     // Add index.
     db_add_index('test_table', 'test_field', ['test_field'], $table_specification);
     // Test for created index and test for the boolean result of indexExists().
     $index_exists = Database::getConnection()->schema()->indexExists('test_table', 'test_field');
-    $this->assertIdentical($index_exists, TRUE, 'Index created.');
+    $this->assertSame($index_exists, TRUE, 'Index created.');
 
     // Rename the table.
     db_rename_table('test_table', 'test_table2');
@@ -204,8 +204,8 @@ public function testSchema() {
         $unique_key_exists = Database::getConnection()->schema()->indexExists('test_table', 'test_field');
         break;
     }
-    $this->assertIdentical($primary_key_exists, TRUE, 'Primary key created.');
-    $this->assertIdentical($unique_key_exists, TRUE, 'Unique key created.');
+    $this->assertSame($primary_key_exists, TRUE, 'Primary key created.');
+    $this->assertSame($unique_key_exists, TRUE, 'Unique key created.');
 
     db_rename_table('test_table', 'test_table2');
 
@@ -225,8 +225,8 @@ public function testSchema() {
         $renamed_unique_key_exists = Database::getConnection()->schema()->indexExists('test_table2', 'test_field');
         break;
     }
-    $this->assertIdentical($renamed_primary_key_exists, TRUE, 'Primary key was renamed.');
-    $this->assertIdentical($renamed_unique_key_exists, TRUE, 'Unique key was renamed.');
+    $this->assertSame($renamed_primary_key_exists, TRUE, 'Primary key was renamed.');
+    $this->assertSame($renamed_unique_key_exists, TRUE, 'Unique key was renamed.');
 
     // For PostgreSQL check in addition that sequence was renamed.
     if ($db_type == 'pgsql') {
@@ -758,7 +758,7 @@ protected function assertFieldChange($old_spec, $new_spec, $test_data = NULL) {
         ->condition('serial_column', $id)
         ->execute()
         ->fetchField();
-      $this->assertIdentical($field_value, $test_data);
+      $this->assertSame($field_value, $test_data);
     }
 
     // Check the field was changed.
diff --git a/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php b/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php
index a07045dd53..40f0b7a355 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php
@@ -184,9 +184,9 @@ public function testTransactionRollBackNotSupported() {
       // Because our current database claims to not support transactions,
       // the inserted rows should be present despite the attempt to roll back.
       $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'DavidB'])->fetchField();
-      $this->assertIdentical($saved_age, '24', 'DavidB not rolled back, since transactions are not supported.');
+      $this->assertSame($saved_age, '24', 'DavidB not rolled back, since transactions are not supported.');
       $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'DanielB'])->fetchField();
-      $this->assertIdentical($saved_age, '19', 'DanielB not rolled back, since transactions are not supported.');
+      $this->assertSame($saved_age, '19', 'DanielB not rolled back, since transactions are not supported.');
     }
     catch (\Exception $e) {
       $this->fail($e->getMessage());
@@ -206,9 +206,9 @@ public function testCommittedTransaction() {
 
       // Because we committed, both of the inserted rows should be present.
       $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'DavidA'])->fetchField();
-      $this->assertIdentical($saved_age, '24', 'Can retrieve DavidA row after commit.');
+      $this->assertSame($saved_age, '24', 'Can retrieve DavidA row after commit.');
       $saved_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'DanielA'])->fetchField();
-      $this->assertIdentical($saved_age, '19', 'Can retrieve DanielA row after commit.');
+      $this->assertSame($saved_age, '19', 'Can retrieve DanielA row after commit.');
     }
     catch (\Exception $e) {
       $this->fail($e->getMessage());
diff --git a/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php
index 69d5d5d388..6dc7b82c04 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php
@@ -22,10 +22,10 @@ public function testOrConditionUpdate() {
         ->condition('name', 'Paul')
       );
     $num_updated = $update->execute();
-    $this->assertIdentical($num_updated, 2, 'Updated 2 records.');
+    $this->assertSame($num_updated, 2, 'Updated 2 records.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '2', 'Updated fields successfully.');
   }
 
   /**
@@ -36,10 +36,10 @@ public function testInConditionUpdate() {
       ->fields(['job' => 'Musician'])
       ->condition('name', ['John', 'Paul'], 'IN')
       ->execute();
-    $this->assertIdentical($num_updated, 2, 'Updated 2 records.');
+    $this->assertSame($num_updated, 2, 'Updated 2 records.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '2', 'Updated fields successfully.');
   }
 
   /**
@@ -52,10 +52,10 @@ public function testNotInConditionUpdate() {
       ->fields(['job' => 'Musician'])
       ->condition('name', ['John', 'Paul', 'George'], 'NoT IN')
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '1', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '1', 'Updated fields successfully.');
   }
 
   /**
@@ -66,10 +66,10 @@ public function testBetweenConditionUpdate() {
       ->fields(['job' => 'Musician'])
       ->condition('age', [25, 26], 'BETWEEN')
       ->execute();
-    $this->assertIdentical($num_updated, 2, 'Updated 2 records.');
+    $this->assertSame($num_updated, 2, 'Updated 2 records.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '2', 'Updated fields successfully.');
   }
 
   /**
@@ -80,10 +80,10 @@ public function testLikeConditionUpdate() {
       ->fields(['job' => 'Musician'])
       ->condition('name', '%ge%', 'LIKE')
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '1', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '1', 'Updated fields successfully.');
   }
 
   /**
@@ -96,10 +96,10 @@ public function testUpdateExpression() {
       ->fields(['job' => 'Musician'])
       ->expression('age', 'age + :age', [':age' => 4])
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '1', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '1', 'Updated fields successfully.');
 
     $person = db_query('SELECT * FROM {test} WHERE name = :name', [':name' => 'Ringo'])->fetch();
     $this->assertEqual($person->name, 'Ringo', 'Name set correctly.');
@@ -116,7 +116,7 @@ public function testUpdateOnlyExpression() {
       ->condition('name', 'Ringo')
       ->expression('age', 'age + :age', [':age' => 4])
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $after_age = db_query('SELECT age FROM {test} WHERE name = :name', [':name' => 'Ringo'])->fetchField();
     $this->assertEqual($before_age + 4, $after_age, 'Age updated correctly');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php b/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php
index 6bc91316fd..08ab93a0f3 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php
@@ -17,10 +17,10 @@ public function testSimpleUpdate() {
       ->fields(['name' => 'Tiffany'])
       ->condition('id', 1)
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $saved_name = db_query('SELECT name FROM {test} WHERE id = :id', [':id' => 1])->fetchField();
-    $this->assertIdentical($saved_name, 'Tiffany', 'Updated name successfully.');
+    $this->assertSame($saved_name, 'Tiffany', 'Updated name successfully.');
   }
 
   /**
@@ -32,7 +32,7 @@ public function testSimpleNullUpdate() {
       ->fields(['age' => NULL])
       ->condition('name', 'Kermit')
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $saved_age = db_query('SELECT age FROM {test_null} WHERE name = :name', [':name' => 'Kermit'])->fetchField();
     $this->assertNull($saved_age, 'Updated name successfully.');
@@ -46,10 +46,10 @@ public function testMultiUpdate() {
       ->fields(['job' => 'Musician'])
       ->condition('job', 'Singer')
       ->execute();
-    $this->assertIdentical($num_updated, 2, 'Updated 2 records.');
+    $this->assertSame($num_updated, 2, 'Updated 2 records.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '2', 'Updated fields successfully.');
   }
 
   /**
@@ -60,10 +60,10 @@ public function testMultiGTUpdate() {
       ->fields(['job' => 'Musician'])
       ->condition('age', 26, '>')
       ->execute();
-    $this->assertIdentical($num_updated, 2, 'Updated 2 records.');
+    $this->assertSame($num_updated, 2, 'Updated 2 records.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '2', 'Updated fields successfully.');
   }
 
   /**
@@ -74,10 +74,10 @@ public function testWhereUpdate() {
       ->fields(['job' => 'Musician'])
       ->where('age > :age', [':age' => 26])
       ->execute();
-    $this->assertIdentical($num_updated, 2, 'Updated 2 records.');
+    $this->assertSame($num_updated, 2, 'Updated 2 records.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '2', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '2', 'Updated fields successfully.');
   }
 
   /**
@@ -89,10 +89,10 @@ public function testWhereAndConditionUpdate() {
       ->where('age > :age', [':age' => 26])
       ->condition('name', 'Ringo');
     $num_updated = $update->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $num_matches = db_query('SELECT COUNT(*) FROM {test} WHERE job = :job', [':job' => 'Musician'])->fetchField();
-    $this->assertIdentical($num_matches, '1', 'Updated fields successfully.');
+    $this->assertSame($num_matches, '1', 'Updated fields successfully.');
   }
 
   /**
@@ -104,10 +104,10 @@ public function testExpressionUpdate() {
     $num_rows = db_update('test')
       ->expression('age', 'age * age')
       ->execute();
-    $this->assertIdentical($num_rows, 4, 'Updated 4 records.');
+    $this->assertSame($num_rows, 4, 'Updated 4 records.');
 
     $saved_name = db_query('SELECT name FROM {test} WHERE age = :age', [':age' => pow(26, 2)])->fetchField();
-    $this->assertIdentical($saved_name, 'Paul', 'Successfully updated values using an algebraic expression.');
+    $this->assertSame($saved_name, 'Paul', 'Successfully updated values using an algebraic expression.');
   }
 
   /**
@@ -124,7 +124,7 @@ public function testUpdateAffectedRows() {
       ->condition('priority', 1, '<>')
       ->fields(['task' => 'sleep'])
       ->execute();
-    $this->assertIdentical($num_rows, 5, 'Correctly returned 5 affected rows.');
+    $this->assertSame($num_rows, 5, 'Correctly returned 5 affected rows.');
   }
 
   /**
@@ -135,10 +135,10 @@ public function testPrimaryKeyUpdate() {
       ->fields(['id' => 42, 'name' => 'John'])
       ->condition('id', 1)
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 record.');
 
     $saved_name = db_query('SELECT name FROM {test} WHERE id = :id', [':id' => 42])->fetchField();
-    $this->assertIdentical($saved_name, 'John', 'Updated primary key successfully.');
+    $this->assertSame($saved_name, 'John', 'Updated primary key successfully.');
   }
 
   /**
@@ -149,10 +149,10 @@ public function testSpecialColumnUpdate() {
       ->fields(['offset' => 'New offset value'])
       ->condition('id', 1)
       ->execute();
-    $this->assertIdentical($num_updated, 1, 'Updated 1 special column record.');
+    $this->assertSame($num_updated, 1, 'Updated 1 special column record.');
 
     $saved_value = db_query('SELECT "offset" FROM {test_special_columns} WHERE id = :id', [':id' => 1])->fetchField();
-    $this->assertIdentical($saved_value, 'New offset value', 'Updated special column name value successfully.');
+    $this->assertSame($saved_value, 'New offset value', 'Updated special column name value successfully.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php
index deea2a91bf..9422d36743 100644
--- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php
@@ -23,7 +23,7 @@ public function testServicesYml() {
     // A service provider class always has precedence over services.yml files.
     // KernelTestBase::buildContainer() swaps out many services with in-memory
     // implementations already, so those cannot be tested.
-    $this->assertIdentical(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\DatabaseBackendFactory');
+    $this->assertSame(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\DatabaseBackendFactory');
 
     $class = __CLASS__;
     $doc = <<<EOD
@@ -41,7 +41,7 @@ class: Drupal\Core\Cache\MemoryBackendFactory
     $this->container->get('kernel')->rebuildContainer();
 
     $this->assertTrue($this->container->has('site.service.yml'));
-    $this->assertIdentical(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\MemoryBackendFactory');
+    $this->assertSame(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\MemoryBackendFactory');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
index 56050a7dc4..0a8506edb0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
@@ -403,7 +403,7 @@ public function testCount() {
     $count = $this->factory->get('config_query_test')
       ->count()
       ->execute();
-    $this->assertIdentical($count, count($this->entities));
+    $this->assertSame($count, count($this->entities));
 
     // Test count on a complex query.
     $query = $this->factory->get('config_query_test', 'OR');
@@ -418,7 +418,7 @@ public function testCount() {
       ->condition($and_condition_2)
       ->count()
       ->execute();
-    $this->assertIdentical($count, 2);
+    $this->assertSame($count, 2);
   }
 
   /**
@@ -429,52 +429,52 @@ public function testSortRange() {
     $this->queryResults = $this->factory->get('config_query_test')
       ->sort('number', 'DESC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['3', '5', '2', '1', '4']);
+    $this->assertSame(array_values($this->queryResults), ['3', '5', '2', '1', '4']);
 
     $this->queryResults = $this->factory->get('config_query_test')
       ->sort('number', 'ASC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['4', '1', '2', '5', '3']);
+    $this->assertSame(array_values($this->queryResults), ['4', '1', '2', '5', '3']);
 
     // Apply some filters and sort.
     $this->queryResults = $this->factory->get('config_query_test')
       ->condition('id', '3', '>')
       ->sort('number', 'DESC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['5', '4']);
+    $this->assertSame(array_values($this->queryResults), ['5', '4']);
 
     $this->queryResults = $this->factory->get('config_query_test')
       ->condition('id', '3', '>')
       ->sort('number', 'ASC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['4', '5']);
+    $this->assertSame(array_values($this->queryResults), ['4', '5']);
 
     // Apply a pager and sort.
     $this->queryResults = $this->factory->get('config_query_test')
       ->sort('number', 'DESC')
       ->range('2', '2')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['2', '1']);
+    $this->assertSame(array_values($this->queryResults), ['2', '1']);
 
     $this->queryResults = $this->factory->get('config_query_test')
       ->sort('number', 'ASC')
       ->range('2', '2')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['2', '5']);
+    $this->assertSame(array_values($this->queryResults), ['2', '5']);
 
     // Add a range to a query without a start parameter.
     $this->queryResults = $this->factory->get('config_query_test')
       ->range(0, '3')
       ->sort('id', 'ASC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['1', '2', '3']);
+    $this->assertSame(array_values($this->queryResults), ['1', '2', '3']);
 
     // Apply a pager with limit 4.
     $this->queryResults = $this->factory->get('config_query_test')
       ->pager('4', 0)
       ->sort('id', 'ASC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['1', '2', '3', '4']);
+    $this->assertSame(array_values($this->queryResults), ['1', '2', '3', '4']);
   }
 
   /**
@@ -492,28 +492,28 @@ public function testTableSort() {
       ->tableSort($header)
       ->sort('id', 'DESC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['5', '4', '3', '2', '1']);
+    $this->assertSame(array_values($this->queryResults), ['5', '4', '3', '2', '1']);
 
     // Sorting with 'ASC' upper case
     $this->queryResults = $this->factory->get('config_query_test')
       ->tableSort($header)
       ->sort('id', 'ASC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['1', '2', '3', '4', '5']);
+    $this->assertSame(array_values($this->queryResults), ['1', '2', '3', '4', '5']);
 
     // Sorting with 'desc' lower case
     $this->queryResults = $this->factory->get('config_query_test')
       ->tableSort($header)
       ->sort('id', 'desc')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['5', '4', '3', '2', '1']);
+    $this->assertSame(array_values($this->queryResults), ['5', '4', '3', '2', '1']);
 
     // Sorting with 'asc' lower case
     $this->queryResults = $this->factory->get('config_query_test')
       ->tableSort($header)
       ->sort('id', 'asc')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['1', '2', '3', '4', '5']);
+    $this->assertSame(array_values($this->queryResults), ['1', '2', '3', '4', '5']);
 
     // Sort key: number
     // Sorting with 'DeSc' mixed upper and lower case
@@ -521,28 +521,28 @@ public function testTableSort() {
       ->tableSort($header)
       ->sort('number', 'DeSc')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['3', '5', '2', '1', '4']);
+    $this->assertSame(array_values($this->queryResults), ['3', '5', '2', '1', '4']);
 
     // Sorting with 'AsC' mixed upper and lower case
     $this->queryResults = $this->factory->get('config_query_test')
       ->tableSort($header)
       ->sort('number', 'AsC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['4', '1', '2', '5', '3']);
+    $this->assertSame(array_values($this->queryResults), ['4', '1', '2', '5', '3']);
 
     // Sorting with 'dEsC' mixed upper and lower case
     $this->queryResults = $this->factory->get('config_query_test')
       ->tableSort($header)
       ->sort('number', 'dEsC')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['3', '5', '2', '1', '4']);
+    $this->assertSame(array_values($this->queryResults), ['3', '5', '2', '1', '4']);
 
     // Sorting with 'aSc' mixed upper and lower case
     $this->queryResults = $this->factory->get('config_query_test')
       ->tableSort($header)
       ->sort('number', 'aSc')
       ->execute();
-    $this->assertIdentical(array_values($this->queryResults), ['4', '1', '2', '5', '3']);
+    $this->assertSame(array_values($this->queryResults), ['4', '1', '2', '5', '3']);
   }
 
   /**
@@ -682,10 +682,10 @@ public function testLookupKeys() {
    *   Array of expected entity IDs.
    */
   protected function assertResults($expected) {
-    $this->assertIdentical(count($this->queryResults), count($expected));
+    $this->assertSame(count($this->queryResults), count($expected));
     foreach ($expected as $value) {
       // This also tests whether $this->queryResults[$value] is even set at all.
-      $this->assertIdentical($this->queryResults[$value], $value);
+      $this->assertSame($this->queryResults[$value], $value);
     }
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
index b3af27fba2..6018a76387 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
@@ -281,7 +281,7 @@ public function testHooks() {
     // Test hook_entity_create_access() and hook_ENTITY_TYPE_create_access().
     $entity->access('create');
     $this->assertEqual($state->get('entity_test_entity_create_access'), TRUE);
-    $this->assertIdentical($state->get('entity_test_entity_create_access_context'), [
+    $this->assertSame($state->get('entity_test_entity_create_access_context'), [
       'entity_type_id' => 'entity_test',
       'langcode' => LanguageInterface::LANGCODE_DEFAULT,
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
index ca65eb8324..c8fc036fa0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
@@ -66,8 +66,8 @@ public function testEntityReferenceAutocompletion() {
     // We should get both entities in a JSON encoded string.
     $input = '10/';
     $data = $this->getAutocompleteResult($input);
-    $this->assertIdentical($data[0]['label'], Html::escape($entity_1->name->value), 'Autocomplete returned the first matching entity');
-    $this->assertIdentical($data[1]['label'], Html::escape($entity_2->name->value), 'Autocomplete returned the second matching entity');
+    $this->assertSame($data[0]['label'], Html::escape($entity_1->name->value), 'Autocomplete returned the first matching entity');
+    $this->assertSame($data[1]['label'], Html::escape($entity_2->name->value), 'Autocomplete returned the second matching entity');
 
     // Try to autocomplete a entity label that matches the first entity.
     // We should only get the first entity in a JSON encoded string.
@@ -77,13 +77,13 @@ public function testEntityReferenceAutocompletion() {
       'value' => $entity_1->name->value . ' (1)',
       'label' => Html::escape($entity_1->name->value),
     ];
-    $this->assertIdentical(reset($data), $target, 'Autocomplete returns only the expected matching entity.');
+    $this->assertSame(reset($data), $target, 'Autocomplete returns only the expected matching entity.');
 
     // Try to autocomplete a entity label that matches the second entity, and
     // the first entity  is already typed in the autocomplete (tags) widget.
     $input = $entity_1->name->value . ' (1), 10/17';
     $data = $this->getAutocompleteResult($input);
-    $this->assertIdentical($data[0]['label'], Html::escape($entity_2->name->value), 'Autocomplete returned the second matching entity');
+    $this->assertSame($data[0]['label'], Html::escape($entity_2->name->value), 'Autocomplete returned the second matching entity');
 
     // Try to autocomplete a entity label with both a comma, a slash and markup.
     $input = '"label with, and /"';
@@ -95,7 +95,7 @@ public function testEntityReferenceAutocompletion() {
       'value' => $n,
       'label' => Html::escape($entity_3->name->value),
     ];
-    $this->assertIdentical(reset($data), $target, 'Autocomplete returns an entity label containing a comma and a slash.');
+    $this->assertSame(reset($data), $target, 'Autocomplete returns an entity label containing a comma and a slash.');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
index a066616f63..dfbf7daf9f 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -88,7 +88,7 @@ public function testNewEntityType() {
   public function testNoUpdates() {
     // Ensure that the definition update manager reports no updates.
     $this->assertFalse($this->entityDefinitionUpdateManager->needsUpdates(), 'EntityDefinitionUpdateManager reports that no updates are needed.');
-    $this->assertIdentical($this->entityDefinitionUpdateManager->getChangeSummary(), [], 'EntityDefinitionUpdateManager reports an empty change summary.');
+    $this->assertSame($this->entityDefinitionUpdateManager->getChangeSummary(), [], 'EntityDefinitionUpdateManager reports an empty change summary.');
 
     // Ensure that applyUpdates() runs without error (it's not expected to do
     // anything when there aren't updates).
@@ -282,7 +282,7 @@ public function testBaseFieldCreateDeleteWithExistingEntities() {
     $schema_handler = $this->database->schema();
     $this->assertTrue($schema_handler->fieldExists('entity_test_update', 'new_base_field'), 'Column created in shared table for new_base_field.');
     $entity = $this->entityManager->getStorage('entity_test_update')->load($entity->id());
-    $this->assertIdentical($entity->name->value, $name, 'Entity data preserved during field creation.');
+    $this->assertSame($entity->name->value, $name, 'Entity data preserved during field creation.');
 
     // Remove the base field and run the update. Ensure the base field's column
     // is deleted and the prior saved entity data is still there.
@@ -290,7 +290,7 @@ public function testBaseFieldCreateDeleteWithExistingEntities() {
     $this->entityDefinitionUpdateManager->applyUpdates();
     $this->assertFalse($schema_handler->fieldExists('entity_test_update', 'new_base_field'), 'Column deleted from shared table for new_base_field.');
     $entity = $this->entityManager->getStorage('entity_test_update')->load($entity->id());
-    $this->assertIdentical($entity->name->value, $name, 'Entity data preserved during field deletion.');
+    $this->assertSame($entity->name->value, $name, 'Entity data preserved during field deletion.');
 
     // Add a base field with a required property and run the update. Ensure
     // 'not null' is not applied and thus no exception is thrown.
@@ -339,7 +339,7 @@ public function testBundleFieldCreateDeleteWithExistingEntities() {
     $schema_handler = $this->database->schema();
     $this->assertTrue($schema_handler->tableExists('entity_test_update__new_bundle_field'), 'Dedicated table created for new_bundle_field.');
     $entity = $this->entityManager->getStorage('entity_test_update')->load($entity->id());
-    $this->assertIdentical($entity->name->value, $name, 'Entity data preserved during field creation.');
+    $this->assertSame($entity->name->value, $name, 'Entity data preserved during field creation.');
 
     // Remove the base field and run the update. Ensure the bundle field's
     // table is deleted and the prior saved entity data is still there.
@@ -347,7 +347,7 @@ public function testBundleFieldCreateDeleteWithExistingEntities() {
     $this->entityDefinitionUpdateManager->applyUpdates();
     $this->assertFalse($schema_handler->tableExists('entity_test_update__new_bundle_field'), 'Dedicated table deleted for new_bundle_field.');
     $entity = $this->entityManager->getStorage('entity_test_update')->load($entity->id());
-    $this->assertIdentical($entity->name->value, $name, 'Entity data preserved during field deletion.');
+    $this->assertSame($entity->name->value, $name, 'Entity data preserved during field deletion.');
 
     // Test that required columns are created as 'not null'.
     $this->addBundleField('shape_required');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
index 31b1f9e9e9..2a862f451e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
@@ -224,8 +224,8 @@ protected function doTestReadWrite($entity_type) {
       }
       $this->assertTrue(isset($entity->name), format_string('%entity_type: Name field is set.', ['%entity_type' => $entity_type]));
       $this->assertTrue($entity->name->isEmpty(), format_string('%entity_type: Name field is set.', ['%entity_type' => $entity_type]));
-      $this->assertIdentical(count($entity->name), 0, format_string('%entity_type: Name field contains no items.', ['%entity_type' => $entity_type]));
-      $this->assertIdentical($entity->name->getValue(), [], format_string('%entity_type: Name field value is an empty array.', ['%entity_type' => $entity_type]));
+      $this->assertSame(count($entity->name), 0, format_string('%entity_type: Name field contains no items.', ['%entity_type' => $entity_type]));
+      $this->assertSame($entity->name->getValue(), [], format_string('%entity_type: Name field value is an empty array.', ['%entity_type' => $entity_type]));
       $this->assertFalse(isset($entity->name[0]), format_string('%entity_type: Name field item is not set.', ['%entity_type' => $entity_type]));
       $this->assertFalse(isset($entity->name[0]->value), format_string('%entity_type: First name item value is not set.', ['%entity_type' => $entity_type]));
       $this->assertFalse(isset($entity->name->value), format_string('%entity_type: Name value is not set.', ['%entity_type' => $entity_type]));
@@ -343,7 +343,7 @@ protected function doTestReadWrite($entity_type) {
         'field_test_text' => $text_item,
       ]);
     $this->assertNotNull($entity->user_id->target_id, format_string('%entity_type: User id is not NULL', ['%entity_type' => $entity_type]));
-    $this->assertIdentical($entity->user_id->target_id, 0, format_string('%entity_type: User id has been set to 0', ['%entity_type' => $entity_type]));
+    $this->assertSame($entity->user_id->target_id, 0, format_string('%entity_type: User id has been set to 0', ['%entity_type' => $entity_type]));
 
     // Test setting the ID with the value only.
     $entity = $this->container->get('entity_type.manager')
@@ -354,7 +354,7 @@ protected function doTestReadWrite($entity_type) {
         'field_test_text' => $text_item,
       ]);
     $this->assertNotNull($entity->user_id->target_id, format_string('%entity_type: User id is not NULL', ['%entity_type' => $entity_type]));
-    $this->assertIdentical($entity->user_id->target_id, 0, format_string('%entity_type: User id has been set to 0', ['%entity_type' => $entity_type]));
+    $this->assertSame($entity->user_id->target_id, 0, format_string('%entity_type: User id has been set to 0', ['%entity_type' => $entity_type]));
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
index 763fa44f15..8e37bd86a6 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
@@ -291,21 +291,21 @@ public function testEntityQuery() {
     // This matches both the original and new current revisions, multiple
     // revisions are returned for some entities.
     $assert = [16 => '4', 17 => '5', 18 => '6', 19 => '7', 8 => '8', 9 => '9', 10 => '10', 11 => '11', 20 => '12', 21 => '13', 22 => '14', 23 => '15'];
-    $this->assertIdentical($results, $assert);
+    $this->assertSame($results, $assert);
     $results = $this->factory->get('entity_test_mulrev')
       ->condition("$greetings.value", 'siema', 'STARTS_WITH')
       ->sort('revision_id')
       ->execute();
     // Now we only get the ones that originally were siema, entity id 8 and
     // above.
-    $this->assertIdentical($results, array_slice($assert, 4, 8, TRUE));
+    $this->assertSame($results, array_slice($assert, 4, 8, TRUE));
     $results = $this->factory->get('entity_test_mulrev')
       ->condition("$greetings.value", 'a', 'ENDS_WITH')
       ->sort('revision_id')
       ->execute();
     // It is very important that we do not get the ones which only have
     // xsiemax despite originally they were merhaba, ie. ended with a.
-    $this->assertIdentical($results, array_slice($assert, 4, 8, TRUE));
+    $this->assertSame($results, array_slice($assert, 4, 8, TRUE));
     $results = $this->factory->get('entity_test_mulrev')
       ->condition("$greetings.value", 'a', 'ENDS_WITH')
       ->allRevisions()
@@ -314,7 +314,7 @@ public function testEntityQuery() {
       ->execute();
     // Now we get everything.
     $assert = [4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10', 11 => '11', 12 => '12', 20 => '12', 13 => '13', 21 => '13', 14 => '14', 22 => '14', 15 => '15', 23 => '15'];
-    $this->assertIdentical($results, $assert);
+    $this->assertSame($results, $assert);
   }
 
   /**
@@ -608,7 +608,7 @@ protected function assertResult() {
     foreach ($expected as $binary) {
       $assert[$binary] = strval($binary);
     }
-    $this->assertIdentical($this->queryResults, $assert);
+    $this->assertSame($this->queryResults, $assert);
   }
 
   protected function assertRevisionResult($keys, $expected) {
@@ -616,7 +616,7 @@ protected function assertRevisionResult($keys, $expected) {
     foreach ($expected as $key => $binary) {
       $assert[$keys[$key]] = strval($binary);
     }
-    $this->assertIdentical($this->queryResults, $assert);
+    $this->assertSame($this->queryResults, $assert);
     return $assert;
   }
 
@@ -724,110 +724,110 @@ public function testCaseSensitivity() {
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', $fixtures[0]['lowercase'] . $fixtures[1]['lowercase']
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case insensitive, lowercase');
+    $this->assertSame(count($result), 1, 'Case insensitive, lowercase');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', $fixtures[0]['uppercase'] . $fixtures[1]['uppercase']
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case insensitive, uppercase');
+    $this->assertSame(count($result), 1, 'Case insensitive, uppercase');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', $fixtures[0]['uppercase'] . $fixtures[1]['lowercase']
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case insensitive, mixed.');
+    $this->assertSame(count($result), 1, 'Case insensitive, mixed.');
 
     // Check the case sensitive field, = operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', $fixtures[0]['lowercase'] . $fixtures[1]['lowercase']
     )->execute();
-    $this->assertIdentical(count($result), 0, 'Case sensitive, lowercase.');
+    $this->assertSame(count($result), 0, 'Case sensitive, lowercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', $fixtures[0]['uppercase'] . $fixtures[1]['uppercase']
     )->execute();
-    $this->assertIdentical(count($result), 0, 'Case sensitive, uppercase.');
+    $this->assertSame(count($result), 0, 'Case sensitive, uppercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', $fixtures[0]['uppercase'] . $fixtures[1]['lowercase']
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, exact match.');
+    $this->assertSame(count($result), 1, 'Case sensitive, exact match.');
 
     // Check the case insensitive field, IN operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', [$fixtures[0]['lowercase'] . $fixtures[1]['lowercase']], 'IN'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case insensitive, lowercase');
+    $this->assertSame(count($result), 1, 'Case insensitive, lowercase');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', [$fixtures[0]['uppercase'] . $fixtures[1]['uppercase']], 'IN'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case insensitive, uppercase');
+    $this->assertSame(count($result), 1, 'Case insensitive, uppercase');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', [$fixtures[0]['uppercase'] . $fixtures[1]['lowercase']], 'IN'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case insensitive, mixed');
+    $this->assertSame(count($result), 1, 'Case insensitive, mixed');
 
     // Check the case sensitive field, IN operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', [$fixtures[0]['lowercase'] . $fixtures[1]['lowercase']], 'IN'
     )->execute();
-    $this->assertIdentical(count($result), 0, 'Case sensitive, lowercase');
+    $this->assertSame(count($result), 0, 'Case sensitive, lowercase');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', [$fixtures[0]['uppercase'] . $fixtures[1]['uppercase']], 'IN'
     )->execute();
-    $this->assertIdentical(count($result), 0, 'Case sensitive, uppercase');
+    $this->assertSame(count($result), 0, 'Case sensitive, uppercase');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', [$fixtures[0]['uppercase'] . $fixtures[1]['lowercase']], 'IN'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, mixed');
+    $this->assertSame(count($result), 1, 'Case sensitive, mixed');
 
     // Check the case insensitive field, STARTS_WITH operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', $fixtures[0]['lowercase'], 'STARTS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, lowercase.');
+    $this->assertSame(count($result), 1, 'Case sensitive, lowercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', $fixtures[0]['uppercase'], 'STARTS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, exact match.');
+    $this->assertSame(count($result), 1, 'Case sensitive, exact match.');
 
     // Check the case sensitive field, STARTS_WITH operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', $fixtures[0]['lowercase'], 'STARTS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 0, 'Case sensitive, lowercase.');
+    $this->assertSame(count($result), 0, 'Case sensitive, lowercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', $fixtures[0]['uppercase'], 'STARTS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, exact match.');
+    $this->assertSame(count($result), 1, 'Case sensitive, exact match.');
 
 
     // Check the case insensitive field, ENDS_WITH operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', $fixtures[1]['lowercase'], 'ENDS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, lowercase.');
+    $this->assertSame(count($result), 1, 'Case sensitive, lowercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', $fixtures[1]['uppercase'], 'ENDS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, exact match.');
+    $this->assertSame(count($result), 1, 'Case sensitive, exact match.');
 
     // Check the case sensitive field, ENDS_WITH operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', $fixtures[1]['lowercase'], 'ENDS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, lowercase.');
+    $this->assertSame(count($result), 1, 'Case sensitive, lowercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', $fixtures[1]['uppercase'], 'ENDS_WITH'
     )->execute();
-    $this->assertIdentical(count($result), 0, 'Case sensitive, exact match.');
+    $this->assertSame(count($result), 0, 'Case sensitive, exact match.');
 
 
     // Check the case insensitive field, CONTAINS operator, use the inner 8
@@ -835,23 +835,23 @@ public function testCaseSensitivity() {
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', Unicode::substr($fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], 4, 8), 'CONTAINS'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, lowercase.');
+    $this->assertSame(count($result), 1, 'Case sensitive, lowercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_ci', Unicode::strtolower(Unicode::substr($fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], 4, 8)), 'CONTAINS'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, exact match.');
+    $this->assertSame(count($result), 1, 'Case sensitive, exact match.');
 
     // Check the case sensitive field, CONTAINS operator.
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', Unicode::substr($fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], 4, 8), 'CONTAINS'
     )->execute();
-    $this->assertIdentical(count($result), 1, 'Case sensitive, lowercase.');
+    $this->assertSame(count($result), 1, 'Case sensitive, lowercase.');
 
     $result = \Drupal::entityQuery('entity_test_mulrev')->condition(
       'field_cs', Unicode::strtolower(Unicode::substr($fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], 4, 8)), 'CONTAINS'
     )->execute();
-    $this->assertIdentical(count($result), 0, 'Case sensitive, exact match.');
+    $this->assertSame(count($result), 0, 'Case sensitive, exact match.');
 
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
index b2c72b99d9..609e73cfc5 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
@@ -112,7 +112,7 @@ public function testSort() {
       $nodes['published2']->id() => $node_labels['published2'],
       $nodes['published1']->id() => $node_labels['published1'],
     ];
-    $this->assertIdentical($result['article'], $expected_result, 'Query sorted by field returned expected values.');
+    $this->assertSame($result['article'], $expected_result, 'Query sorted by field returned expected values.');
 
     // Assert sort by base field.
     $selection_options['sort'] = [
@@ -125,7 +125,7 @@ public function testSort() {
       $nodes['published1']->id() => $node_labels['published1'],
       $nodes['published2']->id() => $node_labels['published2'],
     ];
-    $this->assertIdentical($result['article'], $expected_result, 'Query sorted by property returned expected values.');
+    $this->assertSame($result['article'], $expected_result, 'Query sorted by property returned expected values.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
index a3466a4967..f65fbf28d2 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
@@ -46,7 +46,7 @@ protected function assertCRUD($entity_type) {
         'name' => $this->randomMachineName(),
         'uuid' => $uuid,
       ]);
-    $this->assertIdentical($custom_entity->uuid(), $uuid);
+    $this->assertSame($custom_entity->uuid(), $uuid);
     // Save this entity, so we have more than one later.
     $custom_entity->save();
 
@@ -62,7 +62,7 @@ protected function assertCRUD($entity_type) {
 
     // Verify that the UUID is retained upon saving.
     $entity->save();
-    $this->assertIdentical($entity->uuid(), $uuid);
+    $this->assertSame($entity->uuid(), $uuid);
 
     // Verify that the UUID is retained upon loading.
     /** @var \Drupal\Core\Entity\EntityStorageInterface $storage */
@@ -70,11 +70,11 @@ protected function assertCRUD($entity_type) {
       ->getStorage($entity_type);
     $storage->resetCache([$entity->id()]);
     $entity_loaded = $storage->load($entity->id());
-    $this->assertIdentical($entity_loaded->uuid(), $uuid);
+    $this->assertSame($entity_loaded->uuid(), $uuid);
 
     // Verify that \Drupal::entityManager()->loadEntityByUuid() loads the same entity.
     $entity_loaded_by_uuid = \Drupal::entityManager()->loadEntityByUuid($entity_type, $uuid, TRUE);
-    $this->assertIdentical($entity_loaded_by_uuid->uuid(), $uuid);
+    $this->assertSame($entity_loaded_by_uuid->uuid(), $uuid);
     $this->assertEqual($entity_loaded_by_uuid->id(), $entity_loaded->id());
 
     // Creating a duplicate needs to result in a new UUID.
diff --git a/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php b/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php
index 0c4c1eb7d0..74267756da 100644
--- a/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php
@@ -82,7 +82,7 @@ public function testHtaccessSave() {
    */
   protected function assertFilePermissions($uri, $expected) {
     $actual = fileperms($uri) & 0777;
-    return $this->assertIdentical($actual, $expected, SafeMarkup::format('@uri file permissions @actual are identical to @expected.', [
+    return $this->assertSame($actual, $expected, SafeMarkup::format('@uri file permissions @actual are identical to @expected.', [
       '@uri' => $uri,
       '@actual' => 0 . decoct($actual),
       '@expected' => 0 . decoct($expected),
diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
index 05ac7c2557..901f6d84e1 100644
--- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
@@ -45,12 +45,12 @@ public function testFileMimeTypeDetection() {
       // Test stream [URI].
       foreach ($prefixes as $prefix) {
         $output = $guesser->guess($prefix . $input);
-        $this->assertIdentical($output, $expected, format_string('Mimetype for %input is %output (expected: %expected).', ['%input' => $prefix . $input, '%output' => $output, '%expected' => $expected]));
+        $this->assertSame($output, $expected, format_string('Mimetype for %input is %output (expected: %expected).', ['%input' => $prefix . $input, '%output' => $output, '%expected' => $expected]));
       }
 
       // Test normal path equivalent
       $output = $guesser->guess($input);
-      $this->assertIdentical($output, $expected, format_string('Mimetype (using default mappings) for %input is %output (expected: %expected).', ['%input' => $input, '%output' => $output, '%expected' => $expected]));
+      $this->assertSame($output, $expected, format_string('Mimetype (using default mappings) for %input is %output (expected: %expected).', ['%input' => $input, '%output' => $output, '%expected' => $expected]));
     }
 
     // Now test the extension gusser by passing in a custom mapping.
@@ -85,7 +85,7 @@ public function testFileMimeTypeDetection() {
 
     foreach ($test_case as $input => $expected) {
       $output = $extension_guesser->guess($input);
-      $this->assertIdentical($output, $expected, format_string('Mimetype (using passed-in mappings) for %input is %output (expected: %expected).', ['%input' => $input, '%output' => $output, '%expected' => $expected]));
+      $this->assertSame($output, $expected, format_string('Mimetype (using passed-in mappings) for %input is %output (expected: %expected).', ['%input' => $input, '%output' => $output, '%expected' => $expected]));
     }
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
index 6d79f17cfb..628b82a5a2 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
@@ -92,13 +92,13 @@ public function testDefaultAndCustomHandlers() {
 
     $handlers = $form_state->get('test_handlers');
 
-    $this->assertIdentical(count($handlers['validate']), 2);
-    $this->assertIdentical($handlers['validate'][0], 'customValidateForm');
-    $this->assertIdentical($handlers['validate'][1], 'validateForm');
+    $this->assertSame(count($handlers['validate']), 2);
+    $this->assertSame($handlers['validate'][0], 'customValidateForm');
+    $this->assertSame($handlers['validate'][1], 'validateForm');
 
-    $this->assertIdentical(count($handlers['submit']), 2);
-    $this->assertIdentical($handlers['submit'][0], 'customSubmitForm');
-    $this->assertIdentical($handlers['submit'][1], 'submitForm');
+    $this->assertSame(count($handlers['submit']), 2);
+    $this->assertSame($handlers['submit'][0], 'customSubmitForm');
+    $this->assertSame($handlers['submit'][1], 'submitForm');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
index 26a1abeff1..4050e374c9 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
@@ -44,20 +44,20 @@ public function testCRUDWithExpiration() {
     // Verify that an item can be stored with setWithExpire().
     // Use a random expiration in each test.
     $stores[0]->setWithExpire('foo', $this->objects[0], rand(500, 100000));
-    $this->assertIdenticalObject($this->objects[0], $stores[0]->get('foo'));
+    $this->assertSameObject($this->objects[0], $stores[0]->get('foo'));
     // Verify that the other collection is not affected.
     $this->assertFalse($stores[1]->get('foo'));
 
     // Verify that an item can be updated with setWithExpire().
     $stores[0]->setWithExpire('foo', $this->objects[1], rand(500, 100000));
-    $this->assertIdenticalObject($this->objects[1], $stores[0]->get('foo'));
+    $this->assertSameObject($this->objects[1], $stores[0]->get('foo'));
     // Verify that the other collection is still not affected.
     $this->assertFalse($stores[1]->get('foo'));
 
     // Verify that the expirable data key is unique.
     $stores[1]->setWithExpire('foo', $this->objects[2], rand(500, 100000));
-    $this->assertIdenticalObject($this->objects[1], $stores[0]->get('foo'));
-    $this->assertIdenticalObject($this->objects[2], $stores[1]->get('foo'));
+    $this->assertSameObject($this->objects[1], $stores[0]->get('foo'));
+    $this->assertSameObject($this->objects[2], $stores[1]->get('foo'));
 
     // Verify that multiple items can be stored with setMultipleWithExpire().
     $values = [
@@ -67,11 +67,11 @@ public function testCRUDWithExpiration() {
     $stores[0]->setMultipleWithExpire($values, rand(500, 100000));
     $result = $stores[0]->getMultiple(['foo', 'bar']);
     foreach ($values as $j => $value) {
-      $this->assertIdenticalObject($value, $result[$j]);
+      $this->assertSameObject($value, $result[$j]);
     }
 
     // Verify that the other collection was not affected.
-    $this->assertIdenticalObject($stores[1]->get('foo'), $this->objects[2]);
+    $this->assertSameObject($stores[1]->get('foo'), $this->objects[2]);
     $this->assertFalse($stores[1]->get('bar'));
 
     // Verify that all items in a collection can be retrieved.
@@ -93,7 +93,7 @@ public function testCRUDWithExpiration() {
     $this->assertFalse($stores[0]->get('bar'));
     $this->assertFalse($stores[0]->getMultiple(['foo', 'bar']));
     // Verify that the item in the other collection still exists.
-    $this->assertIdenticalObject($this->objects[5], $stores[1]->get('foo'));
+    $this->assertSameObject($this->objects[5], $stores[1]->get('foo'));
 
     // Test that setWithExpireIfNotExists() succeeds only the first time.
     $key = $this->randomMachineName();
@@ -101,7 +101,7 @@ public function testCRUDWithExpiration() {
       // setWithExpireIfNotExists() should be TRUE the first time (when $i is
       // 0) and FALSE the second time (when $i is 1).
       $this->assertEqual(!$i, $stores[0]->setWithExpireIfNotExists($key, $this->objects[$i], rand(500, 100000)));
-      $this->assertIdenticalObject($this->objects[0], $stores[0]->get($key));
+      $this->assertSameObject($this->objects[0], $stores[0]->get($key));
       // Verify that the other collection is not affected.
       $this->assertFalse($stores[1]->get($key));
     }
@@ -110,7 +110,7 @@ public function testCRUDWithExpiration() {
     $stores[0]->delete($key);
     $stores[0]->setWithExpireIfNotExists($key, $this->objects[1], rand(500, 100000));
     // This time it should succeed.
-    $this->assertIdenticalObject($this->objects[1], $stores[0]->get($key));
+    $this->assertSameObject($this->objects[1], $stores[0]->get($key));
     // Verify that the other collection is still not affected.
     $this->assertFalse($stores[1]->get($key));
 
@@ -131,8 +131,8 @@ public function testExpiration() {
     $this->assertFalse($stores[0]->has('yesterday'));
     $this->assertFalse($stores[0]->get('yesterday'));
     $this->assertTrue($stores[0]->has('troubles'));
-    $this->assertIdentical($stores[0]->get('troubles'), 'here to stay');
-    $this->assertIdentical(count($stores[0]->getMultiple(['yesterday', 'troubles'])), 1);
+    $this->assertSame($stores[0]->get('troubles'), 'here to stay');
+    $this->assertSame(count($stores[0]->getMultiple(['yesterday', 'troubles'])), 1);
 
     // Store items set to expire in the past in various ways.
     $stores[0]->setWithExpire($this->randomMachineName(), $this->objects[0], -7 * $day);
@@ -149,7 +149,7 @@ public function testExpiration() {
 
     // Ensure only non-expired items are retrieved.
     $all = $stores[0]->getAll();
-    $this->assertIdentical(count($all), 2);
+    $this->assertSame(count($all), 2);
     foreach (['troubles', 'still'] as $key) {
       $this->assertTrue(!empty($all[$key]));
     }
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
index 875ca7a4fa..49c458ab26 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
@@ -39,7 +39,7 @@ public function testGarbageCollection() {
     for ($i = 0; $i <= 3; $i++) {
       $store->setWithExpire('key_' . $i, $this->randomObject(), rand(500, 100000));
     }
-    $this->assertIdentical(count($store->getAll()), 4, 'Four items were written to the storage.');
+    $this->assertSame(count($store->getAll()), 4, 'Four items were written to the storage.');
 
     // Manually expire the data.
     for ($i = 0; $i <= 3; $i++) {
@@ -65,7 +65,7 @@ public function testGarbageCollection() {
       [
         ':collection' => $collection,
       ])->fetchAll();
-    $this->assertIdentical(count($result), 1, 'Only one item remains after garbage collection');
+    $this->assertSame(count($result), 1, 'Only one item remains after garbage collection');
 
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
index 98850055a5..d7410872a3 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
@@ -42,20 +42,20 @@ public function testCRUD() {
 
     // Verify default properties on a newly created empty entity.
     $empty = EntityTestLabel::create();
-    $this->assertIdentical($empty->id->value, NULL);
-    $this->assertIdentical($empty->name->value, NULL);
+    $this->assertSame($empty->id->value, NULL);
+    $this->assertSame($empty->name->value, NULL);
     $this->assertTrue($empty->uuid->value);
-    $this->assertIdentical($empty->langcode->value, $default_langcode);
+    $this->assertSame($empty->langcode->value, $default_langcode);
 
     // Verify ConfigEntity properties/methods on the newly created empty entity.
-    $this->assertIdentical($empty->isNew(), TRUE);
-    $this->assertIdentical($empty->bundle(), 'entity_test_label');
-    $this->assertIdentical($empty->id(), NULL);
+    $this->assertSame($empty->isNew(), TRUE);
+    $this->assertSame($empty->bundle(), 'entity_test_label');
+    $this->assertSame($empty->id(), NULL);
     $this->assertTrue($empty->uuid());
-    $this->assertIdentical($empty->label(), NULL);
+    $this->assertSame($empty->label(), NULL);
 
     // Verify Entity properties/methods on the newly created empty entity.
-    $this->assertIdentical($empty->getEntityTypeId(), 'entity_test_label');
+    $this->assertSame($empty->getEntityTypeId(), 'entity_test_label');
     // The URI can only be checked after saving.
     try {
       $empty->urlInfo();
@@ -78,7 +78,7 @@ public function testCRUD() {
     $empty_id = EntityTestLabel::create([
       'id' => '',
     ]);
-    $this->assertIdentical($empty_id->isNew(), TRUE);
+    $this->assertSame($empty_id->isNew(), TRUE);
     try {
       $empty_id->save();
       $this->fail('EntityMalformedException was thrown.');
@@ -92,18 +92,18 @@ public function testCRUD() {
       'id' => $this->randomMachineName(),
       'name' => $this->randomString(),
     ]);
-    $this->assertIdentical($entity_test->id->value, $expected['id']);
+    $this->assertSame($entity_test->id->value, $expected['id']);
     $this->assertTrue($entity_test->uuid->value);
     $this->assertNotEqual($entity_test->uuid->value, $empty->uuid->value);
-    $this->assertIdentical($entity_test->name->value, $expected['name']);
-    $this->assertIdentical($entity_test->langcode->value, $default_langcode);
+    $this->assertSame($entity_test->name->value, $expected['name']);
+    $this->assertSame($entity_test->langcode->value, $default_langcode);
 
     // Verify methods on the newly created entity.
-    $this->assertIdentical($entity_test->isNew(), TRUE);
-    $this->assertIdentical($entity_test->id(), $expected['id']);
+    $this->assertSame($entity_test->isNew(), TRUE);
+    $this->assertSame($entity_test->id(), $expected['id']);
     $this->assertTrue($entity_test->uuid());
     $expected['uuid'] = $entity_test->uuid();
-    $this->assertIdentical($entity_test->label(), $expected['name']);
+    $this->assertSame($entity_test->label(), $expected['name']);
 
     // Verify that the entity can be saved.
     try {
@@ -118,26 +118,26 @@ public function testCRUD() {
     $this->assertTrue($storage->hasData());
 
     // Verify that the correct status is returned and properties did not change.
-    $this->assertIdentical($status, SAVED_NEW);
-    $this->assertIdentical($entity_test->id(), $expected['id']);
-    $this->assertIdentical($entity_test->uuid(), $expected['uuid']);
-    $this->assertIdentical($entity_test->label(), $expected['name']);
-    $this->assertIdentical($entity_test->isNew(), FALSE);
+    $this->assertSame($status, SAVED_NEW);
+    $this->assertSame($entity_test->id(), $expected['id']);
+    $this->assertSame($entity_test->uuid(), $expected['uuid']);
+    $this->assertSame($entity_test->label(), $expected['name']);
+    $this->assertSame($entity_test->isNew(), FALSE);
 
     // Save again, and verify correct status and properties again.
     $status = $entity_test->save();
-    $this->assertIdentical($status, SAVED_UPDATED);
-    $this->assertIdentical($entity_test->id(), $expected['id']);
-    $this->assertIdentical($entity_test->uuid(), $expected['uuid']);
-    $this->assertIdentical($entity_test->label(), $expected['name']);
-    $this->assertIdentical($entity_test->isNew(), FALSE);
+    $this->assertSame($status, SAVED_UPDATED);
+    $this->assertSame($entity_test->id(), $expected['id']);
+    $this->assertSame($entity_test->uuid(), $expected['uuid']);
+    $this->assertSame($entity_test->label(), $expected['name']);
+    $this->assertSame($entity_test->isNew(), FALSE);
 
     // Ensure that creating an entity with the same id as an existing one is not
     // possible.
     $same_id = EntityTestLabel::create([
       'id' => $entity_test->id(),
     ]);
-    $this->assertIdentical($same_id->isNew(), TRUE);
+    $this->assertSame($same_id->isNew(), TRUE);
     try {
       $same_id->save();
       $this->fail('Not possible to overwrite an entity entity.');
@@ -152,17 +152,17 @@ public function testCRUD() {
       $old_id = $ids[$i - 1];
       $new_id = $ids[$i];
       // Before renaming, everything should point to the current ID.
-      $this->assertIdentical($entity_test->id(), $old_id);
+      $this->assertSame($entity_test->id(), $old_id);
 
       // Rename.
       $entity_test->id = $new_id;
-      $this->assertIdentical($entity_test->id(), $new_id);
+      $this->assertSame($entity_test->id(), $new_id);
       $status = $entity_test->save();
-      $this->assertIdentical($status, SAVED_UPDATED);
-      $this->assertIdentical($entity_test->isNew(), FALSE);
+      $this->assertSame($status, SAVED_UPDATED);
+      $this->assertSame($entity_test->isNew(), FALSE);
 
       // Verify that originalID points to new ID directly after renaming.
-      $this->assertIdentical($entity_test->id(), $new_id);
+      $this->assertSame($entity_test->id(), $new_id);
     }
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
index 48af84d54a..b0735e717a 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
@@ -48,27 +48,27 @@ protected function setUp() {
   public function testCRUD() {
     $stores = $this->createStorage();
     // Verify that each store returns its own collection name.
-    $this->assertIdentical($stores[0]->getCollectionName(), $this->collections[0]);
-    $this->assertIdentical($stores[1]->getCollectionName(), $this->collections[1]);
+    $this->assertSame($stores[0]->getCollectionName(), $this->collections[0]);
+    $this->assertSame($stores[1]->getCollectionName(), $this->collections[1]);
 
     // Verify that an item can be stored.
     $stores[0]->set('foo', $this->objects[0]);
     $this->assertTrue($stores[0]->has('foo'));
-    $this->assertIdenticalObject($this->objects[0], $stores[0]->get('foo'));
+    $this->assertSameObject($this->objects[0], $stores[0]->get('foo'));
     // Verify that the other collection is not affected.
     $this->assertFalse($stores[1]->has('foo'));
     $this->assertFalse($stores[1]->get('foo'));
 
     // Verify that an item can be updated.
     $stores[0]->set('foo', $this->objects[1]);
-    $this->assertIdenticalObject($this->objects[1], $stores[0]->get('foo'));
+    $this->assertSameObject($this->objects[1], $stores[0]->get('foo'));
     // Verify that the other collection is still not affected.
     $this->assertFalse($stores[1]->get('foo'));
 
     // Verify that a collection/name pair is unique.
     $stores[1]->set('foo', $this->objects[2]);
-    $this->assertIdenticalObject($this->objects[1], $stores[0]->get('foo'));
-    $this->assertIdenticalObject($this->objects[2], $stores[1]->get('foo'));
+    $this->assertSameObject($this->objects[1], $stores[0]->get('foo'));
+    $this->assertSameObject($this->objects[2], $stores[1]->get('foo'));
 
     // Verify that an item can be deleted.
     $stores[0]->delete('foo');
@@ -77,7 +77,7 @@ public function testCRUD() {
 
     // Verify that the other collection is not affected.
     $this->assertTrue($stores[1]->has('foo'));
-    $this->assertIdenticalObject($this->objects[2], $stores[1]->get('foo'));
+    $this->assertSameObject($this->objects[2], $stores[1]->get('foo'));
     $stores[1]->delete('foo');
     $this->assertFalse($stores[1]->get('foo'));
 
@@ -91,7 +91,7 @@ public function testCRUD() {
     // Verify that multiple items can be retrieved.
     $result = $stores[0]->getMultiple(['foo', 'bar']);
     foreach ($values as $j => $value) {
-      $this->assertIdenticalObject($value, $result[$j]);
+      $this->assertSameObject($value, $result[$j]);
     }
 
     // Verify that the other collection was not affected.
@@ -119,7 +119,7 @@ public function testCRUD() {
     // Verify that deleting no items does not cause an error.
     $stores[0]->deleteMultiple([]);
     // Verify that the item in the other collection still exists.
-    $this->assertIdenticalObject($this->objects[5], $stores[1]->get('foo'));
+    $this->assertSameObject($this->objects[5], $stores[1]->get('foo'));
 
   }
 
@@ -134,11 +134,11 @@ public function testNonExistingKeys() {
     $this->assertNull($stores[0]->get('foo'));
 
     // Verify that a non-existing key with a default returns the default.
-    $this->assertIdentical($stores[0]->get('foo', 'bar'), 'bar');
+    $this->assertSame($stores[0]->get('foo', 'bar'), 'bar');
 
     // Verify that a FALSE value can be stored.
     $stores[0]->set('foo', FALSE);
-    $this->assertIdentical($stores[0]->get('foo'), FALSE);
+    $this->assertSame($stores[0]->get('foo'), FALSE);
 
     // Verify that a deleted key returns NULL as value.
     $stores[0]->delete('foo');
@@ -148,7 +148,7 @@ public function testNonExistingKeys() {
     $stores[0]->set('bar', 'baz');
     $values = $stores[0]->getMultiple(['foo', 'bar']);
     $this->assertFalse(isset($values['foo']), "Key 'foo' not found.");
-    $this->assertIdentical($values['bar'], 'baz');
+    $this->assertSame($values['bar'], 'baz');
   }
 
   /**
@@ -163,7 +163,7 @@ public function testSetIfNotExists() {
       // setIfNotExists() should be TRUE the first time (when $i is 0) and
       // FALSE the second time (when $i is 1).
       $this->assertEqual(!$i, $stores[0]->setIfNotExists($key, $this->objects[$i]));
-      $this->assertIdenticalObject($this->objects[0], $stores[0]->get($key));
+      $this->assertSameObject($this->objects[0], $stores[0]->get($key));
       // Verify that the other collection is not affected.
       $this->assertFalse($stores[1]->get($key));
     }
@@ -172,7 +172,7 @@ public function testSetIfNotExists() {
     $stores[0]->delete($key);
     $stores[0]->setIfNotExists($key, $this->objects[1]);
     // This time it should succeed.
-    $this->assertIdenticalObject($this->objects[1], $stores[0]->get($key));
+    $this->assertSameObject($this->objects[1], $stores[0]->get($key));
     // Verify that the other collection is still not affected.
     $this->assertFalse($stores[1]->get($key));
   }
@@ -185,9 +185,9 @@ public function testRename() {
     $store = $stores[0];
 
     $store->set('old', 'thing');
-    $this->assertIdentical($store->get('old'), 'thing');
+    $this->assertSame($store->get('old'), 'thing');
     $store->rename('old', 'new');
-    $this->assertIdentical($store->get('new'), 'thing');
+    $this->assertSame($store->get('new'), 'thing');
     $this->assertNull($store->get('old'));
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
index 251abbf47a..3ee200fe24 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
@@ -24,9 +24,9 @@ public function testDerivativeDecorator() {
     // Ensure that NULL is returned as the definition of a non-existing base
     // plugin, a non-existing derivative plugin, or a base plugin that may not
     // be used without deriving.
-    $this->assertIdentical($this->mockBlockManager->getDefinition('non_existing', FALSE), NULL, 'NULL returned as the definition of a non-existing base plugin.');
-    $this->assertIdentical($this->mockBlockManager->getDefinition('menu:non_existing', FALSE), NULL, 'NULL returned as the definition of a non-existing derivative plugin.');
-    $this->assertIdentical($this->mockBlockManager->getDefinition('menu', FALSE), NULL, 'NULL returned as the definition of a base plugin that may not be used without deriving.');
+    $this->assertSame($this->mockBlockManager->getDefinition('non_existing', FALSE), NULL, 'NULL returned as the definition of a non-existing base plugin.');
+    $this->assertSame($this->mockBlockManager->getDefinition('menu:non_existing', FALSE), NULL, 'NULL returned as the definition of a non-existing derivative plugin.');
+    $this->assertSame($this->mockBlockManager->getDefinition('menu', FALSE), NULL, 'NULL returned as the definition of a base plugin that may not be used without deriving.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
index a3492ed223..1210c05ac8 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
@@ -51,10 +51,10 @@ public function testDiscoveryInterface() {
     }
 
     // Ensure that an empty array is returned if no plugin definitions are found.
-    $this->assertIdentical($this->emptyDiscovery->getDefinitions(), [], 'array() returned if no plugin definitions are found.');
+    $this->assertSame($this->emptyDiscovery->getDefinitions(), [], 'array() returned if no plugin definitions are found.');
 
     // Ensure that NULL is returned as the definition of a non-existing plugin.
-    $this->assertIdentical($this->emptyDiscovery->getDefinition('non_existing', FALSE), NULL, 'NULL returned as the definition of a non-existing plugin.');
+    $this->assertSame($this->emptyDiscovery->getDefinition('non_existing', FALSE), NULL, 'NULL returned as the definition of a non-existing plugin.');
   }
 
   /**
@@ -78,7 +78,7 @@ protected function assertDefinitionIdentical(array $definition, array $expected_
     };
     array_walk_recursive($definition, $func);
     array_walk_recursive($expected_definition, $func);
-    return $this->assertIdentical($definition, $expected_definition);
+    return $this->assertSame($definition, $expected_definition);
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
index 50da5cfa2c..5425ec5012 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
@@ -17,8 +17,8 @@ class FactoryTest extends PluginTestBase {
   public function testDefaultFactory() {
     // Ensure a non-derivative plugin can be instantiated.
     $plugin = $this->testPluginManager->createInstance('user_login', ['title' => 'Please enter your login name and password']);
-    $this->assertIdentical(get_class($plugin), 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock', 'Correct plugin class instantiated with default factory.');
-    $this->assertIdentical($plugin->getTitle(), 'Please enter your login name and password', 'Plugin instance correctly configured.');
+    $this->assertSame(get_class($plugin), 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock', 'Correct plugin class instantiated with default factory.');
+    $this->assertSame($plugin->getTitle(), 'Please enter your login name and password', 'Plugin instance correctly configured.');
 
     // Ensure that attempting to instantiate non-existing plugins throws a
     // PluginException.
@@ -47,12 +47,12 @@ public function testDefaultFactory() {
   public function testReflectionFactory() {
     // Ensure a non-derivative plugin can be instantiated.
     $plugin = $this->mockBlockManager->createInstance('user_login', ['title' => 'Please enter your login name and password']);
-    $this->assertIdentical(get_class($plugin), 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock', 'Correct plugin class instantiated.');
-    $this->assertIdentical($plugin->getTitle(), 'Please enter your login name and password', 'Plugin instance correctly configured.');
+    $this->assertSame(get_class($plugin), 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock', 'Correct plugin class instantiated.');
+    $this->assertSame($plugin->getTitle(), 'Please enter your login name and password', 'Plugin instance correctly configured.');
 
     // Ensure a derivative plugin can be instantiated.
     $plugin = $this->mockBlockManager->createInstance('menu:main_menu', ['depth' => 2]);
-    $this->assertIdentical($plugin->getContent(), '<ul><li>1<ul><li>1.1</li></ul></li></ul>', 'Derived plugin instance correctly instantiated and configured.');
+    $this->assertSame($plugin->getContent(), '<ul><li>1<ul><li>1.1</li></ul></li></ul>', 'Derived plugin instance correctly instantiated and configured.');
 
     // Ensure that attempting to instantiate non-existing plugins throws a
     // PluginException. Test this for a non-existing base plugin, a non-existing
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
index 454165d466..ad11bde4e0 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
@@ -16,26 +16,26 @@ public function testInspection() {
     foreach (['user_login'] as $id) {
       $plugin = $this->testPluginManager->createInstance($id);
       $expected_definition = $this->testPluginExpectedDefinitions[$id];
-      $this->assertIdentical($plugin->getPluginId(), $id);
-      $this->assertIdentical($this->testPluginManager->getDefinition($id), $expected_definition);
-      $this->assertIdentical($plugin->getPluginDefinition(), $expected_definition);
+      $this->assertSame($plugin->getPluginId(), $id);
+      $this->assertSame($this->testPluginManager->getDefinition($id), $expected_definition);
+      $this->assertSame($plugin->getPluginDefinition(), $expected_definition);
     }
     // Skip the 'menu' derived blocks, because MockMenuBlock does not implement
     // PluginInspectionInterface. The others do by extending PluginBase.
     foreach (['user_login', 'layout'] as $id) {
       $plugin = $this->mockBlockManager->createInstance($id);
       $expected_definition = $this->mockBlockExpectedDefinitions[$id];
-      $this->assertIdentical($plugin->getPluginId(), $id);
-      $this->assertIdentical($this->castSafeStrings($this->mockBlockManager->getDefinition($id)), $expected_definition);
-      $this->assertIdentical($this->castSafeStrings($plugin->getPluginDefinition()), $expected_definition);
+      $this->assertSame($plugin->getPluginId(), $id);
+      $this->assertSame($this->castSafeStrings($this->mockBlockManager->getDefinition($id)), $expected_definition);
+      $this->assertSame($this->castSafeStrings($plugin->getPluginDefinition()), $expected_definition);
     }
     // Test a plugin manager that provides defaults.
     foreach (['test_block1', 'test_block2'] as $id) {
       $plugin = $this->defaultsTestPluginManager->createInstance($id);
       $expected_definition = $this->defaultsTestPluginExpectedDefinitions[$id];
-      $this->assertIdentical($plugin->getPluginId(), $id);
-      $this->assertIdentical($this->defaultsTestPluginManager->getDefinition($id), $expected_definition);
-      $this->assertIdentical($this->castSafeStrings($plugin->getPluginDefinition()), $expected_definition);
+      $this->assertSame($plugin->getPluginId(), $id);
+      $this->assertSame($this->defaultsTestPluginManager->getDefinition($id), $expected_definition);
+      $this->assertSame($this->castSafeStrings($plugin->getPluginDefinition()), $expected_definition);
     }
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
index 906e74bb6a..8bfd7652cf 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
@@ -45,7 +45,7 @@ protected function assertElements(array $elements, $expected_html, $message) {
     $out .= '</tr></table>';
     $this->verbose($out);
 
-    $this->assertIdentical($actual_html, $expected_html, Html::escape($message));
+    $this->assertSame($actual_html, $expected_html, Html::escape($message));
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
index 61f647528d..c3ccf2a47a 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
@@ -49,7 +49,7 @@ public function testEmpty() {
     $this->assertTrue($this->themeHandler()->rebuildThemeData()['stark'], 'ThemeHandler::rebuildThemeData() yields all available themes.');
 
     // theme_get_setting() should return global default theme settings.
-    $this->assertIdentical(theme_get_setting('features.favicon'), TRUE);
+    $this->assertSame(theme_get_setting('features.favicon'), TRUE);
   }
 
   /**
@@ -63,7 +63,7 @@ public function testInstall() {
 
     $this->themeInstaller()->install([$name]);
 
-    $this->assertIdentical($this->extensionConfig()->get("theme.$name"), 0);
+    $this->assertSame($this->extensionConfig()->get("theme.$name"), 0);
 
     $themes = $this->themeHandler()->listInfo();
     $this->assertTrue(isset($themes[$name]));
@@ -72,7 +72,7 @@ public function testInstall() {
     $this->assertEqual(array_keys(system_list('theme')), array_keys($themes));
 
     // Verify that test_basetheme.settings is active.
-    $this->assertIdentical(theme_get_setting('features.favicon', $name), FALSE);
+    $this->assertSame(theme_get_setting('features.favicon', $name), FALSE);
     $this->assertEqual(theme_get_setting('base', $name), 'only');
     $this->assertEqual(theme_get_setting('override', $name), 'base');
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
index a077c25a85..97226c0741 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
@@ -46,7 +46,7 @@ public function testDefaultConfig() {
     $path = $this->availableThemes[$name]->getPath();
     $this->assertTrue(file_exists("$path/" . InstallStorage::CONFIG_INSTALL_DIRECTORY . "/$name.settings.yml"));
     $this->container->get('theme_handler')->install([$name]);
-    $this->assertIdentical(theme_get_setting('base', $name), 'only');
+    $this->assertSame(theme_get_setting('base', $name), 'only');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index c79f2cfc9f..d562e7f5d5 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -185,7 +185,7 @@ public function testGetAndSet() {
     $value = 'PT20S';
     $typed_data = $this->createTypedData(['type' => 'duration_iso8601'], $value);
     $this->assertTrue($typed_data instanceof DurationInterface, 'Typed data object is an instance of DurationInterface.');
-    $this->assertIdentical($typed_data->getValue(), $value, 'DurationIso8601 value was fetched.');
+    $this->assertSame($typed_data->getValue(), $value, 'DurationIso8601 value was fetched.');
     $this->assertEqual($typed_data->validate()->count(), 0);
     $typed_data->setValue('P40D');
     $this->assertEqual($typed_data->getDuration()->d, 40, 'DurationIso8601 value was changed and set by duration string.');
@@ -209,7 +209,7 @@ public function testGetAndSet() {
     $value = 20;
     $typed_data = $this->createTypedData(['type' => 'timespan'], $value);
     $this->assertTrue($typed_data instanceof DurationInterface, 'Typed data object is an instance of DurationInterface.');
-    $this->assertIdentical($typed_data->getValue(), $value, 'Time span value was fetched.');
+    $this->assertSame($typed_data->getValue(), $value, 'Time span value was fetched.');
     $this->assertEqual($typed_data->validate()->count(), 0);
     $typed_data->setValue(60 * 60 * 4);
     $this->assertEqual($typed_data->getDuration()->s, 14400, 'Time span was changed');
@@ -260,10 +260,10 @@ public function testGetAndSet() {
     $value = $this->randomString();
     $typed_data = $this->createTypedData(['type' => 'email'], $value);
     $this->assertTrue($typed_data instanceof StringInterface, 'Typed data object is an instance of StringInterface.');
-    $this->assertIdentical($typed_data->getValue(), $value, 'Email value was fetched.');
+    $this->assertSame($typed_data->getValue(), $value, 'Email value was fetched.');
     $new_value = 'test@example.com';
     $typed_data->setValue($new_value);
-    $this->assertIdentical($typed_data->getValue(), $new_value, 'Email value was changed.');
+    $this->assertSame($typed_data->getValue(), $new_value, 'Email value was changed.');
     $this->assertTrue(is_string($typed_data->getString()), 'Email value was converted to string');
     $this->assertEqual($typed_data->validate()->count(), 0);
     $typed_data->setValue(NULL);
@@ -296,10 +296,10 @@ public function testGetAndSet() {
     // Any type.
     $value = ['foo'];
     $typed_data = $this->createTypedData(['type' => 'any'], $value);
-    $this->assertIdentical($typed_data->getValue(), $value, 'Any value was fetched.');
+    $this->assertSame($typed_data->getValue(), $value, 'Any value was fetched.');
     $new_value = 'test@example.com';
     $typed_data->setValue($new_value);
-    $this->assertIdentical($typed_data->getValue(), $new_value, 'Any value was changed.');
+    $this->assertSame($typed_data->getValue(), $new_value, 'Any value was changed.');
     $this->assertTrue(is_string($typed_data->getString()), 'Any value was converted to string');
     $this->assertEqual($typed_data->validate()->count(), 0);
     $typed_data->setValue(NULL);
@@ -353,8 +353,8 @@ public function testTypedDataLists() {
     // Make sure that resetting the value using NULL results in an empty array.
     $clone->setValue([]);
     $typed_data->setValue(NULL);
-    $this->assertIdentical($typed_data->getValue(), []);
-    $this->assertIdentical($clone->getValue(), []);
+    $this->assertSame($typed_data->getValue(), []);
+    $this->assertSame($clone->getValue(), []);
 
     // Test dealing with NULL items.
     $typed_data[] = NULL;
@@ -475,7 +475,7 @@ public function testTypedDataMaps() {
 
     $properties = $typed_data->getProperties();
     $this->assertEqual(array_keys($properties), array_keys($value));
-    $this->assertIdentical($properties['one'], $typed_data->get('one'), 'Properties are identical.');
+    $this->assertSame($properties['one'], $typed_data->get('one'), 'Properties are identical.');
 
     // Test setting a not defined property. It shouldn't show up in the
     // properties, but be kept in the values.
@@ -549,7 +549,7 @@ public function testTypedDataValidation() {
     $message = t('This value should be %limit or more.', ['%limit' => 5]);
     $this->assertEqual($violations[0]->getMessage(), $message, 'Translated violation message retrieved.');
     $this->assertEqual($violations[0]->getPropertyPath(), '');
-    $this->assertIdentical($violations[0]->getRoot(), $integer, 'Root object returned.');
+    $this->assertSame($violations[0]->getRoot(), $integer, 'Root object returned.');
 
     // Test translating violation messages when pluralization is used.
     $definition = DataDefinition::create('string')
@@ -628,7 +628,7 @@ public function testTypedDataValidation() {
     $this->assertEqual($violations->count(), 1);
 
     $this->assertEqual($violations[0]->getInvalidValue(), 'string');
-    $this->assertIdentical($violations[0]->getPropertyPath(), '0.value');
+    $this->assertSame($violations[0]->getPropertyPath(), '0.value');
   }
 
 }
