diff --git a/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php b/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
index b0023ec0b8..3c99a666ef 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
@@ -54,9 +54,8 @@ public function testQueryFetchArray() {
     $result = $this->connection->query('SELECT name FROM {test} WHERE age = :age', [':age' => 25], ['fetch' => \PDO::FETCH_ASSOC]);
     foreach ($result as $record) {
       $records[] = $record;
-      if ($this->assertTrue(is_array($record), 'Record is an array.')) {
-        $this->assertIdentical($record['name'], 'John', 'Record can be accessed associatively.');
-      }
+      $this->assertTrue(is_array($record), 'Record is an array.');
+      $this->assertIdentical($record['name'], 'John', 'Record can be accessed associatively.');
     }
 
     $this->assertIdentical(count($records), 1, 'There is only one record.');
@@ -72,9 +71,8 @@ public function testQueryFetchClass() {
     $result = $this->connection->query('SELECT name FROM {test} WHERE age = :age', [':age' => 25], ['fetch' => FakeRecord::class]);
     foreach ($result as $record) {
       $records[] = $record;
-      if ($this->assertTrue($record instanceof FakeRecord, 'Record is an object of class FakeRecord.')) {
-        $this->assertIdentical($record->name, 'John', '25 year old is John.');
-      }
+      $this->assertTrue($record instanceof FakeRecord, 'Record is an object of class FakeRecord.');
+      $this->assertIdentical($record->name, 'John', '25 year old is John.');
     }
 
     $this->assertIdentical(count($records), 1, 'There is only one record.');
@@ -108,10 +106,9 @@ public function testQueryFetchClasstype() {
     $result = $this->connection->query('SELECT classname, name, job FROM {test_classtype} WHERE age = :age', [':age' => 26], ['fetch' => \PDO::FETCH_CLASS | \PDO::FETCH_CLASSTYPE]);
     foreach ($result as $record) {
       $records[] = $record;
-      if ($this->assertTrue($record instanceof FakeRecord, 'Record is an object of class FakeRecord.')) {
-        $this->assertSame('Kay', $record->name, 'Kay is found.');
-        $this->assertSame('Web Developer', $record->job, 'A 26 year old Web Developer.');
-      }
+      $this->assertTrue($record instanceof FakeRecord, 'Record is an object of class FakeRecord.');
+      $this->assertSame('Kay', $record->name, 'Kay is found.');
+      $this->assertSame('Web Developer', $record->job, 'A 26 year old Web Developer.');
       $this->assertFalse(isset($record->classname), 'Classname field not found, as intended.');
     }
 
@@ -126,9 +123,8 @@ public function testQueryFetchNum() {
     $result = $this->connection->query('SELECT name FROM {test} WHERE age = :age', [':age' => 25], ['fetch' => \PDO::FETCH_NUM]);
     foreach ($result as $record) {
       $records[] = $record;
-      if ($this->assertTrue(is_array($record), 'Record is an array.')) {
-        $this->assertIdentical($record[0], 'John', 'Record can be accessed numerically.');
-      }
+      $this->assertTrue(is_array($record), 'Record is an array.');
+      $this->assertIdentical($record[0], 'John', 'Record can be accessed numerically.');
     }
 
     $this->assertIdentical(count($records), 1, 'There is only one record');
@@ -142,10 +138,9 @@ public function testQueryFetchBoth() {
     $result = $this->connection->query('SELECT name FROM {test} WHERE age = :age', [':age' => 25], ['fetch' => \PDO::FETCH_BOTH]);
     foreach ($result as $record) {
       $records[] = $record;
-      if ($this->assertTrue(is_array($record), 'Record is an array.')) {
-        $this->assertIdentical($record[0], 'John', 'Record can be accessed numerically.');
-        $this->assertIdentical($record['name'], 'John', 'Record can be accessed associatively.');
-      }
+      $this->assertTrue(is_array($record), 'Record is an array.');
+      $this->assertIdentical($record[0], 'John', 'Record can be accessed numerically.');
+      $this->assertIdentical($record['name'], 'John', 'Record can be accessed associatively.');
     }
 
     $this->assertIdentical(count($records), 1, 'There is only one record.');
