diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
index 9d6607111f..d0775303f9 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
@@ -87,11 +87,11 @@ public function testLoading() {
     $this->assertTrue(count($format_selector) === 0, 'No text format selector exists on the page.');
     $hidden_input = $this->xpath('//input[@type="hidden" and contains(@class, "editor")]');
     $this->assertTrue(count($hidden_input) === 0, 'A single text format hidden input does not exist on the page.');
-    $this->assertNoRaw(drupal_get_path('module', 'ckeditor') . '/js/ckeditor.js', 'CKEditor glue JS is absent.');
+    $this->assertSession()->responseNotContains(drupal_get_path('module', 'ckeditor') . '/js/ckeditor.js');
 
     // On pages where there would never be a text editor, CKEditor JS is absent.
     $this->drupalGet('user');
-    $this->assertNoRaw(drupal_get_path('module', 'ckeditor') . '/js/ckeditor.js', 'CKEditor glue JS is absent.');
+    $this->assertSession()->responseNotContains(drupal_get_path('module', 'ckeditor') . '/js/ckeditor.js');
 
     // The normal user:
     // - has access to 2 text formats;
@@ -109,7 +109,7 @@ public function testLoading() {
       'isXssSafe' => FALSE,
     ]]];
     $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.');
@@ -140,7 +140,7 @@ public function testLoading() {
           'isXssSafe' => FALSE,
     ]]];
     $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.');
 
@@ -148,11 +148,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.");
   }
 
   /**
@@ -205,7 +205,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']);
@@ -213,7 +213,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']);
@@ -221,7 +221,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() {
