diff --git a/core/modules/action/tests/src/Functional/ActionUninstallTest.php b/core/modules/action/tests/src/Functional/ActionUninstallTest.php
index 6b52643..596f95f 100644
--- a/core/modules/action/tests/src/Functional/ActionUninstallTest.php
+++ b/core/modules/action/tests/src/Functional/ActionUninstallTest.php
@@ -27,7 +27,7 @@ public function testActionUninstall() {
 
     $storage = $this->container->get('entity_type.manager')->getStorage('action');
     $storage->resetCache(['user_block_user_action']);
-    $this->assertTrue($storage->load('user_block_user_action'), 'Configuration entity \'user_block_user_action\' still exists after uninstalling action module.' );
+    $this->assertNotEmpty($storage->load('user_block_user_action'), 'Configuration entity \'user_block_user_action\' still exists after uninstalling action module.' );
 
     $admin_user = $this->drupalCreateUser(['administer users']);
     $this->drupalLogin($admin_user);
diff --git a/core/modules/action/tests/src/Functional/BulkFormTest.php b/core/modules/action/tests/src/Functional/BulkFormTest.php
index 439ffe4..d77a72f 100644
--- a/core/modules/action/tests/src/Functional/BulkFormTest.php
+++ b/core/modules/action/tests/src/Functional/BulkFormTest.php
@@ -47,7 +47,7 @@ public function testBulkForm() {
 
     // Test that the views edit header appears first.
     $first_form_element = $this->xpath('//form/div[1][@id = :id]', [':id' => 'edit-header']);
-    $this->assertTrue($first_form_element, 'The views form edit header appears first.');
+    $this->assertNotEmpty($first_form_element, 'The views form edit header appears first.');
 
     $this->assertFieldById('edit-action', NULL, 'The action select field appears.');
 
@@ -146,7 +146,7 @@ public function testBulkForm() {
     // Make sure we don't show an action message while we are still on the
     // confirmation page.
     $errors = $this->xpath('//div[contains(@class, "messages--status")]');
-    $this->assertFalse($errors, 'No action message shown.');
+    $this->assertEmpty($errors, 'No action message shown.');
     $this->drupalPostForm(NULL, [], t('Delete'));
     $this->assertText(t('Deleted 5 posts.'));
     // Check if we got redirected to the original page.
diff --git a/core/modules/action/tests/src/Functional/ConfigurationTest.php b/core/modules/action/tests/src/Functional/ConfigurationTest.php
index 472ba17..c9ff0c0 100644
--- a/core/modules/action/tests/src/Functional/ConfigurationTest.php
+++ b/core/modules/action/tests/src/Functional/ConfigurationTest.php
@@ -83,7 +83,7 @@ public function testActionConfiguration() {
     $this->assertNoText($new_action_label, "Make sure the action label does not appear on the overview page after we've deleted the action.");
 
     $action = Action::load($aid);
-    $this->assertFalse($action, 'Make sure the action is gone after being deleted.');
+    $this->assertEmpty($action, 'Make sure the action is gone after being deleted.');
   }
 
 }
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 fd20823..57196a5 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
@@ -47,7 +47,7 @@ public function testAggregatorFeedImport() {
     $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->assertNotEmpty(preg_match('/^"[a-z0-9]{32}"$/', $feed->getEtag()));
     $this->assertIdentical('0', $feed->getLastModified());
   }
 
diff --git a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
index 778f3db..f7447fa 100644
--- a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
+++ b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
@@ -34,7 +34,7 @@ public function testIPAddressValidation() {
     $edit['ip'] = '1.2.3.3';
     $this->drupalPostForm('admin/config/people/ban', $edit, t('Add'));
     $ip = db_query("SELECT iid from {ban_ip} WHERE ip = :ip", [':ip' => $edit['ip']])->fetchField();
-    $this->assertTrue($ip, 'IP address found in database.');
+    $this->assertNotEmpty($ip, 'IP address found in database.');
     $this->assertRaw(t('The IP address %ip has been banned.', ['%ip' => $edit['ip']]), 'IP address was banned.');
 
     // Try to block an IP address that's already blocked.
@@ -65,7 +65,7 @@ public function testIPAddressValidation() {
     $submit_ip = '1.2.3.4';
     $this->drupalPostForm('admin/config/people/ban/' . $submit_ip, [], t('Add'));
     $ip = db_query("SELECT iid from {ban_ip} WHERE ip = :ip", [':ip' => $submit_ip])->fetchField();
-    $this->assertTrue($ip, 'IP address found in database');
+    $this->assertNotEmpty($ip, 'IP address found in database');
     $this->assertRaw(t('The IP address %ip has been banned.', ['%ip' => $submit_ip]), 'IP address was banned.');
 
     // Submit your own IP address. This fails, although it works when testing
diff --git a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
index 2a7c771..86e2743 100644
--- a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
@@ -117,7 +117,7 @@ protected function loadTests() {
     $this->assertSame('content', $entity->getRegion());
     $this->assertTrue($entity->status());
     $this->assertEqual($entity->getTheme(), 'stark');
-    $this->assertTrue($entity->uuid());
+    $this->assertNotEmpty($entity->uuid());
   }
 
   /**
diff --git a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
index 71c4f55..2f26e20 100644
--- a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
@@ -155,7 +155,7 @@ protected function verifyRenderCacheHandling() {
     $build = $this->getBlockRenderArray();
     $cid = 'entity_view:block:test_block:' . implode(':', \Drupal::service('cache_contexts_manager')->convertTokensToKeys(['languages:' . LanguageInterface::TYPE_INTERFACE, 'theme', 'user.permissions'])->getKeys());
     $this->renderer->renderRoot($build);
-    $this->assertTrue($this->container->get('cache.render')->get($cid), 'The block render element has been cached.');
+    $this->assertNotEmpty($this->container->get('cache.render')->get($cid), 'The block render element has been cached.');
 
     // Re-save the block and check that the cache entry has been deleted.
     $this->block->save();
@@ -169,7 +169,7 @@ protected function verifyRenderCacheHandling() {
     $build['#block'] = $this->block;
 
     $this->renderer->renderRoot($build);
-    $this->assertTrue($this->container->get('cache.render')->get($cid), 'The block render element has been cached.');
+    $this->assertNotEmpty($this->container->get('cache.render')->get($cid), 'The block render element has been cached.');
     $this->block->delete();
     $this->assertFalse($this->container->get('cache.render')->get($cid), 'The block render cache entry has been cleared when the block was deleted.');
 
@@ -306,7 +306,7 @@ protected function assertBlockRenderedWithExpectedCacheability(array $expected_k
     $final_cache_contexts = Cache::mergeContexts($expected_contexts, $required_cache_contexts);
     $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->assertNotEmpty($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']);
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 90b256f..94e1a20 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentVariableInstanceTest.php
@@ -42,9 +42,9 @@ public function testCommentFieldInstance() {
     $settings = $node->comment->getFieldDefinition()->getSettings();
     $this->assertIdentical(CommentManagerInterface::COMMENT_MODE_THREADED, $settings['default_mode']);
     $this->assertIdentical(50, $settings['per_page']);
-    $this->assertFalse($settings['anonymous']);
+    $this->assertEmpty($settings['anonymous']);
     $this->assertFalse($settings['form_location']);
-    $this->assertTrue($settings['preview']);
+    $this->assertNotEmpty($settings['preview']);
 
     $node = Node::create(['type' => 'story']);
     $this->assertIdentical(2, $node->comment_no_subject->status);
@@ -52,9 +52,9 @@ public function testCommentFieldInstance() {
     $settings = $node->comment_no_subject->getFieldDefinition()->getSettings();
     $this->assertIdentical(CommentManagerInterface::COMMENT_MODE_FLAT, $settings['default_mode']);
     $this->assertIdentical(70, $settings['per_page']);
-    $this->assertTrue($settings['anonymous']);
+    $this->assertNotEmpty($settings['anonymous']);
     $this->assertFalse($settings['form_location']);
-    $this->assertFalse($settings['preview']);
+    $this->assertEmpty($settings['preview']);
   }
 
 }
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 cc82c82..cc63781 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
@@ -60,7 +60,7 @@ protected function assertEntity($id, $field_name, $bundle, $default_mode, $per_p
     $this->assertTrue($entity->isRequired());
     $this->assertIdentical($field_name, $entity->getFieldStorageDefinition()->getName());
     $this->assertIdentical($bundle, $entity->getTargetBundle());
-    $this->assertTrue($entity->get('default_value')[0]['status']);
+    $this->assertEquals(1, $entity->get('default_value')[0]['status']);
     $this->assertEqual($default_mode, $entity->getSetting('default_mode'));
     $this->assertIdentical($per_page, $entity->getSetting('per_page'));
     $this->assertEqual($anonymous, $entity->getSetting('anonymous'));
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 42c2a30..244fd72 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
@@ -56,7 +56,7 @@ public function testCommentMigration() {
     $this->assertIdentical('A comment', $comment->getSubject());
     $this->assertIdentical('1421727536', $comment->getCreatedTime());
     $this->assertIdentical('1421727536', $comment->getChangedTime());
-    $this->assertTrue($comment->getStatus());
+    $this->assertEquals(1, $comment->getStatus());
     $this->assertIdentical('admin', $comment->getAuthorName());
     $this->assertIdentical('admin@local.host', $comment->getAuthorEmail());
     $this->assertIdentical('This is a comment', $comment->comment_body->value);
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
index ffb91b0..e4e7a0a 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
@@ -72,7 +72,7 @@ public function testLinkApprove() {
 
     // Check if I can see the comment approve link on an approved comment.
     $approve_comment = $view->style_plugin->getField(1, 'approve_comment');
-    $this->assertFalse((string) $approve_comment, "Didn't find a comment approve link for an already approved comment.");
+    $this->assertEmpty((string) $approve_comment, "Didn't find a comment approve link for an already approved comment.");
 
     // Check if I can see the comment approve link on an approved comment as an
     // anonymous user.
@@ -84,7 +84,7 @@ public function testLinkApprove() {
     $view = Views::getView('test_comment');
     $view->preview();
     $replyto_comment = $view->style_plugin->getField(0, 'approve_comment');
-    $this->assertFalse((string) $replyto_comment, "I can't approve the comment as an anonymous user.");
+    $this->assertEmpty((string) $replyto_comment, "I can't approve the comment as an anonymous user.");
   }
 
   /**
@@ -147,7 +147,7 @@ public function testLinkReply() {
 
     // Check if I can see the reply link on an unapproved comment.
     $replyto_comment = $view->style_plugin->getField(0, 'replyto_comment');
-    $this->assertFalse((string) $replyto_comment, "I can't reply to an unapproved comment.");
+    $this->assertEmpty((string) $replyto_comment, "I can't reply to an unapproved comment.");
 
     // Approve the comment.
     $comment->setPublished(CommentInterface::PUBLISHED);
@@ -170,7 +170,7 @@ public function testLinkReply() {
     $view = Views::getView('test_comment');
     $view->preview();
     $replyto_comment = $view->style_plugin->getField(0, 'replyto_comment');
-    $this->assertFalse((string) $replyto_comment, "Didn't find the comment reply link as an anonymous user.");
+    $this->assertEmpty((string) $replyto_comment, "Didn't find the comment reply link as an anonymous user.");
   }
 
 }
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
index 60e9edf..4fc7736 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
@@ -73,7 +73,7 @@ public function testForwardRevisions() {
     /** @var Node $page */
     $page = Node::load($id);
     $this->assertEquals('A', $page->getTitle());
-    $this->assertTrue($page->isDefaultRevision());
+    $this->assertNotEmpty($page->isDefaultRevision());
     $this->assertFalse($page->isPublished());
 
     // Moderate the entity to published.
@@ -84,7 +84,7 @@ public function testForwardRevisions() {
     // Verify the entity is now published and public.
     $page = Node::load($id);
     $this->assertEquals('B', $page->getTitle());
-    $this->assertTrue($page->isDefaultRevision());
+    $this->assertNotEmpty($page->isDefaultRevision());
     $this->assertTrue($page->isPublished());
 
     // Make a new forward-revision in Draft.
@@ -114,7 +114,7 @@ public function testForwardRevisions() {
     // Verify normal loads return the still-default previous version.
     $page = Node::load($id);
     $this->assertEquals('D', $page->getTitle());
-    $this->assertTrue($page->isDefaultRevision());
+    $this->assertNotEmpty($page->isDefaultRevision());
     $this->assertTrue($page->isPublished());
 
     // Now check that we can immediately add a new published revision over it.
@@ -124,7 +124,7 @@ public function testForwardRevisions() {
 
     $page = Node::load($id);
     $this->assertEquals('E', $page->getTitle());
-    $this->assertTrue($page->isDefaultRevision());
+    $this->assertNotEmpty($page->isDefaultRevision());
     $this->assertTrue($page->isPublished());
   }
 
@@ -146,7 +146,7 @@ public function testPublishedCreation() {
     /** @var Node $page */
     $page = Node::load($id);
     $this->assertEquals('A', $page->getTitle());
-    $this->assertTrue($page->isDefaultRevision());
+    $this->assertNotEmpty($page->isDefaultRevision());
     $this->assertTrue($page->isPublished());
   }
 
@@ -177,7 +177,7 @@ public function testArchive() {
     $storage = \Drupal::entityTypeManager()->getStorage('node');
     $new_revision = $storage->loadRevision($new_revision_id);
     $this->assertFalse($new_revision->isPublished());
-    $this->assertTrue($new_revision->isDefaultRevision());
+    $this->assertNotEmpty($new_revision->isDefaultRevision());
   }
 
 }
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php
index 6f209d1..e6d3321 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php
@@ -95,7 +95,7 @@ public function testConvertWithRevisionableEntityType() {
 
     $this->assertInstanceOf(Node::class, $result['node']);
     $this->assertEquals($revision_ids[2], $result['node']->getRevisionId());
-    $this->assertFalse($result['node']->isDefaultRevision());
+    $this->assertEmpty($result['node']->isDefaultRevision());
   }
 
 }
diff --git a/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php b/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php
index 3a97b35..f3a82ee 100644
--- a/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php
@@ -65,8 +65,8 @@ public function testEditorImageDialogAccess() {
     $editor->save();
     $this->resetAll();
     $this->drupalGet($url);
-    $this->assertTrue($this->cssSelect('input[type=text][name="attributes[src]"]'), 'Image uploads disabled: input[type=text][name="attributes[src]"] is present.');
-    $this->assertFalse($this->cssSelect('input[type=file]'), 'Image uploads disabled: input[type=file] is absent.');
+    $this->assertNotEmpty($this->cssSelect('input[type=text][name="attributes[src]"]'), 'Image uploads disabled: input[type=text][name="attributes[src]"] is present.');
+    $this->assertEmpty($this->cssSelect('input[type=file]'), 'Image uploads disabled: input[type=file] is absent.');
     $session->statusCodeEquals(200);
 
     // With image upload settings, expect a 200, and now there should be an
@@ -75,8 +75,8 @@ public function testEditorImageDialogAccess() {
       ->save();
     $this->resetAll();
     $this->drupalGet($url);
-    $this->assertFalse($this->cssSelect('input[type=text][name="attributes[src]"]'), 'Image uploads enabled: input[type=text][name="attributes[src]"] is absent.');
-    $this->assertTrue($this->cssSelect('input[type=file]'), 'Image uploads enabled: input[type=file] is present.');
+    $this->assertEmpty($this->cssSelect('input[type=text][name="attributes[src]"]'), 'Image uploads enabled: input[type=text][name="attributes[src]"] is absent.');
+    $this->assertNotEmpty($this->cssSelect('input[type=file]'), 'Image uploads enabled: input[type=file] is present.');
     $session->statusCodeEquals(200);
   }
 
diff --git a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
index 900c154..a097d36 100644
--- a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
@@ -198,7 +198,7 @@ public function testDeleteField() {
       ->condition('type', $bundle)
       ->condition("$field_name.deleted", 0)
       ->execute();
-    $this->assertFalse($found, 'No entities found after deleting');
+    $this->assertEmpty($found, 'No entities found after deleting');
 
     // There are 10 entities of this bundle when deleted fields are allowed, and
     // their values are correct.
@@ -208,7 +208,7 @@ public function testDeleteField() {
       ->sort('id')
       ->execute();
     $this->assertEqual(count($found), 10, 'Correct number of entities found after deleting');
-    $this->assertFalse(array_diff($found, array_keys($this->entities)));
+    $this->assertEmpty(array_diff($found, array_keys($this->entities)));
   }
 
   /**
diff --git a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
index 03ed8cd..e96c1bb 100644
--- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
@@ -277,9 +277,9 @@ public function testFieldAttachDelete() {
     $controller->resetCache();
     foreach ([0, 1, 2] as $vid) {
       $revision = $controller->loadRevision($vid);
-      $this->assertFalse($revision);
+      $this->assertNull($revision);
     }
-    $this->assertFalse($controller->load($entity->id()));
+    $this->assertNull($controller->load($entity->id()));
   }
 
   /**
@@ -369,8 +369,8 @@ public function testEntityDeleteBundle() {
     $this->assertTrue(empty($entity->{$field_name}), 'No data for second field');
 
     // Verify that the fields are gone.
-    $this->assertFalse(FieldConfig::load('entity_test.' . $this->fieldTestData->field->getTargetBundle() . '.' . $this->fieldTestData->field_name), "First field is deleted");
-    $this->assertFalse(FieldConfig::load('entity_test.' . $field['bundle'] . '.' . $field_name), "Second field is deleted");
+    $this->assertNull(FieldConfig::load('entity_test.' . $this->fieldTestData->field->getTargetBundle() . '.' . $this->fieldTestData->field_name), "First field is deleted");
+    $this->assertNull(FieldConfig::load('entity_test.' . $field['bundle'] . '.' . $field_name), "Second field is deleted");
   }
 
 }
diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
index 87441dc..c1a181e 100644
--- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
@@ -72,7 +72,7 @@ public function testCreateField() {
     $field->save();
 
     $field = FieldConfig::load($field->id());
-    $this->assertTrue($field->getSetting('field_setting_from_config_data'));
+    $this->assertEquals('TRUE', $field->getSetting('field_setting_from_config_data'));
     $this->assertNull($field->getSetting('config_data_from_field_setting'));
 
     // Read the configuration. Check against raw configuration data rather than
@@ -253,8 +253,8 @@ public function testDeleteFieldCrossDeletion() {
     FieldConfig::create($this->fieldDefinition)->save();
     FieldConfig::create($field_definition_2)->save();
     $field_storage->delete();
-    $this->assertFalse(FieldConfig::loadByName('entity_test', $this->fieldDefinition['bundle'], $field_storage->getName()));
-    $this->assertFalse(FieldConfig::loadByName('entity_test', $field_definition_2['bundle'], $field_storage->getName()));
+    $this->assertNull(FieldConfig::loadByName('entity_test', $this->fieldDefinition['bundle'], $field_storage->getName()));
+    $this->assertNull(FieldConfig::loadByName('entity_test', $field_definition_2['bundle'], $field_storage->getName()));
 
     // Check that deletion of the last field deletes the storage.
     $field_storage = FieldStorageConfig::create($this->fieldStorageDefinition);
@@ -264,9 +264,9 @@ public function testDeleteFieldCrossDeletion() {
     $field_2 = FieldConfig::create($field_definition_2);
     $field_2->save();
     $field->delete();
-    $this->assertTrue(FieldStorageConfig::loadByName('entity_test', $field_storage->getName()));
+    $this->assertNotEmpty(FieldStorageConfig::loadByName('entity_test', $field_storage->getName()));
     $field_2->delete();
-    $this->assertFalse(FieldStorageConfig::loadByName('entity_test', $field_storage->getName()));
+    $this->assertNull(FieldStorageConfig::loadByName('entity_test', $field_storage->getName()));
 
     // Check that deletion of all fields using a storage simultaneously deletes
     // the storage.
@@ -277,7 +277,7 @@ public function testDeleteFieldCrossDeletion() {
     $field_2 = FieldConfig::create($field_definition_2);
     $field_2->save();
     $this->container->get('entity.manager')->getStorage('field_config')->delete([$field, $field_2]);
-    $this->assertFalse(FieldStorageConfig::loadByName('entity_test', $field_storage->getName()));
+    $this->assertNull(FieldStorageConfig::loadByName('entity_test', $field_storage->getName()));
   }
 
   /**
diff --git a/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php b/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php
index 5e15582..61b2fb5 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php
@@ -26,11 +26,11 @@ public function testImportCreateDefault() {
     $field_id_2b = "entity_test.test_bundle.$field_name_2";
 
     // Check that the field storages and fields do not exist yet.
-    $this->assertFalse(FieldStorageConfig::load($field_storage_id));
-    $this->assertFalse(FieldConfig::load($field_id));
-    $this->assertFalse(FieldStorageConfig::load($field_storage_id_2));
-    $this->assertFalse(FieldConfig::load($field_id_2a));
-    $this->assertFalse(FieldConfig::load($field_id_2b));
+    $this->assertNull(FieldStorageConfig::load($field_storage_id));
+    $this->assertNull(FieldConfig::load($field_id));
+    $this->assertNull(FieldStorageConfig::load($field_storage_id_2));
+    $this->assertNull(FieldConfig::load($field_id_2a));
+    $this->assertNull(FieldConfig::load($field_id_2b));
 
     // Create a second bundle for the 'Entity test' entity type.
     entity_test_create_bundle('test_bundle');
@@ -41,15 +41,17 @@ public function testImportCreateDefault() {
 
     // A field storage with one single field.
     $field_storage = FieldStorageConfig::load($field_storage_id);
-    $this->assertTrue($field_storage, 'The field was created.');
+    $this->assertNotEmpty($field_storage, 'The field was created.');
     $field = FieldConfig::load($field_id);
-    $this->assertTrue($field, 'The field was deleted.');
+    $this->assertNotEmpty($field, 'The field was deleted.');
 
     // A field storage with two fields.
     $field_storage_2 = FieldStorageConfig::load($field_storage_id_2);
-    $this->assertTrue($field_storage_2, 'The second field was created.');
-    $this->assertTrue($field->getTargetBundle(), 'test_bundle', 'The second field was created on bundle test_bundle.');
-    $this->assertTrue($field->getTargetBundle(), 'test_bundle_2', 'The second field was created on bundle test_bundle_2.');
+    $this->assertNotEmpty($field_storage_2, 'The second field was created.');
+    $field2a = FieldConfig::load($field_id_2a);
+    $this->assertEquals('entity_test', $field2a->getTargetBundle(), 'The second field was created on bundle entity_test.');
+    $field2b = FieldConfig::load($field_id_2b);
+    $this->assertEquals('test_bundle', $field2b->getTargetBundle(), 'The second field was created on bundle test_bundle.');
 
     // Tests fields.
     $ids = \Drupal::entityQuery('field_config')
@@ -94,26 +96,26 @@ public function testImportCreate() {
     // Add the new files to the sync directory.
     $src_dir = __DIR__ . '/../../modules/field_test_config/sync';
     $target_dir = config_get_config_directory(CONFIG_SYNC_DIRECTORY);
-    $this->assertTrue(file_unmanaged_copy("$src_dir/$field_storage_config_name.yml", "$target_dir/$field_storage_config_name.yml"));
-    $this->assertTrue(file_unmanaged_copy("$src_dir/$field_config_name.yml", "$target_dir/$field_config_name.yml"));
-    $this->assertTrue(file_unmanaged_copy("$src_dir/$field_storage_config_name_2.yml", "$target_dir/$field_storage_config_name_2.yml"));
-    $this->assertTrue(file_unmanaged_copy("$src_dir/$field_config_name_2a.yml", "$target_dir/$field_config_name_2a.yml"));
-    $this->assertTrue(file_unmanaged_copy("$src_dir/$field_config_name_2b.yml", "$target_dir/$field_config_name_2b.yml"));
+    $this->assertNotEmpty(file_unmanaged_copy("$src_dir/$field_storage_config_name.yml", "$target_dir/$field_storage_config_name.yml"));
+    $this->assertNotEmpty(file_unmanaged_copy("$src_dir/$field_config_name.yml", "$target_dir/$field_config_name.yml"));
+    $this->assertNotEmpty(file_unmanaged_copy("$src_dir/$field_storage_config_name_2.yml", "$target_dir/$field_storage_config_name_2.yml"));
+    $this->assertNotEmpty(file_unmanaged_copy("$src_dir/$field_config_name_2a.yml", "$target_dir/$field_config_name_2a.yml"));
+    $this->assertNotEmpty(file_unmanaged_copy("$src_dir/$field_config_name_2b.yml", "$target_dir/$field_config_name_2b.yml"));
 
     // Import the content of the sync directory.
     $this->configImporter()->import();
 
     // Check that the field and storage were created.
     $field_storage = FieldStorageConfig::load($field_storage_id);
-    $this->assertTrue($field_storage, 'Test import storage field from sync exists');
+    $this->assertNotEmpty($field_storage, 'Test import storage field from sync exists');
     $field = FieldConfig::load($field_id);
-    $this->assertTrue($field, 'Test import field  from sync exists');
+    $this->assertNotEmpty($field, 'Test import field  from sync exists');
     $field_storage = FieldStorageConfig::load($field_storage_id_2);
-    $this->assertTrue($field_storage, 'Test import storage field 2 from sync exists');
+    $this->assertNotEmpty($field_storage, 'Test import storage field 2 from sync exists');
     $field = FieldConfig::load($field_id_2a);
-    $this->assertTrue($field, 'Test import field 2a from sync exists');
+    $this->assertNotEmpty($field, 'Test import field 2a from sync exists');
     $field = FieldConfig::load($field_id_2b);
-    $this->assertTrue($field, 'Test import field 2b from sync exists');
+    $this->assertNotEmpty($field, 'Test import field 2b from sync exists');
   }
 
 }
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
index 0eef137..dd335e0 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
@@ -75,19 +75,19 @@ public function testImportDelete() {
     // Check that the field storages and fields are gone.
     \Drupal::entityManager()->getStorage('field_storage_config')->resetCache([$field_storage_id]);
     $field_storage = FieldStorageConfig::load($field_storage_id);
-    $this->assertFalse($field_storage, 'The field storage was deleted.');
+    $this->assertNull($field_storage, 'The field storage was deleted.');
     \Drupal::entityManager()->getStorage('field_storage_config')->resetCache([$field_storage_id_2]);
     $field_storage_2 = FieldStorageConfig::load($field_storage_id_2);
-    $this->assertFalse($field_storage_2, 'The second field storage was deleted.');
+    $this->assertNull($field_storage_2, 'The second field storage was deleted.');
     \Drupal::entityManager()->getStorage('field_config')->resetCache([$field_id]);
     $field = FieldConfig::load($field_id);
-    $this->assertFalse($field, 'The field was deleted.');
+    $this->assertNull($field, 'The field was deleted.');
     \Drupal::entityManager()->getStorage('field_config')->resetCache([$field_id_2a]);
     $field_2a = FieldConfig::load($field_id_2a);
-    $this->assertFalse($field_2a, 'The second field on test bundle was deleted.');
+    $this->assertNull($field_2a, 'The second field on test bundle was deleted.');
     \Drupal::entityManager()->getStorage('field_config')->resetCache([$field_id_2b]);
     $field_2b = FieldConfig::load($field_id_2b);
-    $this->assertFalse($field_2b, 'The second field on test bundle 2 was deleted.');
+    $this->assertNull($field_2b, 'The second field on test bundle 2 was deleted.');
 
     // Check that all config files are gone.
     $active = $this->container->get('config.storage');
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
index c3a4d3c..60475d9 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
@@ -100,7 +100,7 @@ public function testImportDeleteUninstall() {
     $this->configImporter()->import();
 
     $this->assertFalse(\Drupal::moduleHandler()->moduleExists('telephone'));
-    $this->assertFalse(\Drupal::entityManager()->loadEntityByUuid('field_storage_config', $field_storage->uuid()), 'The test field has been deleted by the configuration synchronization');
+    $this->assertNull(\Drupal::entityManager()->loadEntityByUuid('field_storage_config', $field_storage->uuid()), 'The test field has been deleted by the configuration synchronization');
     $deleted_storages = \Drupal::state()->get('field.storage.deleted') ?: [];
     $this->assertFalse(isset($deleted_storages[$field_storage->uuid()]), 'Telephone field has been completed removed from the system.');
     $this->assertTrue(isset($deleted_storages[$unrelated_field_storage->uuid()]), 'Unrelated field not purged by configuration synchronization.');
diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
index f7993dc..0aa5105 100644
--- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
@@ -42,7 +42,7 @@ public function testCreate() {
     $field_storage->save();
 
     $field_storage = FieldStorageConfig::load($field_storage->id());
-    $this->assertTrue($field_storage->getSetting('storage_setting_from_config_data'));
+    $this->assertEquals('TRUE', $field_storage->getSetting('storage_setting_from_config_data'));
     $this->assertNull($field_storage->getSetting('config_data_from_storage_setting'));
 
     $mem = field_test_memorize();
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 6f75169..cfc57d4 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
@@ -64,7 +64,7 @@ public function testWidgetSettings() {
     $component = $form_display->getComponent('field_test_link');
     $this->assertIdentical('link_default', $component['type']);
     $this->assertIdentical(7, $component['weight']);
-    $this->assertFalse(array_filter($component['settings']));
+    $this->assertEmpty(array_filter($component['settings']));
 
     // File field.
     $component = $form_display->getComponent('field_test_filefield');
diff --git a/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php b/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
index 0eeb778..b1415a3 100644
--- a/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
@@ -43,7 +43,7 @@ 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->assertTrue(strpos($this->render($render_array), $entity->uuid()), 'The rendered UUID found.');
+    $this->assertContains($entity->uuid(), $this->render($render_array), 'The rendered UUID found.');
 
     // Verify customized render.
     $render_array = $uuid_field->view(['settings' => ['link_to_entity' => TRUE]]);
@@ -51,8 +51,8 @@ public function testUuidStringFormatter() {
     $this->assertIdentical($render_array[0]['#title']['#context']['value'], $entity->uuid());
     $this->assertIdentical($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.');
+    $this->assertContains($entity->uuid(), $rendered, 'The rendered UUID found.');
+    $this->assertContains($entity->url(), $rendered, 'The rendered entity URL found.');
   }
 
 }
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
index 4a0e533..c4369f2 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
@@ -384,18 +384,18 @@ public function testDeleteField() {
 
     // Check the component exists.
     $display = entity_get_display('entity_test', 'entity_test', 'default');
-    $this->assertTrue($display->getComponent($field_name));
+    $this->assertNotEmpty($display->getComponent($field_name));
     $display = entity_get_display('entity_test', 'entity_test', 'teaser');
-    $this->assertTrue($display->getComponent($field_name));
+    $this->assertNotEmpty($display->getComponent($field_name));
 
     // Delete the field.
     $field->delete();
 
     // Check that the component has been removed from the entity displays.
     $display = entity_get_display('entity_test', 'entity_test', 'default');
-    $this->assertFalse($display->getComponent($field_name));
+    $this->assertNull($display->getComponent($field_name));
     $display = entity_get_display('entity_test', 'entity_test', 'teaser');
-    $this->assertFalse($display->getComponent($field_name));
+    $this->assertNull($display->getComponent($field_name));
   }
 
   /**
@@ -437,7 +437,7 @@ public function testOnDependencyRemoval() {
     // Removing the text module should remove the field from the view display.
     \Drupal::service('config.manager')->uninstall('module', 'text');
     $display = entity_get_display('entity_test', 'entity_test', 'default');
-    $this->assertFalse($display->getComponent($field_name));
+    $this->assertNull($display->getComponent($field_name));
   }
 
   /**
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
index 09d2a20..2e9fc9b 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
@@ -209,18 +209,18 @@ public function testDeleteField() {
 
     // Check the component exists.
     $display = entity_get_form_display('entity_test', 'entity_test', 'default');
-    $this->assertTrue($display->getComponent($field_name));
+    $this->assertNotEmpty($display->getComponent($field_name));
     $display = entity_get_form_display('entity_test', 'entity_test', 'compact');
-    $this->assertTrue($display->getComponent($field_name));
+    $this->assertNotEmpty($display->getComponent($field_name));
 
     // Delete the field.
     $field->delete();
 
     // Check that the component has been removed from the entity displays.
     $display = entity_get_form_display('entity_test', 'entity_test', 'default');
-    $this->assertFalse($display->getComponent($field_name));
+    $this->assertNull($display->getComponent($field_name));
     $display = entity_get_form_display('entity_test', 'entity_test', 'compact');
-    $this->assertFalse($display->getComponent($field_name));
+    $this->assertNull($display->getComponent($field_name));
   }
 
   /**
@@ -262,7 +262,7 @@ public function testOnDependencyRemoval() {
     // Removing the text module should remove the field from the form display.
     \Drupal::service('config.manager')->uninstall('module', 'text');
     $display = entity_get_form_display('entity_test', 'entity_test', 'default');
-    $this->assertFalse($display->getComponent($field_name));
+    $this->assertNull($display->getComponent($field_name));
   }
 
 }
diff --git a/core/modules/file/tests/src/Kernel/CopyTest.php b/core/modules/file/tests/src/Kernel/CopyTest.php
index 3193cb6..9f5c1fe 100644
--- a/core/modules/file/tests/src/Kernel/CopyTest.php
+++ b/core/modules/file/tests/src/Kernel/CopyTest.php
@@ -23,7 +23,7 @@ public function testNormal() {
     $result = file_copy(clone $source, $desired_uri, FILE_EXISTS_ERROR);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, 'File copied successfully.');
+    $this->assertNotFalse($result, 'File copied successfully.');
     $this->assertEqual($contents, file_get_contents($result->getFileUri()), 'Contents of file were copied correctly.');
 
     // Check that the correct hooks were called.
@@ -54,7 +54,7 @@ public function testExistingRename() {
     $result = file_copy(clone $source, $target->getFileUri(), FILE_EXISTS_RENAME);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, 'File copied successfully.');
+    $this->assertNotFalse($result, 'File copied successfully.');
     $this->assertEqual($contents, file_get_contents($result->getFileUri()), 'Contents of file were copied correctly.');
     $this->assertNotEqual($result->getFileUri(), $source->getFileUri(), 'Returned file path has changed from the original.');
 
@@ -94,7 +94,7 @@ public function testExistingReplace() {
     $result = file_copy(clone $source, $target->getFileUri(), FILE_EXISTS_REPLACE);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, 'File copied successfully.');
+    $this->assertNotFalse($result, 'File copied successfully.');
     $this->assertEqual($contents, file_get_contents($result->getFileUri()), 'Contents of file were overwritten.');
     $this->assertDifferentFile($source, $result);
 
diff --git a/core/modules/file/tests/src/Kernel/DeleteTest.php b/core/modules/file/tests/src/Kernel/DeleteTest.php
index 3b868c0..af79930 100644
--- a/core/modules/file/tests/src/Kernel/DeleteTest.php
+++ b/core/modules/file/tests/src/Kernel/DeleteTest.php
@@ -21,7 +21,7 @@ public function testUnused() {
     $file->delete();
     $this->assertFileHooksCalled(['delete']);
     $this->assertFalse(file_exists($file->getFileUri()), 'Test file has actually been deleted.');
-    $this->assertFalse(File::load($file->id()), 'File was removed from the database.');
+    $this->assertNull(File::load($file->id()), 'File was removed from the database.');
   }
 
   /**
@@ -37,7 +37,7 @@ public function testInUse() {
     $usage = $file_usage->listUsage($file);
     $this->assertEqual($usage['testing']['test'], [1 => 1], 'Test file is still in use.');
     $this->assertTrue(file_exists($file->getFileUri()), 'File still exists on the disk.');
-    $this->assertTrue(File::load($file->id()), 'File still exists in the database.');
+    $this->assertNotEmpty(File::load($file->id()), 'File still exists in the database.');
 
     // Clear out the call to hook_file_load().
     file_test_reset();
@@ -48,7 +48,7 @@ public function testInUse() {
     $this->assertTrue(empty($usage), 'File usage data was removed.');
     $this->assertTrue(file_exists($file->getFileUri()), 'File still exists on the disk.');
     $file = File::load($file->id());
-    $this->assertTrue($file, 'File still exists in the database.');
+    $this->assertNotEmpty($file, 'File still exists in the database.');
     $this->assertTrue($file->isTemporary(), 'File is temporary.');
     file_test_reset();
 
@@ -66,7 +66,7 @@ public function testInUse() {
     // file_cron() loads
     $this->assertFileHooksCalled(['delete']);
     $this->assertFalse(file_exists($file->getFileUri()), 'File has been deleted after its last usage was removed.');
-    $this->assertFalse(File::load($file->id()), 'File was removed from the database.');
+    $this->assertNull(File::load($file->id()), 'File was removed from the database.');
   }
 
 }
diff --git a/core/modules/file/tests/src/Kernel/LoadTest.php b/core/modules/file/tests/src/Kernel/LoadTest.php
index 9d71539..86eee5f 100644
--- a/core/modules/file/tests/src/Kernel/LoadTest.php
+++ b/core/modules/file/tests/src/Kernel/LoadTest.php
@@ -14,7 +14,7 @@ class LoadTest extends FileManagedUnitTestBase {
    * Try to load a non-existent file by fid.
    */
   public function testLoadMissingFid() {
-    $this->assertFalse(File::load(-1), 'Try to load an invalid fid fails.');
+    $this->assertNull(File::load(-1), 'Try to load an invalid fid fails.');
     $this->assertFileHooksCalled([]);
   }
 
diff --git a/core/modules/file/tests/src/Kernel/MoveTest.php b/core/modules/file/tests/src/Kernel/MoveTest.php
index 3183ecf..678d3fa 100644
--- a/core/modules/file/tests/src/Kernel/MoveTest.php
+++ b/core/modules/file/tests/src/Kernel/MoveTest.php
@@ -23,7 +23,7 @@ public function testNormal() {
     $result = file_move(clone $source, $desired_filepath, FILE_EXISTS_ERROR);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, 'File moved successfully.');
+    $this->assertNotFalse($result, 'File moved successfully.');
     $this->assertFalse(file_exists($source->getFileUri()));
     $this->assertEqual($contents, file_get_contents($result->getFileUri()), 'Contents of file correctly written.');
 
@@ -36,7 +36,7 @@ public function testNormal() {
     // Reload the file from the database and check that the changes were
     // actually saved.
     $loaded_file = File::load($result->id());
-    $this->assertTrue($loaded_file, 'File can be loaded from the database.');
+    $this->assertNotEmpty($loaded_file, 'File can be loaded from the database.');
     $this->assertFileUnchanged($result, $loaded_file);
   }
 
@@ -55,7 +55,7 @@ public function testExistingRename() {
     $result = file_move(clone $source, $target->getFileUri(), FILE_EXISTS_RENAME);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, 'File moved successfully.');
+    $this->assertNotFalse($result, 'File moved successfully.');
     $this->assertFalse(file_exists($source->getFileUri()));
     $this->assertEqual($contents, file_get_contents($result->getFileUri()), 'Contents of file correctly written.');
 
@@ -92,7 +92,7 @@ public function testExistingReplace() {
     // Look at the results.
     $this->assertEqual($contents, file_get_contents($result->getFileUri()), 'Contents of file were overwritten.');
     $this->assertFalse(file_exists($source->getFileUri()));
-    $this->assertTrue($result, 'File moved successfully.');
+    $this->assertNotEmpty($result, 'File moved successfully.');
 
     // Check that the correct hooks were called.
     $this->assertFileHooksCalled(['move', 'update', 'delete', 'load']);
diff --git a/core/modules/file/tests/src/Kernel/SaveDataTest.php b/core/modules/file/tests/src/Kernel/SaveDataTest.php
index 747c7b1..533867d 100644
--- a/core/modules/file/tests/src/Kernel/SaveDataTest.php
+++ b/core/modules/file/tests/src/Kernel/SaveDataTest.php
@@ -17,7 +17,7 @@ public function testWithoutFilename() {
     $contents = $this->randomMachineName(8);
 
     $result = file_save_data($contents);
-    $this->assertTrue($result, 'Unnamed file saved correctly.');
+    $this->assertNotFalse($result, 'Unnamed file saved correctly.');
 
     $this->assertEqual(file_default_scheme(), file_uri_scheme($result->getFileUri()), "File was placed in Drupal's files directory.");
     $this->assertEqual($result->getFilename(), drupal_basename($result->getFileUri()), "Filename was set to the file's basename.");
@@ -42,7 +42,7 @@ public function testWithFilename() {
     $filename = 'Текстовый файл.txt';
 
     $result = file_save_data($contents, 'public://' . $filename);
-    $this->assertTrue($result, 'Unnamed file saved correctly.');
+    $this->assertNotFalse($result, 'Unnamed file saved correctly.');
 
     $this->assertEqual('public', file_uri_scheme($result->getFileUri()), "File was placed in Drupal's files directory.");
     $this->assertEqual($filename, drupal_basename($result->getFileUri()), 'File was named correctly.');
@@ -66,7 +66,7 @@ public function testExistingRename() {
     $contents = $this->randomMachineName(8);
 
     $result = file_save_data($contents, $existing->getFileUri(), FILE_EXISTS_RENAME);
-    $this->assertTrue($result, 'File saved successfully.');
+    $this->assertNotFalse($result, 'File saved successfully.');
 
     $this->assertEqual('public', file_uri_scheme($result->getFileUri()), "File was placed in Drupal's files directory.");
     $this->assertEqual($result->getFilename(), $existing->getFilename(), 'Filename was set to the basename of the source, rather than that of the renamed file.');
@@ -94,7 +94,7 @@ public function testExistingReplace() {
     $contents = $this->randomMachineName(8);
 
     $result = file_save_data($contents, $existing->getFileUri(), FILE_EXISTS_REPLACE);
-    $this->assertTrue($result, 'File saved successfully.');
+    $this->assertNotFalse($result, 'File saved successfully.');
 
     $this->assertEqual('public', file_uri_scheme($result->getFileUri()), "File was placed in Drupal's files directory.");
     $this->assertEqual($result->getFilename(), $existing->getFilename(), 'Filename was set to the basename of the existing file, rather than preserving the original name.');
diff --git a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
index e16bdda..49fb44f 100644
--- a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
@@ -39,7 +39,7 @@ public function testInstallation() {
     $this->assertEqual($format->get('weight'), 2);
 
     // Verify that format default property values have been added/injected.
-    $this->assertTrue($format->uuid());
+    $this->assertNotEmpty($format->uuid());
 
     // Verify that the loaded format does not contain any roles.
     $this->assertEqual($format->get('roles'), NULL);
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
index 0ebc719..a287a9e 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
@@ -64,7 +64,7 @@ protected function setUp() {
    */
   protected function assertTranslations($id, $default, $others = []) {
     $entity = $this->storage->load($id);
-    $this->assertTrue($entity, "Entity exists");
+    $this->assertNotEmpty($entity, "Entity exists");
     $this->assertEquals($default, $entity->language()->getId(), "Entity default translation");
     $translations = array_keys($entity->getTranslationLanguages(FALSE));
     sort($others);
@@ -109,7 +109,7 @@ public function testTranslated() {
     $this->assertTranslations(1, 'en');
     $this->assertTranslations(2, 'fr');
     $this->assertTranslations(3, 'en', ['fr']);
-    $this->assertFalse($this->storage->load(4));
+    $this->assertEmpty($this->storage->load(4));
 
     $destination_rows = [
       // Existing default translation.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
index 4b78e65..7c27d5b 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
@@ -70,7 +70,7 @@ public function testRollback() {
     foreach ($vocabulary_data_rows as $row) {
       /** @var Vocabulary $vocabulary */
       $vocabulary = Vocabulary::load($row['id']);
-      $this->assertTrue($vocabulary);
+      $this->assertNotEmpty($vocabulary);
       $map_row = $vocabulary_id_map->getRowBySource(['id' => $row['id']]);
       $this->assertNotNull($map_row['destid1']);
     }
@@ -123,7 +123,7 @@ public function testRollback() {
     foreach ($term_data_rows as $row) {
       /** @var Term $term */
       $term = Term::load($row['id']);
-      $this->assertTrue($term);
+      $this->assertNotEmpty($term);
       $map_row = $term_id_map->getRowBySource(['id' => $row['id']]);
       $this->assertNotNull($map_row['destid1']);
     }
diff --git a/core/modules/migrate_drupal/src/Tests/StubTestTrait.php b/core/modules/migrate_drupal/src/Tests/StubTestTrait.php
index 3bf0028..adf7008 100644
--- a/core/modules/migrate_drupal/src/Tests/StubTestTrait.php
+++ b/core/modules/migrate_drupal/src/Tests/StubTestTrait.php
@@ -18,7 +18,7 @@
    */
   protected function performStubTest($entity_type_id) {
     $entity_id = $this->createStub($entity_type_id);
-    $this->assertTrue($entity_id, 'Stub successfully created');
+    $this->assertNotEmpty($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')) {
diff --git a/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php b/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
index cb98517..29b764b 100644
--- a/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
+++ b/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
@@ -38,13 +38,13 @@ public function testImportCreateDefault() {
     $node_type_id = 'default';
 
     // Check that the content type does not exist yet.
-    $this->assertFalse(NodeType::load($node_type_id));
+    $this->assertEmpty(NodeType::load($node_type_id));
 
     // Enable node_test_config module and check that the content type
     // shipped in the module's default config is created.
     $this->container->get('module_installer')->install(['node_test_config']);
     $node_type = NodeType::load($node_type_id);
-    $this->assertTrue($node_type, 'The default content type was created.');
+    $this->assertNotEmpty($node_type, 'The default content type was created.');
   }
 
   /**
@@ -61,15 +61,15 @@ public function testImportCreate() {
     // Manually add new node type.
     $src_dir = __DIR__ . '/../../../modules/node_test_config/sync';
     $target_dir = config_get_config_directory(CONFIG_SYNC_DIRECTORY);
-    $this->assertTrue(file_unmanaged_copy("$src_dir/$node_type_config_name.yml", "$target_dir/$node_type_config_name.yml"));
+    $this->assertNotEmpty(file_unmanaged_copy("$src_dir/$node_type_config_name.yml", "$target_dir/$node_type_config_name.yml"));
 
     // Import the content of the sync directory.
     $this->configImporter()->import();
 
     // Check that the content type was created.
     $node_type = NodeType::load($node_type_id);
-    $this->assertTrue($node_type, 'Import node type from sync was created.');
-    $this->assertFalse(FieldConfig::loadByName('node', $node_type_id, 'body'));
+    $this->assertNotEmpty($node_type, 'Import node type from sync was created.');
+    $this->assertEmpty(FieldConfig::loadByName('node', $node_type_id, 'body'));
   }
 
 }
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 9ca1d4a..7f68041 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
@@ -132,7 +132,7 @@ public function testNode() {
     $this->assertRevision(1, 'A Node', '1', NULL, '1441032132');
 
     $node = Node::load(1);
-    $this->assertTrue($node->field_boolean->value);
+    $this->assertNotEmpty($node->field_boolean->value);
     $this->assertIdentical('99-99-99-99', $node->field_phone->value);
     // Use assertEqual() here instead, since SQLite interprets floats strictly.
     $this->assertEqual('1', $node->field_float->value);
@@ -142,7 +142,7 @@ public function testNode() {
     $this->assertIdentical('qwerty', $node->field_text->value);
     $this->assertIdentical('2', $node->field_file->target_id);
     $this->assertIdentical('file desc', $node->field_file->description);
-    $this->assertTrue($node->field_file->display);
+    $this->assertNotEmpty($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);
diff --git a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
index 3dd1349..29b7eba 100644
--- a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
@@ -36,7 +36,7 @@ protected function setUp() {
    */
   public function testFieldOverrides() {
     $field_storage = FieldStorageConfig::loadByName('node', 'body');
-    $this->assertTrue($field_storage, 'Node body field storage exists.');
+    $this->assertNotEmpty($field_storage, 'Node body field storage exists.');
     $type = NodeType::create(['name' => 'Ponies', 'type' => 'ponies']);
     $type->save();
     node_add_body_field($type);
@@ -48,7 +48,7 @@ public function testFieldOverrides() {
     $this->assertTrue(count($field_storage->getBundles()) == 0, 'Node body field storage exists after deleting the only instance of a field.');
     \Drupal::service('module_installer')->uninstall(['node']);
     $field_storage = FieldStorageConfig::loadByName('node', 'body');
-    $this->assertFalse($field_storage, 'Node body field storage does not exist after uninstalling the Node module.');
+    $this->assertEmpty($field_storage, 'Node body field storage does not exist after uninstalling the Node module.');
   }
 
 }
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 092d5ac..84615b7 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
@@ -49,7 +49,7 @@ protected function setUp() {
    *   The path.
    */
   private function assertPath($pid, $conditions, $path) {
-    $this->assertTrue($path, "Path alias for " . $conditions['source'] . " successfully loaded.");
+    $this->assertNotEmpty($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']);
diff --git a/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php
index 5c7d385..7328ca5 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php
@@ -23,7 +23,7 @@ public function testIntegerFormatter() {
 
     // Test that the content attribute is not created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
-    $this->assertFalse($result);
+    $this->assertEmpty($result);
   }
 
   /**
@@ -51,7 +51,7 @@ public function testIntegerFormatterWithSettings() {
 
     // Test that the content attribute is created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', [':testValue' => $testValue]);
-    $this->assertTrue($result);
+    $this->assertNotEmpty($result);
   }
 
   /**
@@ -66,7 +66,7 @@ public function testFloatFormatter() {
 
     // Test that the content attribute is not created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
-    $this->assertFalse($result);
+    $this->assertEmpty($result);
   }
 
   /**
@@ -95,7 +95,7 @@ public function testFloatFormatterWithSettings() {
 
     // Test that the content attribute is created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', [':testValue' => $testValue]);
-    $this->assertTrue($result);
+    $this->assertNotEmpty($result);
   }
 
   /**
@@ -116,7 +116,7 @@ public function testFloatFormatterWithScale() {
 
     // Test that the content attribute is not created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
-    $this->assertFalse($result);
+    $this->assertEmpty($result);
   }
 
   /**
@@ -139,7 +139,7 @@ public function testFloatFormatterWithScaleExercised() {
 
     // Test that the content attribute is created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', [':testValue' => $testValue]);
-    $this->assertTrue($result);
+    $this->assertNotEmpty($result);
   }
 
   /**
@@ -154,7 +154,7 @@ public function testDecimalFormatter() {
 
     // Test that the content attribute is not created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
-    $this->assertFalse($result);
+    $this->assertEmpty($result);
   }
 
   /**
@@ -183,7 +183,7 @@ public function testDecimalFormatterWithSettings() {
 
     // Test that the content attribute is created.
     $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', [':testValue' => $testValue]);
-    $this->assertTrue($result);
+    $this->assertNotEmpty($result);
   }
 
   /**
diff --git a/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php b/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
index d481291..b35751c 100644
--- a/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
+++ b/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
@@ -56,7 +56,7 @@ public function testEntityViewDisplayDependency() {
 
     // Check that the 'foo' field is on the display.
     $this->assertNotNull($display = EntityViewDisplay::load('entity_test.entity_test.default'));
-    $this->assertTrue($display->getComponent('bar'));
+    $this->assertNotEmpty($display->getComponent('bar'));
     $this->assertArrayNotHasKey('bar', $display->get('hidden'));
 
     // Delete the responsive image style.
diff --git a/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php b/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
index f3a8f04..5246e48 100644
--- a/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
+++ b/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
@@ -51,7 +51,7 @@ public function testBuildResponse() {
 
     // No custom header should be set yet.
     $response = RestExport::buildResponse('test_serializer_display_entity', 'rest_export_1', []);
-    $this->assertFalse($response->headers->get('Custom-Header'));
+    $this->assertEmpty($response->headers->get('Custom-Header'));
 
     // Clear render cache.
     /** @var \Drupal\Core\Cache\MemoryBackend $render_cache */
diff --git a/core/modules/simpletest/src/UserCreationTrait.php b/core/modules/simpletest/src/UserCreationTrait.php
index 4b4d0ec..946d712 100644
--- a/core/modules/simpletest/src/UserCreationTrait.php
+++ b/core/modules/simpletest/src/UserCreationTrait.php
@@ -70,7 +70,7 @@ protected function createUser(array $permissions = [], $name = NULL, $admin = FA
     $account = User::create($edit);
     $account->save();
 
-    $this->assertTrue($account->id(), SafeMarkup::format('User created with name %name and pass %pass', ['%name' => $edit['name'], '%pass' => $edit['pass']]), 'User login');
+    $this->assertNotNull($account->id(), SafeMarkup::format('User created with name %name and pass %pass', ['%name' => $edit['name'], '%pass' => $edit['pass']]), 'User login');
     if (!$account->id()) {
       return FALSE;
     }
diff --git a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
index 649a2c7..0c8c646 100644
--- a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
+++ b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
@@ -106,7 +106,7 @@ public function testExceptions() {
     $this->cron->run();
 
     $this->assertEqual(\Drupal::state()->get('cron_queue_test_requeue_exception'), 2);
-    $this->assertFalse($queue->numberOfItems());
+    $this->assertEmpty($queue->numberOfItems());
   }
 
 }
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
index 2da51e4..d601a4b 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
@@ -72,12 +72,12 @@ public function testStubWithWeightMapping() {
     $migration = $this->getMigration('taxonomy_term_stub_test');
     $term_executable = new MigrateExecutable($migration, $this);
     $term_executable->import();
-    $this->assertTrue($migration->getIdMap()->getRowBySource(['2']), 'Stub row exists in the ID map table');
+    $this->assertNotEmpty($migration->getIdMap()->getRowBySource(['2']), 'Stub row exists in the ID map table');
 
     // Load the referenced term, which should exist as a stub.
     /** @var \Drupal\Core\Entity\ContentEntityBase $stub_entity */
     $stub_entity = Term::load(2);
-    $this->assertTrue($stub_entity, 'Stub successfully created');
+    $this->assertNotEmpty($stub_entity, 'Stub successfully created');
     if ($stub_entity) {
       $this->assertIdentical(count($stub_entity->validate()), 0, 'Stub is a valid entity');
     }
diff --git a/core/modules/user/tests/src/Functional/UserMailNotifyTest.php b/core/modules/user/tests/src/Functional/UserMailNotifyTest.php
index 57bebc0..d8a4714 100644
--- a/core/modules/user/tests/src/Functional/UserMailNotifyTest.php
+++ b/core/modules/user/tests/src/Functional/UserMailNotifyTest.php
@@ -69,7 +69,7 @@ public function testUserMailsSent($op, array $mail_keys) {
   public function testUserMailsNotSent($op, array $mail_keys) {
     $this->config('user.settings')->set('notify.' . $op, FALSE)->save();
     $return = _user_mail_notify($op, $this->createUser());
-    $this->assertFalse($return, '_user_mail_notify() returns FALSE.');
+    $this->assertEmpty($return, '_user_mail_notify() returns NULL.');
     $this->assertEmpty($this->getMails(), 'No emails sent by _user_mail_notify().');
   }
 
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 1d28e2a..eb9e299 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureFileTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureFileTest.php
@@ -46,7 +46,7 @@ public function testUserPictures() {
     $this->assertIdentical('image-test.png', $file->getFilename());
     $this->assertIdentical('public://image-test.png', $file->getFileUri());
     $this->assertIdentical('8', $file->getOwnerId());
-    $this->assertFalse($files);
+    $this->assertEmpty($files);
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
index ed28777..805ec48 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
@@ -141,7 +141,7 @@ public function testUser() {
       }
       else {
         // Ensure the user does not have a picture.
-        $this->assertFalse($user->user_picture->target_id, sprintf('User %s does not have a picture', $user->id()));
+        $this->assertEmpty($user->user_picture->target_id, sprintf('User %s does not have a picture', $user->id()));
       }
 
       // Use the API to check if the password has been salted and re-hashed to
diff --git a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
index b3d7ff1..0bc38ed 100644
--- a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
+++ b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
@@ -139,8 +139,8 @@ public function testUserTempStore() {
       ->condition('collection', "user.shared_tempstore.$collection")
       ->condition('name', $key)
       ->execute();
-    $this->assertFalse($stores[0]->get($key));
-    $this->assertFalse($stores[1]->get($key));
+    $this->assertEmpty($stores[0]->get($key));
+    $this->assertEmpty($stores[1]->get($key));
   }
 
 }
diff --git a/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php b/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php
index 123a9cb..055e187 100644
--- a/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php
+++ b/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php
@@ -67,7 +67,7 @@ protected function assertViewsCacheTags(ViewExecutable $view, $expected_results_
       $view->build();
       $results_cache_item = \Drupal::cache('data')->get($cache_plugin->generateResultsKey());
       if (is_array($expected_results_cache)) {
-        $this->assertTrue($results_cache_item, 'Results cache item found.');
+        $this->assertNotEmpty($results_cache_item, 'Results cache item found.');
         if ($results_cache_item) {
           sort($expected_results_cache);
           $this->assertEqual($results_cache_item->tags, $expected_results_cache);
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php
index 8c16b63..b84c718 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php
@@ -29,7 +29,7 @@ public function testTitleText() {
     $view->setDisplay('default');
     $this->executeView($view);
     $view->render();
-    $this->assertFalse($view->getTitle(), 'The title area does not override the title if the view is not empty.');
+    $this->assertEmpty($view->getTitle(), 'The title area does not override the title if the view is not empty.');
     $view->destroy();
 
     $view->setDisplay('default');
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php
index 599052d..b86e8e5 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php
@@ -86,7 +86,7 @@ public function testFieldCustomTokens() {
     $output = $renderer->renderRoot($preview);
 
     $expected_text = 'Amount of kittens: ' . $view->style_plugin->getField(0, 'age');
-    $this->assertTrue(strpos((string) $output, $expected_text), 'The views token has been successfully replaced.');
+    $this->assertNotEmpty(strpos((string) $output, $expected_text), 'The views token has been successfully replaced.');
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
index 9f6066e..c12f5ee 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
@@ -341,7 +341,7 @@ public function testCacheData() {
 
     // Assert there are results, empty results would mean this test case would
     // pass otherwise.
-    $this->assertTrue(count($cache->data['result']), 'Results saved in cached data.');
+    $this->assertNotEmpty(count($cache->data['result']), 'Results saved in cached data.');
 
     // Assert each row doesn't contain '_entity' or '_relationship_entities'
     // items.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
index d08adaa..1c71acb 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
@@ -63,36 +63,36 @@ protected function setUp($import_test_views = TRUE) {
   public function testMenuLinkOverrides() {
     // Link from views module.
     $views_link = $this->menuLinkManager->getDefinition('views_view:views.test_page_display_menu.page_3');
-    $this->assertTrue($views_link['enabled'], 'Menu link is enabled.');
-    $this->assertFalse($views_link['expanded'], 'Menu link is not expanded.');
+    $this->assertNotEmpty($views_link['enabled'], 'Menu link is enabled.');
+    $this->assertEmpty($views_link['expanded'], 'Menu link is not expanded.');
     $views_link['enabled'] = 0;
     $views_link['expanded'] = 1;
     $this->menuLinkManager->updateDefinition($views_link['id'], $views_link);
     $views_link = $this->menuLinkManager->getDefinition($views_link['id']);
-    $this->assertFalse($views_link['enabled'], 'Menu link is disabled.');
-    $this->assertTrue($views_link['expanded'], 'Menu link is expanded.');
+    $this->assertEmpty($views_link['enabled'], 'Menu link is disabled.');
+    $this->assertNotEmpty($views_link['expanded'], 'Menu link is expanded.');
     $this->menuLinkManager->rebuild();
-    $this->assertFalse($views_link['enabled'], 'Menu link is disabled.');
-    $this->assertTrue($views_link['expanded'], 'Menu link is expanded.');
+    $this->assertEmpty($views_link['enabled'], 'Menu link is disabled.');
+    $this->assertNotEmpty($views_link['expanded'], 'Menu link is expanded.');
 
     // Link from user module.
     $user_link = $this->menuLinkManager->getDefinition('user.page');
-    $this->assertTrue($user_link['enabled'], 'Menu link is enabled.');
+    $this->assertNotEmpty($user_link['enabled'], 'Menu link is enabled.');
     $user_link['enabled'] = 0;
     $views_link['expanded'] = 1;
     $this->menuLinkManager->updateDefinition($user_link['id'], $user_link);
-    $this->assertFalse($user_link['enabled'], 'Menu link is disabled.');
+    $this->assertEmpty($user_link['enabled'], 'Menu link is disabled.');
     $this->menuLinkManager->rebuild();
-    $this->assertFalse($user_link['enabled'], 'Menu link is disabled.');
+    $this->assertEmpty($user_link['enabled'], 'Menu link is disabled.');
 
     $this->menuLinkOverrides->reload();
 
     $views_link = $this->menuLinkManager->getDefinition('views_view:views.test_page_display_menu.page_3');
-    $this->assertFalse($views_link['enabled'], 'Menu link is disabled.');
-    $this->assertTrue($views_link['expanded'], 'Menu link is expanded.');
+    $this->assertEmpty($views_link['enabled'], 'Menu link is disabled.');
+    $this->assertNotEmpty($views_link['expanded'], 'Menu link is expanded.');
 
     $user_link = $this->menuLinkManager->getDefinition('user.page');
-    $this->assertFalse($user_link['enabled'], 'Menu link is disabled.');
+    $this->assertEmpty($user_link['enabled'], 'Menu link is disabled.');
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
index 02548b2..fa110d9 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
@@ -44,7 +44,7 @@ public function _testInitQuery() {
     $view->setDisplay();
 
     $view->initQuery();
-    $this->assertTrue($view->query instanceof QueryTestPlugin, 'Make sure the right query plugin got instantiated.');
+    $this->assertNotEmpty($view->query instanceof QueryTestPlugin, 'Make sure the right query plugin got instantiated.');
   }
 
   public function _testQueryExecute() {
@@ -55,7 +55,7 @@ public function _testQueryExecute() {
     $view->query->setAllItems($this->dataSet());
 
     $this->executeView($view);
-    $this->assertTrue($view->result, 'Make sure the view result got filled');
+    $this->assertNotEmpty($view->result, 'Make sure the view result got filled');
   }
 
   /**
@@ -68,7 +68,7 @@ protected function queryMethodsTests() {
     $view->setDisplay();
 
     $view->initQuery();
-    $this->assertFalse($view->query->getLimit(), 'Default to an empty limit.');
+    $this->assertNull($view->query->getLimit(), 'Default to an empty limit.');
     $rand_number = rand(5, 10);
     $view->query->setLimit($rand_number);
     $this->assertEqual($view->query->getLimit(), $rand_number, 'set_limit adapts the amount of items.');
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
index 223963e..0a578fd 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
@@ -196,7 +196,7 @@ protected function doTestRenderedOutput(AccountInterface $account, $check_cache
           ],
         ];
         $element = $render_cache->get($cache);
-        $this->assertTrue($element);
+        $this->assertNotEmpty($element);
       }
 
       $index++;
diff --git a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
index e4a0884..afb602c 100644
--- a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
+++ b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
@@ -187,8 +187,8 @@ public function testGroupByCountOnlyFilters() {
     $view = Views::getView('test_group_by_in_filters');
     $this->executeView($view);
 
-    $this->assertTrue(strpos($view->build_info['query'], 'GROUP BY'), 'Make sure that GROUP BY is in the query');
-    $this->assertTrue(strpos($view->build_info['query'], 'HAVING'), 'Make sure that HAVING is in the query');
+    $this->assertNotEmpty(strpos($view->build_info['query'], 'GROUP BY'), 'Make sure that GROUP BY is in the query');
+    $this->assertNotEmpty(strpos($view->build_info['query'], 'HAVING'), 'Make sure that HAVING is in the query');
   }
 
   /**
@@ -204,7 +204,7 @@ public function testGroupByBaseField() {
     $view->displayHandlers->get('default')->options['fields']['name']['group_type'] = 'min';
     unset($view->displayHandlers->get('default')->options['fields']['id']['group_type']);
     $this->executeView($view);
-    $this->assertTrue(strpos($view->build_info['query'], 'GROUP BY entity_test.id'), 'GROUP BY field includes the base table name when grouping on the base field.');
+    $this->assertNotEmpty(strpos($view->build_info['query'], 'GROUP BY entity_test.id'), 'GROUP BY field includes the base table name when grouping on the base field.');
   }
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
index a2bec23..ba3769b 100644
--- a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
@@ -147,7 +147,7 @@ protected function assertCacheTagsForFieldBasedView($do_assert_views_caches) {
     // @todo Static render arrays don't support different pages yet, see
     //   https://www.drupal.org/node/2500701.
     // $this->assertViewsCacheTagsFromStaticRenderArray($view, $tags_page_2, $do_assert_views_caches);
-    $this->assertTrue(strpos($build['#markup'], $random_name) !== FALSE);
+    $this->assertNotEmpty(strpos($build['#markup'], $random_name) !== FALSE);
     $view->destroy();
 
     $this->pass('Page 1');
@@ -157,7 +157,7 @@ protected function assertCacheTagsForFieldBasedView($do_assert_views_caches) {
     $entities[1]->save();
     $build = $this->assertViewsCacheTags($view, $tags_page_1, $do_assert_views_caches, $tags_page_1);
     $this->assertViewsCacheTagsFromStaticRenderArray($view, $tags_page_1, $do_assert_views_caches);
-    $this->assertTrue(strpos($build['#markup'], $random_name) !== FALSE);
+    $this->assertNotEmpty(strpos($build['#markup'], $random_name) !== FALSE);
     $view->destroy();
 
     // Setup arguments to ensure that render caching also varies by them.
diff --git a/core/modules/views/tests/src/Kernel/ViewStorageTest.php b/core/modules/views/tests/src/Kernel/ViewStorageTest.php
index 7cf953a..8332e9a 100644
--- a/core/modules/views/tests/src/Kernel/ViewStorageTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewStorageTest.php
@@ -107,7 +107,7 @@ protected function loadTests() {
 
     // Make sure that loaded default views get a UUID.
     $view = Views::getView('test_view_storage');
-    $this->assertTrue($view->storage->uuid());
+    $this->assertNotEmpty($view->storage->uuid());
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/AssertLegacyTrait.php b/core/tests/Drupal/KernelTests/AssertLegacyTrait.php
index f63c4bf..4820bbd 100644
--- a/core/tests/Drupal/KernelTests/AssertLegacyTrait.php
+++ b/core/tests/Drupal/KernelTests/AssertLegacyTrait.php
@@ -24,30 +24,6 @@ protected function assert($actual, $message = '') {
   }
 
   /**
-   * @see \Drupal\simpletest\TestBase::assertTrue()
-   */
-  public static function assertTrue($actual, $message = '') {
-    if (is_bool($actual)) {
-      parent::assertTrue($actual, $message);
-    }
-    else {
-      parent::assertNotEmpty($actual, $message);
-    }
-  }
-
-  /**
-   * @see \Drupal\simpletest\TestBase::assertFalse()
-   */
-  public static function assertFalse($actual, $message = '') {
-    if (is_bool($actual)) {
-      parent::assertFalse($actual, $message);
-    }
-    else {
-      parent::assertEmpty($actual, $message);
-    }
-  }
-
-  /**
    * @see \Drupal\simpletest\TestBase::assertEqual()
    *
    * @deprecated Scheduled for removal in Drupal 9.0.0. Use self::assertEquals()
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
index fa409af..6d1b82f 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
@@ -419,7 +419,7 @@ public function testLibraryAlter() {
     $js = $this->assetResolver->getJsAssets($assets, FALSE)[1];
     $js_render_array = \Drupal::service('asset.js.collection_renderer')->render($js);
     $rendered_js = $this->renderer->renderPlain($js_render_array);
-    $this->assertTrue(strpos($rendered_js, 'core/assets/vendor/jquery-form/jquery.form.min.js'), 'Altered library dependencies are added to the page.');
+    $this->assertNotFalse(strpos($rendered_js, 'core/assets/vendor/jquery-form/jquery.form.min.js'), 'Altered library dependencies are added to the page.');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php
index a77adfc..2b7a5ff 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php
@@ -37,7 +37,7 @@ public function testHookLibraryInfoByTheme() {
     // Activate test_theme and verify that the library 'kitten' is added using
     // hook_library_info_alter().
     $this->activateTheme('test_theme');
-    $this->assertTrue($this->libraryDiscovery->getLibraryByName('test_theme', 'kitten'));
+    $this->assertNotEmpty($this->libraryDiscovery->getLibraryByName('test_theme', 'kitten'));
 
     // Now make classy the active theme and assert that library is not added.
     $this->activateTheme('classy');
@@ -57,7 +57,7 @@ public function testLibrariesOverride() {
     $this->assertAssetInLibrary('core/themes/classy/css/components/dialog.css', 'classy', 'dialog', 'css');
 
     // Confirmatory assert on core library to be removed.
-    $this->assertTrue($this->libraryDiscovery->getLibraryByName('core', 'drupal.progress'), 'Confirmatory test on "core/drupal.progress"');
+    $this->assertNotEmpty($this->libraryDiscovery->getLibraryByName('core', 'drupal.progress'), 'Confirmatory test on "core/drupal.progress"');
 
     // Activate test theme that defines libraries overrides.
     $this->activateTheme('test_theme');
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
index 0fefc39..6d92d2f 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
@@ -40,7 +40,7 @@ public function testTagInvalidations() {
     foreach ($bins as $bin) {
       $bin = \Drupal::cache($bin);
       $bin->set('test', 'value', Cache::PERMANENT, $tags);
-      $this->assertTrue($bin->get('test'), 'Cache item was set in bin.');
+      $this->assertNotEmpty($bin->get('test'), 'Cache item was set in bin.');
     }
 
     $invalidations_before = intval(db_select('cachetags')->fields('cachetags', ['invalidations'])->condition('tag', 'test_tag:2')->execute()->fetchField());
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
index 4e57a71..cbd8948 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
@@ -484,7 +484,7 @@ public function testDeleteAll() {
 
     $this->assertFalse($backend_a->get('test1'), 'First key has been deleted.');
     $this->assertFalse($backend_a->get('test2'), 'Second key has been deleted.');
-    $this->assertTrue($backend_b->get('test3'), 'Item in other bin is preserved.');
+    $this->assertNotEmpty($backend_b->get('test3'), 'Item in other bin is preserved.');
   }
 
   /**
@@ -562,7 +562,7 @@ public function testInvalidateTags() {
     $bins = ['path', 'bootstrap', 'page'];
     foreach ($bins as $bin) {
       $this->getCacheBackend($bin)->set('test', $this->defaultValue, Cache::PERMANENT, $tags);
-      $this->assertTrue($this->getCacheBackend($bin)->get('test'), 'Cache item was set in bin.');
+      $this->assertNotEmpty($this->getCacheBackend($bin)->get('test'), 'Cache item was set in bin.');
     }
 
     Cache::invalidateTags(['test_tag:2']);
@@ -574,7 +574,7 @@ public function testInvalidateTags() {
     // Test that the cache entry with a matching tag has been invalidated.
     $this->assertFalse($this->getCacheBackend($bin)->get('test_cid_invalidate2'), 'Cache items matching tag were invalidated.');
     // Test that the cache entry with without a matching tag still exists.
-    $this->assertTrue($this->getCacheBackend($bin)->get('test_cid_invalidate1'), 'Cache items not matching tag were not invalidated.');
+    $this->assertNotEmpty($this->getCacheBackend($bin)->get('test_cid_invalidate1'), 'Cache items not matching tag were not invalidated.');
   }
 
   /**
@@ -593,9 +593,9 @@ public function testInvalidateAll() {
 
     $this->assertFalse($backend_a->get('test1'), 'First key has been invalidated.');
     $this->assertFalse($backend_a->get('test2'), 'Second key has been invalidated.');
-    $this->assertTrue($backend_b->get('test3'), 'Item in other bin is preserved.');
-    $this->assertTrue($backend_a->get('test1', TRUE), 'First key has not been deleted.');
-    $this->assertTrue($backend_a->get('test2', TRUE), 'Second key has not been deleted.');
+    $this->assertNotEmpty($backend_b->get('test3'), 'Item in other bin is preserved.');
+    $this->assertNotEmpty($backend_a->get('test1', TRUE), 'First key has not been deleted.');
+    $this->assertNotEmpty($backend_a->get('test2', TRUE), 'Second key has not been deleted.');
   }
 
   /**
@@ -614,7 +614,7 @@ public function testRemoveBin() {
 
     $this->assertFalse($backend_a->get('test1'), 'First key has been deleted.');
     $this->assertFalse($backend_a->get('test2', TRUE), 'Second key has been deleted.');
-    $this->assertTrue($backend_b->get('test3'), 'Item in other bin is preserved.');
+    $this->assertNotEmpty($backend_b->get('test3'), 'Item in other bin is preserved.');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
index 8129410..c07b04c 100644
--- a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
@@ -155,21 +155,21 @@ public function testDbDumpCommand() {
 
     // Tables that are schema-only should not have data exported.
     $pattern = preg_quote("\$connection->insert('sessions')");
-    $this->assertFalse(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Tables defined as schema-only do not have data exported to the script.');
+    $this->assertNotRegExp('/' . $pattern . '/', $command_tester->getDisplay(), 'Tables defined as schema-only do not have data exported to the script.');
 
     // Table data is exported.
     $pattern = preg_quote("\$connection->insert('config')");
-    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Table data is properly exported to the script.');
+    $this->assertRegExp('/' . $pattern . '/', $command_tester->getDisplay(), 'Table data is properly exported to the script.');
 
     // The test data are in the dump (serialized).
     $pattern = preg_quote(serialize($this->data));
-    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Generated data is found in the exported script.');
+    $this->assertRegExp('/' . $pattern . '/', $command_tester->getDisplay(), 'Generated data is found in the exported script.');
 
     // Check that the user account name and email address was properly escaped.
     $pattern = preg_quote('"q\'uote\$dollar@example.com"');
-    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The user account email address was properly escaped in the exported script.');
+    $this->assertRegExp('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account email address was properly escaped in the exported script.');
     $pattern = preg_quote('\'$dollar\'');
-    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The user account name was properly escaped in the exported script.');
+    $this->assertRegExp('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account name was properly escaped in the exported script.');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
index 79b01cb..ebe6e6b 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
@@ -222,8 +222,8 @@ public function testConfigEntityUninstall() {
     // Test that doing a config uninstall of the node module deletes entity2
     // since it is dependent on entity1 which is dependent on the node module.
     $config_manager->uninstall('module', 'node');
-    $this->assertFalse($storage->load('entity1'), 'Entity 1 deleted');
-    $this->assertFalse($storage->load('entity2'), 'Entity 2 deleted');
+    $this->assertEmpty($storage->load('entity1'), 'Entity 1 deleted');
+    $this->assertEmpty($storage->load('entity2'), 'Entity 2 deleted');
   }
 
   /**
@@ -502,8 +502,8 @@ public function testConfigEntityDelete() {
     // Test that doing a delete of entity1 deletes entity2 since it is dependent
     // on entity1.
     $entity1->delete();
-    $this->assertFalse($storage->load('entity1'), 'Entity 1 deleted');
-    $this->assertFalse($storage->load('entity2'), 'Entity 2 deleted');
+    $this->assertEmpty($storage->load('entity1'), 'Entity 1 deleted');
+    $this->assertEmpty($storage->load('entity2'), 'Entity 2 deleted');
 
     // Set a more complicated test where dependencies will be fixed.
     \Drupal::state()->set('config_test.fix_dependencies', [$entity1->getConfigDependencyName()]);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
index 5366629..aa86285 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
@@ -55,7 +55,7 @@ public function testReadWriteConfig() {
 
     // Verify a configuration object is returned.
     $this->assertEqual($config->getName(), $name);
-    $this->assertTrue($config, 'Config object created.');
+    $this->assertNotEmpty($config, 'Config object created.');
 
     // Verify the configuration object is empty.
     $this->assertEqual($config->get(), [], 'New config object is empty.');
@@ -92,12 +92,12 @@ public function testReadWriteConfig() {
 
     // Verify the database entry exists.
     $data = $storage->read($name);
-    $this->assertTrue($data);
+    $this->assertNotEmpty($data);
 
     // Read top level value.
     $config = $this->config($name);
     $this->assertEqual($config->getName(), $name);
-    $this->assertTrue($config, 'Config object created.');
+    $this->assertNotEmpty($config, 'Config object created.');
     $this->assertEqual($config->get($key), 'bar', 'Top level configuration value found.');
 
     // Read nested value.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
index 0ecc38c..e47bfce 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
@@ -364,7 +364,7 @@ public function testSecondaryUpdateDeletedDeleterFirst() {
 
     // The deletee was deleted in
     // \Drupal\config_test\Entity\ConfigTest::postSave().
-    $this->assertFalse($entity_storage->load('deletee'));
+    $this->assertEmpty($entity_storage->load('deletee'));
 
     $other = $entity_storage->load('other');
     $this->assertEqual($other->id(), 'other');
@@ -420,8 +420,8 @@ public function testSecondaryUpdateDeletedDeleteeFirst() {
     // Both entities are deleted. ConfigTest::postSave() causes updates of the
     // deleter entity to delete the deletee entity. Since the deleter depends on
     // the deletee, removing the deletee causes the deleter to be removed.
-    $this->assertFalse($entity_storage->load('deleter'));
-    $this->assertFalse($entity_storage->load('deletee'));
+    $this->assertEmpty($entity_storage->load('deleter'));
+    $this->assertEmpty($entity_storage->load('deletee'));
     $logs = $this->configImporter->getErrors();
     $this->assertEqual(count($logs), 0);
   }
@@ -459,8 +459,8 @@ public function testSecondaryDeletedDeleteeSecond() {
     $this->configImporter->reset()->import();
 
     $entity_storage = \Drupal::entityManager()->getStorage('config_test');
-    $this->assertFalse($entity_storage->load('deleter'));
-    $this->assertFalse($entity_storage->load('deletee'));
+    $this->assertEmpty($entity_storage->load('deleter'));
+    $this->assertEmpty($entity_storage->load('deletee'));
     // The deletee entity does not exist as the delete worked and although the
     // delete occurred in \Drupal\config_test\Entity\ConfigTest::postDelete()
     // this does not matter.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
index 8ba0ae1..ce35d48 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
@@ -224,7 +224,7 @@ public function testDependencyChecking() {
     $this->installModules(['config_other_module_config_test']);
     $this->installModules(['config_install_dependency_test']);
     $entity = \Drupal::entityManager()->getStorage('config_test')->load('other_module_test_with_dependency');
-    $this->assertTrue($entity, 'The config_test.dynamic.other_module_test_with_dependency configuration has been created during install.');
+    $this->assertNotEmpty($entity, 'The config_test.dynamic.other_module_test_with_dependency configuration has been created during install.');
     // Ensure that dependencies can be added during module installation by
     // hooks.
     $this->assertIdentical('config_install_dependency_test', $entity->getDependencies()['module'][0]);
diff --git a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
index 04ba8ad..8e8c1dd 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
@@ -58,7 +58,7 @@ public function testArrayArgumentsSQLInjection() {
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertFalse($result, 'SQL injection attempt did not result in a row being inserted in the database table.');
+    $this->assertEmpty($result, 'SQL injection attempt did not result in a row being inserted in the database table.');
   }
 
   /**
@@ -89,7 +89,7 @@ public function testConditionOperatorArgumentsSQLInjection() {
       ->countQuery()
       ->execute()
       ->fetchField();
-    $this->assertFalse($result, 'SQL injection attempt did not result in a row being inserted in the database table.');
+    $this->assertEmpty($result, 'SQL injection attempt did not result in a row being inserted in the database table.');
 
     // Attempt SQLi via union query with no unsafe characters.
     $this->enableModules(['user']);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
index 66e1abb..a81d70a 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
@@ -203,7 +203,7 @@ public function testChanged() {
     $query = $this->mulChangedStorage->getQuery();
     $ids = $query->condition('changed', $changed_de, '=', 'en')->execute();
 
-    $this->assertFalse(
+    $this->assertEmpty(
       $ids,
       'There\'s no original entity stored having the changed time of the German translation.'
     );
@@ -219,7 +219,7 @@ public function testChanged() {
     $query = $this->mulChangedStorage->getQuery();
     $ids = $query->condition('changed', $changed_de)->condition('default_langcode', '1')->execute();
 
-    $this->assertFalse(
+    $this->assertEmpty(
       $ids,
       'There\'s no entity stored using the default language having the changed time of the German translation.'
     );
@@ -243,7 +243,7 @@ public function testChanged() {
     $query = $this->mulChangedStorage->getQuery();
     $ids = $query->condition('changed', $changed_en, '=', 'de')->execute();
 
-    $this->assertFalse(
+    $this->assertEmpty(
       $ids,
       'There\'s no German translation stored having the changed time of the original language.'
     );
@@ -275,7 +275,7 @@ public function testChanged() {
     $query = $this->mulChangedStorage->getQuery();
     $ids = $query->condition('changed', $changed_en, '>')->execute();
 
-    $this->assertFalse(
+    $this->assertEmpty(
       $ids,
       'Entity query can access changed time regardless of translation.'
     );
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
index e0bf655..a31c11e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
@@ -615,12 +615,12 @@ public function getContainedStrings(TypedDataInterface $wrapper, $depth, array &
   public function testDataTypes() {
     $types = \Drupal::typedDataManager()->getDefinitions();
     foreach (entity_test_entity_types() as $entity_type) {
-      $this->assertTrue($types['entity:' . $entity_type]['class'], 'Entity data type registered.');
+      $this->assertNotEmpty($types['entity:' . $entity_type]['class'], 'Entity data type registered.');
     }
     // Check bundle types are provided as well.
     entity_test_create_bundle('bundle');
     $types = \Drupal::typedDataManager()->getDefinitions();
-    $this->assertTrue($types['entity:entity_test:bundle']['class'], 'Entity bundle data type registered.');
+    $this->assertNotEmpty($types['entity:entity_test:bundle']['class'], 'Entity bundle data type registered.');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
index 5c7e51c..30bcc0e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
@@ -481,7 +481,7 @@ public function testCount() {
       ->exists("$field_name.color")
       ->count()
       ->execute();
-    $this->assertFalse($count);
+    $this->assertEquals(0, $count);
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
index fe8bcc0..59b333d 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
@@ -335,7 +335,7 @@ protected function doTestEntityTranslationAPI($entity_type) {
 
     $entity->save();
     $hooks = $this->getHooksInfo();
-    $this->assertFalse($hooks, 'No entity translation hooks are fired when creating an entity.');
+    $this->assertEmpty($hooks, 'No entity translation hooks are fired when creating an entity.');
 
     // Verify that we obtain the entity object itself when we attempt to
     // retrieve a translation referring to it.
@@ -507,7 +507,7 @@ protected function doTestEntityTranslationAPI($entity_type) {
     $this->assertTrue(isset($hooks[$entity_type . '_translation_create']), 'The entity-type-specific entity translation creation hook is run when adding and removing a translation without storing it.');
     unset($hooks[$entity_type . '_translation_create']);
 
-    $this->assertFalse($hooks, 'No other hooks beyond the entity translation creation hooks are run when adding and removing a translation without storing it.');
+    $this->assertEmpty($hooks, 'No other hooks beyond the entity translation creation hooks are run when adding and removing a translation without storing it.');
 
     // Check that hooks are fired only when actually storing data.
     $entity = $this->reloadEntity($entity);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
index a3466a4..51bf5ae 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
@@ -55,7 +55,7 @@ protected function assertCRUD($entity_type) {
       ->getStorage($entity_type)
       ->create(['name' => $this->randomMachineName()]);
     $uuid = $entity->uuid();
-    $this->assertTrue($uuid);
+    $this->assertNotEmpty($uuid);
 
     // Verify that the new UUID is different.
     $this->assertNotEqual($custom_entity->uuid(), $uuid);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php
index e1537bc..13b711b 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php
@@ -65,7 +65,7 @@ public function testEntityViewBuilderCache() {
 
     // Test that a cache entry is created.
     $renderer->renderRoot($build);
-    $this->assertTrue($this->container->get('cache.' . $bin)->get($cid), 'The entity render element has been cached.');
+    $this->assertNotEmpty($this->container->get('cache.' . $bin)->get($cid), 'The entity render element has been cached.');
 
     // Re-save the entity and check that the cache entry has been deleted.
     $cache->set('kittens', 'Kitten data', Cache::PERMANENT, $build['#cache']['tags']);
@@ -77,7 +77,7 @@ public function testEntityViewBuilderCache() {
     // delete the entity to check the cache entry is deleted.
     unset($build['#printed']);
     $renderer->renderRoot($build);
-    $this->assertTrue($this->container->get('cache.' . $bin)->get($cid), 'The entity render element has been cached.');
+    $this->assertNotEmpty($this->container->get('cache.' . $bin)->get($cid), 'The entity render element has been cached.');
     $entity_test->delete();
     $this->assertFalse($this->container->get('cache.' . $bin)->get($cid), 'The entity render cache has been cleared when the entity was deleted.');
 
@@ -119,7 +119,7 @@ public function testEntityViewBuilderCacheWithReferences() {
     $renderer->renderRoot($build);
 
     // Test that a cache entry was created for the referenced entity.
-    $this->assertTrue($this->container->get('cache.' . $bin_reference)->get($cid_reference), 'The entity render element for the referenced entity has been cached.');
+    $this->assertNotEmpty($this->container->get('cache.' . $bin_reference)->get($cid_reference), 'The entity render element for the referenced entity has been cached.');
 
     // Create another entity that references the first one.
     $entity_test = $this->createTestEntity('entity_test');
@@ -138,7 +138,7 @@ public function testEntityViewBuilderCacheWithReferences() {
     $renderer->renderRoot($build);
 
     // Test that a cache entry is created.
-    $this->assertTrue($this->container->get('cache.' . $bin)->get($cid), 'The entity render element has been cached.');
+    $this->assertNotEmpty($this->container->get('cache.' . $bin)->get($cid), 'The entity render element has been cached.');
 
     // Save the entity and verify that both cache entries have been deleted.
     $entity_test_reference->save();
diff --git a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
index 00dfa0b..fd2dfc1 100644
--- a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
@@ -51,15 +51,15 @@ public function testReadOnlyBehavior() {
     $this->assertFalse($handle, 'Unable to open a file for reading and writing with the read-only stream wrapper.');
     // Attempt to open a file in binary read mode
     $handle = fopen($uri, 'rb');
-    $this->assertTrue($handle, 'Able to open a file for reading in binary mode with the read-only stream wrapper.');
+    $this->assertNotFalse($handle, 'Able to open a file for reading in binary mode with the read-only stream wrapper.');
     $this->assertTrue(fclose($handle), 'Able to close file opened in binary mode using the read_only stream wrapper.');
     // Attempt to open a file in text read mode
     $handle = fopen($uri, 'rt');
-    $this->assertTrue($handle, 'Able to open a file for reading in text mode with the read-only stream wrapper.');
+    $this->assertNotFalse($handle, 'Able to open a file for reading in text mode with the read-only stream wrapper.');
     $this->assertTrue(fclose($handle), 'Able to close file opened in text mode using the read_only stream wrapper.');
     // Attempt to open a file in read mode
     $handle = fopen($uri, 'r');
-    $this->assertTrue($handle, 'Able to open a file for reading with the read-only stream wrapper.');
+    $this->assertNotFalse($handle, 'Able to open a file for reading with the read-only stream wrapper.');
     // Attempt to change file permissions
     $this->assertFalse(@chmod($uri, 0777), 'Unable to change file permissions when using read-only stream wrapper.');
     // Attempt to acquire an exclusive lock for writing
@@ -71,7 +71,7 @@ public function testReadOnlyBehavior() {
     // Attempt to truncate the file
     $this->assertFalse(@ftruncate($handle, 0), 'Unable to truncate using the read-only stream wrapper.');
     // Attempt to write to the file
-    $this->assertFalse(@fwrite($handle, $this->randomMachineName()), 'Unable to write to file using the read-only stream wrapper.');
+    $this->assertEquals(0, @fwrite($handle, $this->randomMachineName()), 'Unable to write to file using the read-only stream wrapper.');
     // Attempt to flush output to the file
     $this->assertFalse(@fflush($handle), 'Unable to flush output to file using the read-only stream wrapper.');
     // Attempt to close the stream.  (Suppress errors, as fclose triggers fflush.)
diff --git a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
index 6c18b66..ac25549 100644
--- a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
@@ -81,8 +81,8 @@ public function testUriFunctions() {
     $this->assertEqual(file_uri_target('public://foo/bar.txt'), 'foo/bar.txt', 'Got a valid stream target from public://foo/bar.txt.');
     $this->assertEqual(file_uri_target('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='), 'image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==', t('Got a valid stream target from a data URI.'));
     $this->assertFalse(file_uri_target('foo/bar.txt'), 'foo/bar.txt is not a valid stream.');
-    $this->assertFalse(file_uri_target('public://'), 'public:// has no target.');
-    $this->assertFalse(file_uri_target('data:'), 'data: has no target.');
+    $this->assertEquals('', file_uri_target('public://'), 'public:// has no target.');
+    $this->assertEquals('', file_uri_target('data:'), 'data: has no target.');
 
     // Test file_build_uri() and
     // Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath().
@@ -96,9 +96,9 @@ public function testUriFunctions() {
     // TemporaryStream::getExternalUrl() uses Url::fromRoute(), which needs
     // route information to work.
     $this->container->get('router.builder')->rebuild();
-    $this->assertTrue(strpos(file_create_url('temporary://test.txt'), 'system/temporary?file=test.txt'), 'Temporary external URL correctly built.');
-    $this->assertTrue(strpos(file_create_url('public://test.txt'), Settings::get('file_public_path') . '/test.txt'), 'Public external URL correctly built.');
-    $this->assertTrue(strpos(file_create_url('private://test.txt'), 'system/files/test.txt'), 'Private external URL correctly built.');
+    $this->assertContains('system/temporary?file=test.txt', file_create_url('temporary://test.txt'), 'Temporary external URL correctly built.');
+    $this->assertContains(Settings::get('file_public_path') . '/test.txt', file_create_url('public://test.txt'), 'Public external URL correctly built.');
+    $this->assertContains('system/files/test.txt', file_create_url('private://test.txt'), 'Private external URL correctly built.');
   }
 
   /**
@@ -110,7 +110,7 @@ public function testFileFunctions() {
 
     // Open for rw and place pointer at beginning of file so select will return.
     $handle = fopen($filename, 'c+');
-    $this->assertTrue($handle, 'Able to open a file for appending, reading and writing.');
+    $this->assertNotFalse($handle, 'Able to open a file for appending, reading and writing.');
 
     // Attempt to change options on the file stream: should all fail.
     $this->assertFalse(@stream_set_blocking($handle, 0), 'Unable to set to non blocking using a local stream wrapper.');
diff --git a/core/tests/Drupal/KernelTests/Core/File/UnmanagedCopyTest.php b/core/tests/Drupal/KernelTests/Core/File/UnmanagedCopyTest.php
index d3c5cd4..35031b4 100644
--- a/core/tests/Drupal/KernelTests/Core/File/UnmanagedCopyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/UnmanagedCopyTest.php
@@ -21,7 +21,7 @@ public function testNormal() {
     // Copying to a new name.
     $desired_filepath = 'public://' . $this->randomMachineName();
     $new_filepath = file_unmanaged_copy($uri, $desired_filepath, FILE_EXISTS_ERROR);
-    $this->assertTrue($new_filepath, 'Copy was successful.');
+    $this->assertNotFalse($new_filepath, 'Copy was successful.');
     $this->assertEqual($new_filepath, $desired_filepath, 'Returned expected filepath.');
     $this->assertTrue(file_exists($uri), 'Original file remains.');
     $this->assertTrue(file_exists($new_filepath), 'New file exists.');
@@ -29,9 +29,9 @@ public function testNormal() {
 
     // Copying with rename.
     $desired_filepath = 'public://' . $this->randomMachineName();
-    $this->assertTrue(file_put_contents($desired_filepath, ' '), 'Created a file so a rename will have to happen.');
+    $this->assertEquals(1, file_put_contents($desired_filepath, ' '), 'Created a file so a rename will have to happen.');
     $newer_filepath = file_unmanaged_copy($uri, $desired_filepath, FILE_EXISTS_RENAME);
-    $this->assertTrue($newer_filepath, 'Copy was successful.');
+    $this->assertNotFalse($newer_filepath, 'Copy was successful.');
     $this->assertNotEqual($newer_filepath, $desired_filepath, 'Returned expected filepath.');
     $this->assertTrue(file_exists($uri), 'Original file remains.');
     $this->assertTrue(file_exists($newer_filepath), 'New file exists.');
@@ -61,7 +61,7 @@ public function testOverwriteSelf() {
 
     // Copy the file onto itself with renaming works.
     $new_filepath = file_unmanaged_copy($uri, $uri, FILE_EXISTS_RENAME);
-    $this->assertTrue($new_filepath, 'Copying onto itself with renaming works.');
+    $this->assertNotFalse($new_filepath, 'Copying onto itself with renaming works.');
     $this->assertNotEqual($new_filepath, $uri, 'Copied file has a new name.');
     $this->assertTrue(file_exists($uri), 'Original file exists after copying onto itself.');
     $this->assertTrue(file_exists($new_filepath), 'Copied file exists after copying onto itself.');
@@ -79,7 +79,7 @@ public function testOverwriteSelf() {
 
     // Copy the file into same directory with renaming works.
     $new_filepath = file_unmanaged_copy($uri, drupal_dirname($uri), FILE_EXISTS_RENAME);
-    $this->assertTrue($new_filepath, 'Copying into same directory works.');
+    $this->assertNotFalse($new_filepath, 'Copying into same directory works.');
     $this->assertNotEqual($new_filepath, $uri, 'Copied file has a new name.');
     $this->assertTrue(file_exists($uri), 'Original file exists after copying onto itself.');
     $this->assertTrue(file_exists($new_filepath), 'Copied file exists after copying onto itself.');
diff --git a/core/tests/Drupal/KernelTests/Core/File/UnmanagedMoveTest.php b/core/tests/Drupal/KernelTests/Core/File/UnmanagedMoveTest.php
index 8619a15..1d57a50 100644
--- a/core/tests/Drupal/KernelTests/Core/File/UnmanagedMoveTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/UnmanagedMoveTest.php
@@ -21,7 +21,7 @@ public function testNormal() {
     // Moving to a new name.
     $desired_filepath = 'public://' . $this->randomMachineName();
     $new_filepath = file_unmanaged_move($uri, $desired_filepath, FILE_EXISTS_ERROR);
-    $this->assertTrue($new_filepath, 'Move was successful.');
+    $this->assertNotFalse($new_filepath, 'Move was successful.');
     $this->assertEqual($new_filepath, $desired_filepath, 'Returned expected filepath.');
     $this->assertTrue(file_exists($new_filepath), 'File exists at the new location.');
     $this->assertFalse(file_exists($uri), 'No file remains at the old location.');
@@ -30,9 +30,9 @@ public function testNormal() {
     // Moving with rename.
     $desired_filepath = 'public://' . $this->randomMachineName();
     $this->assertTrue(file_exists($new_filepath), 'File exists before moving.');
-    $this->assertTrue(file_put_contents($desired_filepath, ' '), 'Created a file so a rename will have to happen.');
+    $this->assertEquals(1, file_put_contents($desired_filepath, ' '), 'Created a file so a rename will have to happen.');
     $newer_filepath = file_unmanaged_move($new_filepath, $desired_filepath, FILE_EXISTS_RENAME);
-    $this->assertTrue($newer_filepath, 'Move was successful.');
+    $this->assertNotFalse($newer_filepath, 'Move was successful.');
     $this->assertNotEqual($newer_filepath, $desired_filepath, 'Returned expected filepath.');
     $this->assertTrue(file_exists($newer_filepath), 'File exists at the new location.');
     $this->assertFalse(file_exists($new_filepath), 'No file remains at the old location.');
@@ -65,7 +65,7 @@ public function testOverwriteSelf() {
 
     // Move the file onto itself with renaming will result in a new filename.
     $new_filepath = file_unmanaged_move($uri, $uri, FILE_EXISTS_RENAME);
-    $this->assertTrue($new_filepath, 'Moving onto itself with renaming works.');
+    $this->assertNotFalse($new_filepath, 'Moving onto itself with renaming works.');
     $this->assertFalse(file_exists($uri), 'Original file has been removed.');
     $this->assertTrue(file_exists($new_filepath), 'File exists after moving onto itself.');
   }
diff --git a/core/tests/Drupal/KernelTests/Core/File/UnmanagedSaveDataTest.php b/core/tests/Drupal/KernelTests/Core/File/UnmanagedSaveDataTest.php
index 5493323..08097e1 100644
--- a/core/tests/Drupal/KernelTests/Core/File/UnmanagedSaveDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/UnmanagedSaveDataTest.php
@@ -17,13 +17,13 @@ public function testFileSaveData() {
 
     // No filename.
     $filepath = file_unmanaged_save_data($contents);
-    $this->assertTrue($filepath, 'Unnamed file saved correctly.');
+    $this->assertNotFalse($filepath, 'Unnamed file saved correctly.');
     $this->assertEqual(file_uri_scheme($filepath), file_default_scheme(), "File was placed in Drupal's files directory.");
     $this->assertEqual($contents, file_get_contents($filepath), 'Contents of the file are correct.');
 
     // Provide a filename.
     $filepath = file_unmanaged_save_data($contents, 'public://asdf.txt', FILE_EXISTS_REPLACE);
-    $this->assertTrue($filepath, 'Unnamed file saved correctly.');
+    $this->assertNotFalse($filepath, 'Unnamed file saved correctly.');
     $this->assertEqual('asdf.txt', drupal_basename($filepath), 'File was named correctly.');
     $this->assertEqual($contents, file_get_contents($filepath), 'Contents of the file are correct.');
     $this->assertFilePermissions($filepath, 0777);
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
index 6425a30..c68ef60 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
@@ -68,14 +68,14 @@ public function testCacheToken() {
     \Drupal::state()->set('system.private_key', 'invalid');
     $cached_form_state = new FormState();
     $cached_form = \Drupal::formBuilder()->getCache($this->formBuildId, $cached_form_state);
-    $this->assertFalse($cached_form, 'No form returned from cache');
+    $this->assertEmpty($cached_form, 'No form returned from cache');
     $cached_form_state_example = $cached_form_state->get('example');
     $this->assertTrue(empty($cached_form_state_example));
 
     // Test that loading the cache with a different form_id fails.
     $wrong_form_build_id = $this->randomMachineName(9);
     $cached_form_state = new FormState();
-    $this->assertFalse(\Drupal::formBuilder()->getCache($wrong_form_build_id, $cached_form_state), 'No form returned from cache');
+    $this->assertEmpty(\Drupal::formBuilder()->getCache($wrong_form_build_id, $cached_form_state), 'No form returned from cache');
     $cached_form_state_example = $cached_form_state->get('example');
     $this->assertTrue(empty($cached_form_state_example), 'Cached form state was not loaded');
   }
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
index 2d543cb..0573c3c 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
@@ -46,13 +46,13 @@ public function testCRUDWithExpiration() {
     $stores[0]->setWithExpire('foo', $this->objects[0], rand(500, 100000));
     $this->assertIdenticalObject($this->objects[0], $stores[0]->get('foo'));
     // Verify that the other collection is not affected.
-    $this->assertFalse($stores[1]->get('foo'));
+    $this->assertEmpty($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'));
     // Verify that the other collection is still not affected.
-    $this->assertFalse($stores[1]->get('foo'));
+    $this->assertEmpty($stores[1]->get('foo'));
 
     // Verify that the expirable data key is unique.
     $stores[1]->setWithExpire('foo', $this->objects[2], rand(500, 100000));
@@ -72,7 +72,7 @@ public function testCRUDWithExpiration() {
 
     // Verify that the other collection was not affected.
     $this->assertIdenticalObject($stores[1]->get('foo'), $this->objects[2]);
-    $this->assertFalse($stores[1]->get('bar'));
+    $this->assertEmpty($stores[1]->get('bar'));
 
     // Verify that all items in a collection can be retrieved.
     // Ensure that an item with the same name exists in the other collection.
@@ -103,7 +103,7 @@ public function testCRUDWithExpiration() {
       $this->assertEqual(!$i, $stores[0]->setWithExpireIfNotExists($key, $this->objects[$i], rand(500, 100000)));
       $this->assertIdenticalObject($this->objects[0], $stores[0]->get($key));
       // Verify that the other collection is not affected.
-      $this->assertFalse($stores[1]->get($key));
+      $this->assertEmpty($stores[1]->get($key));
     }
 
     // Remove the item and try to set it again.
@@ -112,7 +112,7 @@ public function testCRUDWithExpiration() {
     // This time it should succeed.
     $this->assertIdenticalObject($this->objects[1], $stores[0]->get($key));
     // Verify that the other collection is still not affected.
-    $this->assertFalse($stores[1]->get($key));
+    $this->assertEmpty($stores[1]->get($key));
 
   }
 
@@ -129,7 +129,7 @@ public function testExpiration() {
 
     // Only the non-expired item should be returned.
     $this->assertFalse($stores[0]->has('yesterday'));
-    $this->assertFalse($stores[0]->get('yesterday'));
+    $this->assertEmpty($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);
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
index 31300db..1b5c9f2 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
@@ -38,14 +38,14 @@ public function testCRUD() {
     $empty = EntityTestLabel::create();
     $this->assertIdentical($empty->id->value, NULL);
     $this->assertIdentical($empty->name->value, NULL);
-    $this->assertTrue($empty->uuid->value);
+    $this->assertNotEmpty($empty->uuid->value);
     $this->assertIdentical($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->assertTrue($empty->uuid());
+    $this->assertNotEmpty($empty->uuid());
     $this->assertIdentical($empty->label(), NULL);
 
     // Verify Entity properties/methods on the newly created empty entity.
@@ -87,7 +87,7 @@ public function testCRUD() {
       'name' => $this->randomString(),
     ]);
     $this->assertIdentical($entity_test->id->value, $expected['id']);
-    $this->assertTrue($entity_test->uuid->value);
+    $this->assertNotEmpty($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);
@@ -95,7 +95,7 @@ public function testCRUD() {
     // Verify methods on the newly created entity.
     $this->assertIdentical($entity_test->isNew(), TRUE);
     $this->assertIdentical($entity_test->id(), $expected['id']);
-    $this->assertTrue($entity_test->uuid());
+    $this->assertNotEmpty($entity_test->uuid());
     $expected['uuid'] = $entity_test->uuid();
     $this->assertIdentical($entity_test->label(), $expected['name']);
 
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
index 7651234..9ff11b4 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
@@ -57,13 +57,13 @@ public function testCRUD() {
     $this->assertIdenticalObject($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'));
+    $this->assertEmpty($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'));
     // Verify that the other collection is still not affected.
-    $this->assertFalse($stores[1]->get('foo'));
+    $this->assertEmpty($stores[1]->get('foo'));
 
     // Verify that a collection/name pair is unique.
     $stores[1]->set('foo', $this->objects[2]);
@@ -73,13 +73,13 @@ public function testCRUD() {
     // Verify that an item can be deleted.
     $stores[0]->delete('foo');
     $this->assertFalse($stores[0]->has('foo'));
-    $this->assertFalse($stores[0]->get('foo'));
+    $this->assertEmpty($stores[0]->get('foo'));
 
     // Verify that the other collection is not affected.
     $this->assertTrue($stores[1]->has('foo'));
     $this->assertIdenticalObject($this->objects[2], $stores[1]->get('foo'));
     $stores[1]->delete('foo');
-    $this->assertFalse($stores[1]->get('foo'));
+    $this->assertEmpty($stores[1]->get('foo'));
 
     // Verify that multiple items can be stored.
     $values = [
@@ -95,8 +95,8 @@ public function testCRUD() {
     }
 
     // Verify that the other collection was not affected.
-    $this->assertFalse($stores[1]->get('foo'));
-    $this->assertFalse($stores[1]->get('bar'));
+    $this->assertEmpty($stores[1]->get('foo'));
+    $this->assertEmpty($stores[1]->get('bar'));
 
     // Verify that all items in a collection can be retrieved.
     // Ensure that an item with the same name exists in the other collection.
@@ -165,7 +165,7 @@ public function testSetIfNotExists() {
       $this->assertEqual(!$i, $stores[0]->setIfNotExists($key, $this->objects[$i]));
       $this->assertIdenticalObject($this->objects[0], $stores[0]->get($key));
       // Verify that the other collection is not affected.
-      $this->assertFalse($stores[1]->get($key));
+      $this->assertEmpty($stores[1]->get($key));
     }
 
     // Remove the item and try to set it again.
@@ -174,7 +174,7 @@ public function testSetIfNotExists() {
     // This time it should succeed.
     $this->assertIdenticalObject($this->objects[1], $stores[0]->get($key));
     // Verify that the other collection is still not affected.
-    $this->assertFalse($stores[1]->get($key));
+    $this->assertEmpty($stores[1]->get($key));
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
index ad3f04d..349468d 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
@@ -353,7 +353,7 @@ public function testLoadByProperties() {
         $this->fail($message);
       }
       catch (\InvalidArgumentException $e) {
-        $this->assertTrue(preg_match('/^An invalid property name, .+ was specified. Allowed property names are:/', $e->getMessage()), 'Found expected exception message.');
+        $this->assertNotEmpty(preg_match('/^An invalid property name, .+ was specified. Allowed property names are:/', $e->getMessage()), 'Found expected exception message.');
         $this->pass($message);
       }
     }
diff --git a/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
index 8bf4834..b2040ee 100644
--- a/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
@@ -76,8 +76,8 @@ protected function queueTest($queue1, $queue2) {
     $queue1->createItem($data[2]);
     $queue1->createItem($data[3]);
 
-    $this->assertTrue($queue1->numberOfItems(), 'Queue 1 is not empty after adding items.');
-    $this->assertFalse($queue2->numberOfItems(), 'Queue 2 is empty while Queue 1 has items');
+    $this->assertNotEmpty($queue1->numberOfItems(), 'Queue 1 is not empty after adding items.');
+    $this->assertEmpty($queue2->numberOfItems(), 'Queue 2 is empty while Queue 1 has items');
 
     $items[] = $item = $queue1->claimItem();
     $new_items[] = $item->data;
@@ -98,8 +98,8 @@ protected function queueTest($queue1, $queue2) {
     }
 
     // Check that both queues are empty.
-    $this->assertFalse($queue1->numberOfItems(), 'Queue 1 is empty');
-    $this->assertFalse($queue2->numberOfItems(), 'Queue 2 is empty');
+    $this->assertEmpty($queue1->numberOfItems(), 'Queue 1 is empty');
+    $this->assertEmpty($queue2->numberOfItems(), 'Queue 2 is empty');
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
index 906e74b..dba7909 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
@@ -190,7 +190,7 @@ public function testMoreLink() {
     foreach ($elements as $element) {
       $xml = new \SimpleXMLElement(\Drupal::service('renderer')->renderRoot($element['value']));
       $result = $xml->xpath($element['expected']);
-      $this->assertTrue($result, '"' . $element['name'] . '" input rendered correctly by drupal_render().');
+      $this->assertNotEmpty($result, '"' . $element['name'] . '" input rendered correctly by drupal_render().');
     }
   }
 
@@ -221,7 +221,7 @@ public function testSystemCompactLink() {
     foreach ($elements as $element) {
       $xml = new \SimpleXMLElement(\Drupal::service('renderer')->renderRoot($element['value']));
       $result = $xml->xpath($element['expected']);
-      $this->assertTrue($result, '"' . $element['name'] . '" is rendered correctly by drupal_render().');
+      $this->assertNotEmpty($result, '"' . $element['name'] . '" is rendered correctly by drupal_render().');
     }
 
     // Set admin compact mode on for additional tests.
@@ -237,7 +237,7 @@ public function testSystemCompactLink() {
 
     $xml = new \SimpleXMLElement(\Drupal::service('renderer')->renderRoot($element['value']));
     $result = $xml->xpath($element['expected']);
-    $this->assertTrue($result, '"' . $element['name'] . '" is rendered correctly by drupal_render().');
+    $this->assertNotEmpty($result, '"' . $element['name'] . '" is rendered correctly by drupal_render().');
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
index ed59f2f..760a728 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
@@ -534,7 +534,7 @@ public function testOutlinePathNoMatch() {
 
 
     $routes = $provider->getRoutesByPattern($path);
-    $this->assertFalse(count($routes), 'No path found with this pattern.');
+    $this->assertEmpty(count($routes), 'No path found with this pattern.');
 
     $collection = $provider->getRouteCollectionForRequest($request);
     $this->assertTrue(count($collection) == 0, 'Empty route collection found with this pattern.');
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
index a962fec..c615c27 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
@@ -39,10 +39,10 @@ public function testRaceCondition() {
     $lock_backend = \Drupal::lock();
     $registry = new ThemeRegistry($cid, $cache, $lock_backend, ['theme_registry'], $this->container->get('module_handler')->isLoaded());
 
-    $this->assertTrue(\Drupal::cache()->get($cid), 'Cache entry was created.');
+    $this->assertNotEmpty(\Drupal::cache()->get($cid), 'Cache entry was created.');
 
     // Trigger a cache miss for an offset.
-    $this->assertTrue($registry->get('theme_test_template_test'), 'Offset was returned correctly from the theme registry.');
+    $this->assertNotEmpty($registry->get('theme_test_template_test'), 'Offset was returned correctly from the theme registry.');
     // This will cause the ThemeRegistry class to write an updated version of
     // the cache entry when it is destroyed, usually at the end of the request.
     // Before that happens, manually delete the cache entry we created earlier
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
index 61f6475..6b31e35 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
@@ -85,7 +85,7 @@ public function testInstallSubTheme() {
     $base_name = 'test_basetheme';
 
     $themes = $this->themeHandler()->listInfo();
-    $this->assertFalse(array_keys($themes));
+    $this->assertEmpty(array_keys($themes));
 
     $this->themeInstaller()->install([$name]);
 
@@ -107,7 +107,7 @@ public function testInstallNonExisting() {
     $name = 'non_existing_theme';
 
     $themes = $this->themeHandler()->listInfo();
-    $this->assertFalse(array_keys($themes));
+    $this->assertEmpty(array_keys($themes));
 
     try {
       $message = 'ThemeHandler::install() throws InvalidArgumentException upon installing a non-existing theme.';
@@ -119,7 +119,7 @@ public function testInstallNonExisting() {
     }
 
     $themes = $this->themeHandler()->listInfo();
-    $this->assertFalse(array_keys($themes));
+    $this->assertEmpty(array_keys($themes));
   }
 
   /**
@@ -244,7 +244,7 @@ public function testUninstallNonExisting() {
     $name = 'non_existing_theme';
 
     $themes = $this->themeHandler()->listInfo();
-    $this->assertFalse(array_keys($themes));
+    $this->assertEmpty(array_keys($themes));
 
     try {
       $message = 'ThemeHandler::uninstall() throws InvalidArgumentException upon uninstalling a non-existing theme.';
@@ -256,7 +256,7 @@ public function testUninstallNonExisting() {
     }
 
     $themes = $this->themeHandler()->listInfo();
-    $this->assertFalse(array_keys($themes));
+    $this->assertEmpty(array_keys($themes));
   }
 
   /**
@@ -281,7 +281,7 @@ public function testUninstall() {
     $this->assertTrue(isset($themes[$name]));
     $this->assertEqual($themes[$name]->getName(), $name);
     $this->assertEqual(array_keys(system_list('theme')), array_keys($themes));
-    $this->assertTrue($this->config("$name.settings")->get());
+    $this->assertNotEmpty($this->config("$name.settings")->get());
   }
 
   /**
