diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
index 5a05637a1c2bfb154b1a93ff857123f5113f59ee..2872b1a87d5b6f77db5ca8a3a68b07048e86c68d 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
@@ -41,7 +41,7 @@ protected function setUp() {
    */
   protected function assertDisplay($id, $component_id) {
     $component = EntityViewDisplay::load($id)->getComponent($component_id);
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('hidden', $component['label']);
   }
 
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
index 645f70bc97d3225a1a21b6081df7cfaec775bafc..fb2492cf9072363ce44f1ace317d7cc8507f42bd 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
@@ -41,7 +41,7 @@ protected function setUp() {
    */
   protected function assertDisplay($id, $component_id) {
     $component = EntityFormDisplay::load($id)->getComponent($component_id);
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('text_textarea_with_summary', $component['type']);
   }
 
diff --git a/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php b/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php
index 3b18c67e79e07448cd0f3c45861bb23af3f905d0..d5e7d75f675086282aecfe2d54568749b2385825 100644
--- a/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php
+++ b/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php
@@ -52,7 +52,7 @@ public function testGetConfig($language_list, $expected_number) {
 
     $config = $this->plugin->getConfig($editor);
 
-    $this->assertInternalType('array', $config);
+    $this->assertIsArray($config);
     $this->assertTrue(in_array('ar:Arabic:rtl', $config['language_list']));
     $this->assertTrue(in_array('zh-hans:Chinese, Simplified', $config['language_list']));
     $this->assertTrue(in_array('en:English', $config['language_list']));
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
index 2c13371fb8a54186f244e0cbf3716f123925659a..94f1e9fe86eb4b930fcb0a9546e02b63fde733ef 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
@@ -44,7 +44,7 @@ protected function setUp() {
    */
   protected function assertDisplay($id, $component_id) {
     $component = EntityViewDisplay::load($id)->getComponent($component_id);
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $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/MigrateCommentEntityFormDisplaySubjectTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
index 74a871521acb92ed4aa2d550a493964618c9d8d1..4999a569756700d1ed2e4985e2121c0b234c08e9 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
@@ -38,7 +38,7 @@ protected function setUp() {
    */
   protected function assertSubjectVisible($id) {
     $component = EntityFormDisplay::load($id)->getComponent('subject');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('string_textfield', $component['type']);
     $this->assertSame(10, $component['weight']);
   }
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
index c9e0d6b8a6f38128b1f2d72deac955ebd3244851..15b57de30103f33ed73771aa11bf413ac724454d 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
@@ -43,7 +43,7 @@ protected function setUp() {
    */
   protected function assertDisplay($id, $component_id) {
     $component = EntityFormDisplay::load($id)->getComponent($component_id);
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('comment_default', $component['type']);
     $this->assertSame(20, $component['weight']);
   }
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 d43b14c415064edc64ee102c22f0a6cab0fb60ae..59a62c992cfae14fd00919f13133d899b68f672c 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
@@ -42,7 +42,7 @@ protected function setUp() {
    */
   protected function assertDisplay($id, $component_id) {
     $component = EntityViewDisplay::load($id)->getComponent($component_id);
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $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 9c7dbddbf8e414631318187051c45b1605e98bc2..3ab1196da2d3f3c6d4f88beb697ec4b49df5ffbd 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
@@ -35,7 +35,7 @@ protected function setUp() {
    */
   protected function assertSubjectVisible($id) {
     $component = EntityFormDisplay::load($id)->getComponent('subject');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $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 75647b167312680ee0dbd3d9c25439439203e696..1425cda2e7adaafbae0e454a87a9eec9945e07b2 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
@@ -42,7 +42,7 @@ protected function setUp() {
    */
   protected function assertDisplay($id, $component_id) {
     $component = EntityFormDisplay::load($id)->getComponent($component_id);
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('comment_default', $component['type']);
     $this->assertSame(20, $component['weight']);
   }
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 c3f207160c16d04d3933038f996868c936fbb99a..b30d3c7dd9a19f585e00b8531ae1480715dc421a 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
@@ -206,7 +206,7 @@ public function testEntityDisplaySettings() {
     // reference field.
     $display = EntityViewDisplay::load('node.employee.default');
     $component = $display->getComponent('field_company');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('entity_reference_label', $component['type']);
     // The default node reference formatter shows the referenced node's title
     // as a link.
@@ -214,14 +214,14 @@ public function testEntityDisplaySettings() {
 
     $display = EntityViewDisplay::load('node.employee.teaser');
     $component = $display->getComponent('field_company');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('entity_reference_label', $component['type']);
     // The plain node reference formatter shows the referenced node's title,
     // unlinked.
     $this->assertFalse($component['settings']['link']);
 
     $component = $display->getComponent('field_commander');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('entity_reference_label', $component['type']);
     // The default user reference formatter links to the referenced user.
     $this->assertTrue($component['settings']['link']);
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 284f69dd0d303a889ad3da3eb3f308b40cb486e0..a58fd344746cb3bafc95c7a01ca3af7c4e4da68a 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
@@ -107,22 +107,22 @@ public function testWidgetSettings() {
 
     $component = $display_repository->getFormDisplay('node', 'employee', 'default')
       ->getComponent('field_company');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('options_select', $component['type']);
 
     $component = $display_repository->getFormDisplay('node', 'employee', 'default')
       ->getComponent('field_company_2');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('options_buttons', $component['type']);
 
     $component = $display_repository->getFormDisplay('node', 'employee', 'default')
       ->getComponent('field_company_3');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('entity_reference_autocomplete_tags', $component['type']);
 
     $component = $display_repository->getFormDisplay('node', 'employee', 'default')
       ->getComponent('field_commander');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $this->assertSame('options_select', $component['type']);
   }
 
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php
index 4199f93341405d83af521c5bfcd159c27a5c6638..bda611c6a2212c9709a2b13a8c049c5c4240bf54 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php
@@ -29,7 +29,7 @@ public function testTransformImageSettings() {
       ->getMock();
 
     $value = $plugin->transform([[], ['type' => 'image_image'], ['data' => '']], $executable, $row, 'foo');
-    $this->assertInternalType('array', $value['default_image']);
+    $this->assertIsArray($value['default_image']);
     $this->assertSame('', $value['default_image']['alt']);
     $this->assertSame('', $value['default_image']['title']);
     $this->assertNull($value['default_image']['width']);
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php
index ceaefec36695018d2a784a88695dd4aca717abb2..cb12d960d0a49cd0b9627fa0ebb4864b4f73fea9 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php
@@ -36,7 +36,7 @@ public function testTransformImageSettings() {
       ]);
 
     $value = $plugin->transform([], $executable, $row, 'foo');
-    $this->assertInternalType('array', $value);
+    $this->assertIsArray($value);
     $this->assertSame('', $value['default_image']['uuid']);
   }
 
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
index 423727136629d450dcc7319becfd2add963748d1..3698781ecbd4e0234ba8a4c8600f982462be654f 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
@@ -101,7 +101,7 @@ public function testMediaOEmbedVideoSource() {
     $display = \Drupal::service('entity_display.repository')->getViewDisplay('media', $media_type_id);
     $this->assertFalse($display->isNew());
     $component = $display->getComponent('field_media_oembed_video');
-    $this->assertInternalType('array', $component);
+    $this->assertIsArray($component);
     $component['settings']['max_width'] = 240;
     $display->setComponent('field_media_oembed_video', $component);
     $this->assertSame(SAVED_UPDATED, $display->save());
diff --git a/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php b/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php
index 3b71cdc92fa90896c19e8ab9a5ca2928f072c3c8..3dc099be20d70510ba4781903a787a1fa799b905 100644
--- a/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php
+++ b/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php
@@ -43,7 +43,7 @@ public function testBadHashParameter($hash) {
       ->get('controller_resolver')
       ->getControllerFromDefinition('\Drupal\media\Controller\OEmbedIframeController::render');
 
-    $this->assertInternalType('callable', $controller);
+    $this->assertIsCallable($controller);
 
     $this->expectException('\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException');
     $this->expectExceptionMessage('This resource is not available');
diff --git a/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php b/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php
index 7ebc2bb1b1a77c1e0f65ed6c81d1d286ec91f54b..2ca50fb5a964c8fa94b543306ab75eab7389c694 100644
--- a/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php
+++ b/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php
@@ -239,7 +239,7 @@ protected function assertViewDisplay($type_id, $image_style) {
     $this->assertSame(['thumbnail'], array_keys($view_display->getComponents()));
     // Assert the thumbnail image style.
     $thumbnail = $view_display->getComponent('thumbnail');
-    $this->assertInternalType('array', $thumbnail);
+    $this->assertIsArray($thumbnail);
     $this->assertSame($image_style, $thumbnail['settings']['image_style']);
   }
 
diff --git a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
index 38d92f90b4788a299c777c70f045b54c677835ae..c9f7f790608d1afa43ce5c6674fca227e4541b96 100644
--- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
@@ -90,7 +90,7 @@ public function testSuccessfulReuse($source_path, $destination_path) {
     clearstatcache(TRUE, $destination_path);
 
     $timestamp = (new \SplFileInfo($file_reuse))->getMTime();
-    $this->assertInternalType('int', $timestamp);
+    $this->assertIsInt($timestamp);
 
     // We need to make sure the modified timestamp on the file is sooner than
     // the attempted migration.
diff --git a/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php b/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
index 24ce60ba3f09e9bf83f78b11a87447ece0e59c49..e9efa6d057dae76290999f44b59138121b3686ad 100644
--- a/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
+++ b/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
@@ -19,7 +19,7 @@ class TimezoneTest extends KernelTestBase {
   public function testSystemTimeZones() {
     // Test the default parameters for system_time_zones().
     $result = system_time_zones();
-    $this->assertInternalType('array', $result);
+    $this->assertIsArray($result);
     $this->assertArrayHasKey('Africa/Dar_es_Salaam', $result);
     $this->assertEquals('Africa/Dar es Salaam', $result['Africa/Dar_es_Salaam']);
 
@@ -27,7 +27,7 @@ public function testSystemTimeZones() {
     $result = system_time_zones(NULL, TRUE);
 
     // Check a two-level time zone.
-    $this->assertInternalType('array', $result);
+    $this->assertIsArray($result);
     $this->assertArrayHasKey('Africa', $result);
     $this->assertArrayHasKey('Africa/Dar_es_Salaam', $result['Africa']);
     $this->assertEquals('Dar es Salaam', $result['Africa']['Africa/Dar_es_Salaam']);
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php
index 5f07966475f5f295295f1b7ef3aba242a04eae5b..0826a2c1064dea3ccb819b8e89312c144016148e 100644
--- a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php
@@ -87,7 +87,7 @@ public function testUsesGroupBy() {
    */
   public function testDefineOptions() {
     $options = $this->plugin->defineOptions();
-    $this->assertInternalType('array', $options);
+    $this->assertIsArray($options);
     $this->assertArrayHasKey('destination', $options);
   }
 
diff --git a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
index 03645581245622ea4c424f2917a9779d0d8b0520..adbd125fe4fddb579319a4ff7e48339731416b9b 100644
--- a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
+++ b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
@@ -64,7 +64,7 @@ public function testPageController() {
     $route_match = RouteMatch::createFromRequest($request);
 
     $output = $this->pageController->handle($route_match->getParameter('view_id'), $route_match->getParameter('display_id'), $route_match);
-    $this->assertInternalType('array', $output);
+    $this->assertIsArray($output);
     $this->assertEquals($build, $output);
   }
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
index 0b86802c98a399084798467227d40f4821443411..a8ab676bed26cee471ea4fd71a05bf308213d492 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
@@ -66,9 +66,9 @@ public function testEntityReferenceAutocompleteWidget() {
     ]);
     // To satisfy config schema, the size setting must be an integer, not just
     // a numeric value. See https://www.drupal.org/node/2885441.
-    $this->assertInternalType('integer', $form_display->getComponent($field_name)['settings']['size']);
+    $this->assertIsInt($form_display->getComponent($field_name)['settings']['size']);
     $form_display->save();
-    $this->assertInternalType('integer', $form_display->getComponent($field_name)['settings']['size']);
+    $this->assertIsInt($form_display->getComponent($field_name)['settings']['size']);
 
     // Visit the node add page.
     $this->drupalGet('node/add/page');
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php
index 8db77528620a7dea6d121c2800b0a69e84fc48e4..f047f6471c998a7661aa03599e203abf10fb06ba 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php
@@ -51,7 +51,7 @@ public function setUp() {
    * @covers ::getContextDefinitions
    */
   public function testGetContextDefinitions() {
-    $this->assertInternalType('array', $this->plugin->getContextDefinitions());
+    $this->assertIsArray($this->plugin->getContextDefinitions());
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
index 058669b590a93fa598ea3e166e4a9da063c409f1..13ed8bb8faa4e99f5b797819a000a4068ba8f1db 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
@@ -53,7 +53,7 @@ public function testThemeRenderAndAutoescape($arg, $expected) {
     $renderer = \Drupal::service('renderer');
     $output = $renderer->executeInRenderContext($context, $theme_render_and_autoescape);
     $this->assertEquals($expected, $output);
-    $this->assertInternalType('string', $output);
+    $this->assertIsString($output);
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
index b950a39e98ad2f2114aef46c67f3bc21ad574da1..826b4f397c094b459c7e19f15952ecb44dc1e5cc 100644
--- a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
@@ -83,7 +83,7 @@ protected function setupDefaultExpectations() {
   public function testGet() {
     $this->setupDefaultExpectations();
 
-    $this->assertInternalType('string', $this->generator->get());
+    $this->assertIsString($this->generator->get());
     $this->assertNotSame($this->generator->get(), $this->generator->get($this->randomMachineName()));
     $this->assertNotSame($this->generator->get($this->randomMachineName()), $this->generator->get($this->randomMachineName()));
   }
@@ -107,7 +107,7 @@ public function testGenerateSeedOnGet() {
       ->method('setCsrfTokenSeed')
       ->with($this->isType('string'));
 
-    $this->assertInternalType('string', $this->generator->get());
+    $this->assertIsString($this->generator->get());
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php b/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php
index c812485b52d18baa9ddd5498466ad6900ef68894..4e273b2910925964008842d63d82129a68203bd2 100644
--- a/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php
@@ -23,9 +23,9 @@ class BatchBuilderTest extends UnitTestCase {
   public function testDefaultValues() {
     $batch = (new BatchBuilder())->toArray();
 
-    $this->assertInternalType('array', $batch);
+    $this->assertIsArray($batch);
     $this->assertArrayHasKey('operations', $batch);
-    $this->assertInternalType('array', $batch['operations']);
+    $this->assertIsArray($batch['operations']);
     $this->assertEmpty($batch['operations'], 'Operations array is empty.');
     $this->assertEquals(new TranslatableMarkup('Processing'), $batch['title']);
     $this->assertEquals(new TranslatableMarkup('Initializing.'), $batch['init_message']);
@@ -34,10 +34,10 @@ public function testDefaultValues() {
     $this->assertNull($batch['finished']);
     $this->assertNull($batch['file']);
     $this->assertArrayHasKey('library', $batch);
-    $this->assertInternalType('array', $batch['library']);
+    $this->assertIsArray($batch['library']);
     $this->assertEmpty($batch['library']);
     $this->assertArrayHasKey('url_options', $batch);
-    $this->assertInternalType('array', $batch['url_options']);
+    $this->assertIsArray($batch['url_options']);
     $this->assertEmpty($batch['url_options']);
     $this->assertArrayHasKey('progressive', $batch);
     $this->assertTrue($batch['progressive']);
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
index 38997e7f76aeba7207eb158f40859a3a7dd68775..c0c67884c1dcf9dc5b4f7ff57990d3990946b804 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
@@ -564,7 +564,7 @@ public function testToArray() {
       ->method('getPropertiesToExport')
       ->willReturn(['id' => 'configId', 'dependencies' => 'dependencies']);
     $properties = $this->entity->toArray();
-    $this->assertInternalType('array', $properties);
+    $this->assertIsArray($properties);
     $this->assertEquals(['configId' => $this->entity->id(), 'dependencies' => []], $properties);
   }
 
@@ -590,7 +590,7 @@ public function testToArrayIdKey() {
       ->with('id')
       ->willReturn('id');
     $properties = $entity->toArray();
-    $this->assertInternalType('array', $properties);
+    $this->assertIsArray($properties);
     $this->assertEquals(['configId' => $entity->id(), 'dependencies' => []], $properties);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php
index 10d9e97d80adc52c9b207e84800f9d3ca2dda18f..6f23e80921b917a9e13291cbe0b3cb6883e9b844 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php
@@ -139,15 +139,15 @@ public function testGetOperations() {
     $list->setRedirectDestination($this->redirectDestination);
 
     $operations = $list->getOperations($this->role);
-    $this->assertInternalType('array', $operations);
+    $this->assertIsArray($operations);
     $this->assertArrayHasKey('edit', $operations);
-    $this->assertInternalType('array', $operations['edit']);
+    $this->assertIsArray($operations['edit']);
     $this->assertArrayHasKey('title', $operations['edit']);
     $this->assertArrayHasKey('delete', $operations);
-    $this->assertInternalType('array', $operations['delete']);
+    $this->assertIsArray($operations['delete']);
     $this->assertArrayHasKey('title', $operations['delete']);
     $this->assertArrayHasKey($operation_name, $operations);
-    $this->assertInternalType('array', $operations[$operation_name]);
+    $this->assertIsArray($operations[$operation_name]);
     $this->assertArrayHasKey('title', $operations[$operation_name]);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
index deed1e0bc9be7c0d9990212fadbe55e4686db578..b5113687b813531c6980fda6071a335f7f8f1c10 100644
--- a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
@@ -220,7 +220,7 @@ protected function setUp() {
    * @covers ::getConstraints
    */
   public function testGetConstraints() {
-    $this->assertInternalType('array', $this->entityAdapter->getConstraints());
+    $this->assertIsArray($this->entityAdapter->getConstraints());
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
index 5b6400ab71893c0ac23865557c1cfb0f60efb68c..f8914856c289193468e1a69355c020c290e0829b 100644
--- a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
+++ b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
@@ -53,7 +53,7 @@ public function testWaitTrue() {
    */
   public function testGetLockId() {
     $lock_id = $this->lock->getLockId();
-    $this->assertInternalType('string', $lock_id);
+    $this->assertIsString($lock_id);
     // Example lock ID would be '7213141505232b6ee2cb967.27683891'.
     $this->assertRegExp('/[\da-f]+\.\d+/', $lock_id);
     // Test the same lock ID is returned a second time.
diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php
index 10955fc82e084a11afdc952812570f8b954f3b51..a94a82d097bdd488055f12bdefd93eb763c6c92f 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php
@@ -333,7 +333,7 @@ public function testGetDefinitionsWithoutRequiredInterface() {
     $this->expectedDefinitions['banana']['provider'] = 'plugin_test';
 
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler, NULL);
-    $this->assertInternalType('array', $plugin_manager->getDefinitions());
+    $this->assertIsArray($plugin_manager->getDefinitions());
   }
 
   /**
@@ -343,9 +343,9 @@ public function testGetCacheContexts() {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler->reveal(), NULL);
     $cache_contexts = $plugin_manager->getCacheContexts();
-    $this->assertInternalType('array', $cache_contexts);
+    $this->assertIsArray($cache_contexts);
     array_map(function ($cache_context) {
-      $this->assertInternalType('string', $cache_context);
+      $this->assertIsString($cache_context);
     }, $cache_contexts);
   }
 
@@ -356,9 +356,9 @@ public function testGetCacheTags() {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler->reveal(), NULL);
     $cache_tags = $plugin_manager->getCacheTags();
-    $this->assertInternalType('array', $cache_tags);
+    $this->assertIsArray($cache_tags);
     array_map(function ($cache_tag) {
-      $this->assertInternalType('string', $cache_tag);
+      $this->assertIsString($cache_tag);
     }, $cache_tags);
   }
 
@@ -369,7 +369,7 @@ public function testGetCacheMaxAge() {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler->reveal(), NULL);
     $cache_max_age = $plugin_manager->getCacheMaxAge();
-    $this->assertInternalType('int', $cache_max_age);
+    $this->assertIsInt($cache_max_age);
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php
index 01f837c0ff13a2142f5a51f52e589c1b3d5cf788..3aec91645105488753568756ebf18a3f475ea298 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php
@@ -51,7 +51,7 @@ public function testGetDefinitions() {
 
     $definitions = $discovery->getDefinitions();
 
-    $this->assertInternalType('array', $definitions);
+    $this->assertIsArray($definitions);
     $this->assertCount(4, $definitions);
 
     foreach ($definitions as $id => $definition) {
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php
index 0880169af337a40c3f67e28deb6f114356626634..41a26997527ac8144b261e336302ac739db7ef03 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php
@@ -70,7 +70,7 @@ protected function setUp() {
   public function testGetDefinitions() {
     $definitions = $this->discoveryDecorator->getDefinitions();
 
-    $this->assertInternalType('array', $definitions);
+    $this->assertIsArray($definitions);
     $this->assertCount(6, $definitions);
 
     foreach ($this->expectedKeys as $expected_key) {
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
index 04e686ae8ba8a801f9f61ab715a50ba6fff311ae..c5289440c33e983152b1ec25c57a556e0dfde840 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
@@ -51,7 +51,7 @@ protected function setUp() {
   public function testGetDefinitions() {
     $definitions = $this->discovery->getDefinitions();
 
-    $this->assertInternalType('array', $definitions);
+    $this->assertIsArray($definitions);
     $this->assertCount(4, $definitions);
 
     foreach ($this->expectedKeys as $expected_key) {
diff --git a/core/tests/Drupal/Tests/Core/PrivateKeyTest.php b/core/tests/Drupal/Tests/Core/PrivateKeyTest.php
index 3331d44076eea7d9139dc7b01e846a9ec0e6ae54..ef95a1624c6a46385f1beec6cccbd96e53e8f62a 100644
--- a/core/tests/Drupal/Tests/Core/PrivateKeyTest.php
+++ b/core/tests/Drupal/Tests/Core/PrivateKeyTest.php
@@ -62,7 +62,7 @@ public function testGet() {
    * Tests PrivateKey::get() with no private key from state.
    */
   public function testGetNoState() {
-    $this->assertInternalType('string', $this->privateKey->get());
+    $this->assertIsString($this->privateKey->get());
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php
index 1e81b0bfff9e3a95083e45e4a1a4e4357855a896..6a0c9618636f9ea4e4284bb149e48dbd1b82c4b0 100644
--- a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php
+++ b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php
@@ -236,7 +236,7 @@ public function testGetUri($uri) {
    */
   public function testGetOptions($uri) {
     $url = Url::fromUri($uri);
-    $this->assertInternalType('array', $url->getOptions());
+    $this->assertIsArray($url->getOptions());
   }
 
 }
diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
index ed2262e0c6b1eda2ecb0a03b4a4bab0247cad080..00e674ee56bbf26f77e3ecaa14edc43c1bf12a1c 100644
--- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@@ -271,7 +271,7 @@ public function testReplaceEscaping($string, array $tokens, $expected) {
       });
 
     $result = $this->token->replace($string, ['tokens' => $tokens]);
-    $this->assertInternalType('string', $result);
+    $this->assertIsString($result);
     $this->assertEquals($expected, $result);
   }
 
diff --git a/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php b/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
index 6dd7c461a5b82bc8d4afe384a7c1dde36bcc91e0..c6ca4e8ade1e401fc5e9c9a9002dd5241778c769 100644
--- a/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
+++ b/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
@@ -26,7 +26,6 @@ trait PHPUnit8Warnings {
     'Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.',
     'Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead.',
     'assertArraySubset() is deprecated and will be removed in PHPUnit 9.',
-    'assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.',
     'readAttribute() is deprecated and will be removed in PHPUnit 9.',
     'getObjectAttribute() is deprecated and will be removed in PHPUnit 9.',
     'assertAttributeEquals() is deprecated and will be removed in PHPUnit 9.',