diff --git a/core/lib/Drupal/Core/Test/AssertMailTrait.php b/core/lib/Drupal/Core/Test/AssertMailTrait.php index 5adc24efa2a1d075861d11ba25c4c4486f7be2db..0d138020efdc8a96a47af35b9356df0dfa33c8aa 100644 --- a/core/lib/Drupal/Core/Test/AssertMailTrait.php +++ b/core/lib/Drupal/Core/Test/AssertMailTrait.php @@ -87,9 +87,6 @@ protected function assertMail($name, $value = '', $message = '', $group = 'Email * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Other'; most tests do not override * this default. - * - * @return bool - * TRUE on pass, FALSE on fail. */ protected function assertMailString($field_name, $string, $email_depth, $message = '', $group = 'Other') { $mails = $this->getMails(); @@ -110,7 +107,7 @@ protected function assertMailString($field_name, $string, $email_depth, $message if (!$message) { $message = new FormattableMarkup('Expected text found in @field of email message: "@expected".', ['@field' => $field_name, '@expected' => $string]); } - return $this->assertTrue($string_found, $message, $group); + $this->assertTrue($string_found, $message, $group); } /** @@ -130,9 +127,6 @@ protected function assertMailString($field_name, $string, $email_depth, $message * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Other'; most tests do not override * this default. - * - * @return bool - * TRUE on pass, FALSE on fail. */ protected function assertMailPattern($field_name, $regex, $message = '', $group = 'Other') { $mails = $this->getMails(); @@ -141,7 +135,7 @@ protected function assertMailPattern($field_name, $regex, $message = '', $group if (!$message) { $message = new FormattableMarkup('Expected text found in @field of email message: "@expected".', ['@field' => $field_name, '@expected' => $regex]); } - return $this->assertTrue((bool) $regex_found, $message, $group); + $this->assertTrue((bool) $regex_found, $message, $group); } /** diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php index effcb7b78e4ba9c2bc2d47e4a6f5ada05018b1be..e2c8ddff9d14ec2bf63b9da2ddf4ae25e2b34921 100644 --- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php @@ -1139,12 +1139,9 @@ public function testHtmlCorrectorFilter() { * (optional) Message to display if failed. Defaults to an empty string. * @param string $group * (optional) The group this message belongs to. Defaults to 'Other'. - * - * @return bool - * TRUE on pass, FALSE on fail. */ public function assertNormalized($haystack, $needle, $message = '', $group = 'Other') { - return $this->assertStringContainsString($needle, strtolower(Html::decodeEntities($haystack)), $message); + $this->assertStringContainsString($needle, strtolower(Html::decodeEntities($haystack)), $message); } /** @@ -1164,12 +1161,9 @@ public function assertNormalized($haystack, $needle, $message = '', $group = 'Ot * (optional) Message to display if failed. Defaults to an empty string. * @param string $group * (optional) The group this message belongs to. Defaults to 'Other'. - * - * @return bool - * TRUE on pass, FALSE on fail. */ public function assertNoNormalized($haystack, $needle, $message = '', $group = 'Other') { - return $this->assertStringNotContainsString($needle, strtolower(Html::decodeEntities($haystack)), $message); + $this->assertStringNotContainsString($needle, strtolower(Html::decodeEntities($haystack)), $message); } } diff --git a/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php b/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php index 9780902a3099901ddcb4d1270b07c055e7b54857..6acdfee062bd90f43d2c75eb2094d464e58aeb12 100644 --- a/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php +++ b/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php @@ -96,14 +96,11 @@ public function testUrlAlter() { * A string with the original path that is run through generateFrommPath(). * @param $final * A string with the expected result after generateFrommPath(). - * - * @return - * TRUE if $original was correctly altered to $final, FALSE otherwise. */ protected function assertUrlOutboundAlter($original, $final) { // Test outbound altering. $result = $this->container->get('path_processor_manager')->processOutbound($original); - return $this->assertSame($final, $result, new FormattableMarkup('Altered outbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result])); + $this->assertSame($final, $result, new FormattableMarkup('Altered outbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result])); } /** @@ -113,14 +110,11 @@ protected function assertUrlOutboundAlter($original, $final) { * The original path before it has been altered by inbound URL processing. * @param $final * A string with the expected result. - * - * @return - * TRUE if $original was correctly altered to $final, FALSE otherwise. */ protected function assertUrlInboundAlter($original, $final) { // Test inbound altering. $result = $this->container->get('path_alias.manager')->getPathByAlias($original); - return $this->assertSame($final, $result, new FormattableMarkup('Altered inbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result])); + $this->assertSame($final, $result, new FormattableMarkup('Altered inbound URL %original, expected %final, and got %result.', ['%original' => $original, '%final' => $final, '%result' => $result])); } } diff --git a/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php b/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php index eb938dbab5b5a192007adc7fdbc892a44d6b1c06..617d681fbef69a3b607f483d59ffa9aaaf02e0c5 100644 --- a/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php +++ b/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php @@ -79,14 +79,11 @@ public function testConfirmFormWithExternalDestination() { * The assert message. * @param string $group * The assertion group. - * - * @return bool - * Result of the assertion. */ public function assertCancelLinkUrl(Url $url, $message = '', $group = 'Other') { $links = $this->xpath('//a[@href=:url]', [':url' => $url->toString()]); $message = ($message ? $message : new FormattableMarkup('Cancel link with URL %url found.', ['%url' => $url->toString()])); - return $this->assertTrue(isset($links[0]), $message, $group); + $this->assertTrue(isset($links[0]), $message, $group); } } diff --git a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php index 63e4388cdc04ea443e7b176777c88f0c96780d01..a2fefcf1531f6f4e900135687dc2f899996e90a9 100644 --- a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php +++ b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php @@ -47,9 +47,9 @@ public function assertTableCount($base_table, $count = TRUE) { $tables = $connection->schema()->findTables($connection->prefixTables('{' . $base_table . '}') . '%'); if ($count) { - return $this->assertNotEmpty($tables, new FormattableMarkup('Tables matching "@base_table" found.', ['@base_table' => $base_table])); + $this->assertNotEmpty($tables, new FormattableMarkup('Tables matching "@base_table" found.', ['@base_table' => $base_table])); } - return $this->assertEmpty($tables, new FormattableMarkup('Tables matching "@base_table" not found.', ['@base_table' => $base_table])); + $this->assertEmpty($tables, new FormattableMarkup('Tables matching "@base_table" not found.', ['@base_table' => $base_table])); } /** @@ -67,7 +67,7 @@ public function assertModuleTablesExist($module) { $tables_exist = FALSE; } } - return $this->assertTrue($tables_exist, new FormattableMarkup('All database tables defined by the @module module exist.', ['@module' => $module])); + $this->assertTrue($tables_exist, new FormattableMarkup('All database tables defined by the @module module exist.', ['@module' => $module])); } /** @@ -85,7 +85,7 @@ public function assertModuleTablesDoNotExist($module) { $tables_exist = TRUE; } } - return $this->assertFalse($tables_exist, new FormattableMarkup('None of the database tables defined by the @module module exist.', ['@module' => $module])); + $this->assertFalse($tables_exist, new FormattableMarkup('None of the database tables defined by the @module module exist.', ['@module' => $module])); } /** @@ -93,11 +93,6 @@ public function assertModuleTablesDoNotExist($module) { * * @param string $module * The name of the module. - * - * @return bool|null - * TRUE if configuration has been installed, FALSE otherwise. Returns NULL - * if the module configuration directory does not exist or does not contain - * any configuration files. */ public function assertModuleConfig($module) { $module_config_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY; @@ -131,7 +126,7 @@ public function assertModuleConfig($module) { } // Verify that all configuration has been installed (which means that $names // is empty). - return $this->assertEmpty($names, new FormattableMarkup('All default configuration of @module module found.', ['@module' => $module])); + $this->assertEmpty($names, new FormattableMarkup('All default configuration of @module module found.', ['@module' => $module])); } /** @@ -139,13 +134,10 @@ public function assertModuleConfig($module) { * * @param string $module * The name of the module. - * - * @return bool - * TRUE if no configuration was found, FALSE otherwise. */ public function assertNoModuleConfig($module) { $names = \Drupal::configFactory()->listAll($module . '.'); - return $this->assertEmpty($names, new FormattableMarkup('No configuration found for @module module.', ['@module' => $module])); + $this->assertEmpty($names, new FormattableMarkup('No configuration found for @module module.', ['@module' => $module])); } /** diff --git a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php index cdfebd96be11d674c34e5781ba8a4389a05a72c4..510864318d77c7fe79d313720798591f23e00c9d 100644 --- a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php +++ b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php @@ -248,13 +248,9 @@ protected function getPathFromLocationHeader(ResponseInterface $response, $https * The insecure session ID to search for. * @param $assertion_text * The text to display when we perform the assertion. - * - * @return - * The result of assertTrue() that there's a session in the system that - * has the given insecure and secure session IDs. */ protected function assertSessionIds($sid, $assertion_text) { - return $this->assertNotEmpty(\Drupal::database()->select('sessions', 's')->fields('s', ['timestamp'])->condition('sid', Crypt::hashBase64($sid))->execute()->fetchField(), $assertion_text); + $this->assertNotEmpty(\Drupal::database()->select('sessions', 's')->fields('s', ['timestamp'])->condition('sid', Crypt::hashBase64($sid))->execute()->fetchField(), $assertion_text); } /** diff --git a/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php b/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php index ab8b55b040390f54129a1431edbb4e699b45afd6..6b02e5fe36dce170b1f17eac5812e1073b9a8794 100644 --- a/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php +++ b/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php @@ -166,12 +166,9 @@ public function assertNoErrorMessage(array $error) { /** * Asserts that no messages are printed onto the page. - * - * @return bool - * TRUE, if there are no messages. */ protected function assertNoMessages() { - return $this->assertEmpty($this->xpath('//div[contains(@class, "messages")]'), 'Ensures that also no messages div exists, which proves that no messages were generated by the error handler, not even an empty one.'); + $this->assertEmpty($this->xpath('//div[contains(@class, "messages")]'), 'Ensures that also no messages div exists, which proves that no messages were generated by the error handler, not even an empty one.'); } } diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php index 6aa22663b708979b0ee281b73fabd567ba8e327f..d73b27b97d380934831632c96fcdf5e62d50684e 100644 --- a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php +++ b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php @@ -125,12 +125,9 @@ protected function clickSortLoadIdsFromOutput() { * The message to display along with the assertion. * @param string $group * The type of assertion - examples are "Browser", "PHP". - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertSubString($haystack, $needle, $message = '', $group = 'Other') { - return $this->assertStringContainsString($needle, $haystack, $message); + $this->assertStringContainsString($needle, $haystack, $message); } /** @@ -144,12 +141,9 @@ protected function assertSubString($haystack, $needle, $message = '', $group = ' * The message to display along with the assertion. * @param string $group * The type of assertion - examples are "Browser", "PHP". - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertNotSubString($haystack, $needle, $message = '', $group = 'Other') { - return $this->assertStringNotContainsString($needle, $haystack, $message); + $this->assertStringNotContainsString($needle, $haystack, $message); } /** diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php index c5f70ae81307aead881b66c6b77c4ad490c03f5f..3b6f9fc24bd19d82df150f44b22a7087859a3d9d 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php @@ -363,9 +363,6 @@ public function testExposedSortAndItemsPerPage() { * * @param int[] $ids * The ids to check. - * - * @return bool - * TRUE if ids match, FALSE otherwise. */ protected function assertIds(array $ids) { $elements = $this->cssSelect('div.view-test-exposed-form-sort-items-per-page div.views-row span.field-content'); @@ -374,7 +371,7 @@ protected function assertIds(array $ids) { $actual_ids[] = (int) $element->getText(); } - return $this->assertSame($ids, $actual_ids); + $this->assertSame($ids, $actual_ids); } /** diff --git a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php index f73910e0ae4a978b8631333ab79c3a54e9a9781b..d373072d09ed46ae2e15592c9157f1d69e55153d 100644 --- a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php @@ -243,9 +243,6 @@ protected function checkLanguageRenderers($display, $values) { * (optional) A message to display with the assertion. * @param string $group * (optional) The group this message is in. - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertTranslations($display, $renderer_id, array $expected, $message = '', $group = 'Other') { $view = Views::getView('test_entity_row_renderers'); @@ -270,7 +267,7 @@ protected function assertTranslations($display, $renderer_id, array $expected, $ } } - return $this->assertTrue($result, $message, $group); + $this->assertTrue($result, $message, $group); } } diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php index de3d6c6cf493630e26d8318c0f9a538306167e23..aa8803bd9cf1ca2d54fcba684a6fe412728eae6c 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php @@ -109,12 +109,9 @@ public function testQuery() { * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Other'; most tests do not override * this default. - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertSubString($haystack, $needle, $message = '', $group = 'Other') { - return $this->assertStringContainsString($needle, $haystack, $message); + $this->assertStringContainsString($needle, $haystack, $message); } /** @@ -134,12 +131,9 @@ protected function assertSubString($haystack, $needle, $message = '', $group = ' * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Other'; most tests do not override * this default. - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertNotSubString($haystack, $needle, $message = '', $group = 'Other') { - return $this->assertStringNotContainsString($needle, $haystack, $message); + $this->assertStringNotContainsString($needle, $haystack, $message); } /** diff --git a/core/tests/Drupal/KernelTests/AssertContentTrait.php b/core/tests/Drupal/KernelTests/AssertContentTrait.php index b6a03a11b2d3f6b8f715c65dfaeee03481a137f9..e1032632bbc4d7d143593894c79892168e6e0cc8 100644 --- a/core/tests/Drupal/KernelTests/AssertContentTrait.php +++ b/core/tests/Drupal/KernelTests/AssertContentTrait.php @@ -837,9 +837,6 @@ protected function assertTitle($title, $message = '', $group = 'Other') { * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Other'; most tests do not override * this default. - * - * @return bool - * TRUE on pass, FALSE on fail. */ protected function assertNoTitle($title, $message = '', $group = 'Other') { $actual = (string) current($this->xpath('//title')); @@ -849,7 +846,7 @@ protected function assertNoTitle($title, $message = '', $group = 'Other') { '@unexpected' => var_export($title, TRUE), ]); } - return $this->assertNotEquals($title, $actual, $message, $group); + $this->assertNotEquals($title, $actual, $message, $group); } /** @@ -871,9 +868,6 @@ protected function assertNoTitle($title, $message = '', $group = 'Other') { * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Other'; most tests do not override * this default. - * - * @return bool - * TRUE on pass, FALSE on fail. */ protected function assertThemeOutput($callback, array $variables = [], $expected = '', $message = '', $group = 'Other') { /** @var \Drupal\Core\Render\RendererInterface $renderer */ @@ -889,7 +883,7 @@ protected function assertThemeOutput($callback, array $variables = [], $expected $message = '%callback rendered correctly.'; } $message = new FormattableMarkup($message, ['%callback' => 'theme_' . $callback . '()']); - return $this->assertSame($expected, $output, $message, $group); + $this->assertSame($expected, $output, $message, $group); } /** @@ -1245,13 +1239,10 @@ protected function assertNoFieldChecked($id, $message = '', $group = 'Browser') * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Browser'; most tests do not override * this default. - * - * @return bool - * TRUE on pass, FALSE on fail. */ protected function assertOption($id, $option, $message = '', $group = 'Browser') { $options = $this->xpath('//select[@id=:id]//option[@value=:option]', [':id' => $id, ':option' => $option]); - return $this->assertTrue(isset($options[0]), $message ? $message : new FormattableMarkup('Option @option for field @id exists.', ['@option' => $option, '@id' => $id]), $group); + $this->assertTrue(isset($options[0]), $message ? $message : new FormattableMarkup('Option @option for field @id exists.', ['@option' => $option, '@id' => $id]), $group); } /** @@ -1263,13 +1254,10 @@ protected function assertOption($id, $option, $message = '', $group = 'Browser') * The text for the option tag to assert. * @param string $message * (optional) A message to display with the assertion. - * - * @return bool - * TRUE on pass, FALSE on fail. */ protected function assertOptionByText($id, $text, $message = '') { $options = $this->xpath('//select[@id=:id]//option[normalize-space(text())=:text]', [':id' => $id, ':text' => $text]); - return $this->assertTrue(isset($options[0]), $message ?: 'Option with text label ' . $text . ' for select field ' . $id . ' exits.'); + $this->assertTrue(isset($options[0]), $message ?: 'Option with text label ' . $text . ' for select field ' . $id . ' exits.'); } /** @@ -1289,13 +1277,10 @@ protected function assertOptionByText($id, $text, $message = '') { * in test output. Use 'Debug' to indicate this is debugging output. Do not * translate this string. Defaults to 'Browser'; most tests do not override * this default. - * - * @return bool - * TRUE on pass, FALSE on fail. */ protected function assertOptionWithDrupalSelector($drupal_selector, $option, $message = '', $group = 'Browser') { $options = $this->xpath('//select[@data-drupal-selector=:data_drupal_selector]//option[@value=:option]', [':data_drupal_selector' => $drupal_selector, ':option' => $option]); - return $this->assertTrue(isset($options[0]), $message ? $message : new FormattableMarkup('Option @option for field @data_drupal_selector exists.', ['@option' => $option, '@data_drupal_selector' => $drupal_selector]), $group); + $this->assertTrue(isset($options[0]), $message ? $message : new FormattableMarkup('Option @option for field @data_drupal_selector exists.', ['@option' => $option, '@data_drupal_selector' => $drupal_selector]), $group); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php index 2005550da85478ae3af745a14a6096088081916d..58193c6db136096870488f758f2cf0e2739f62ad 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php @@ -98,7 +98,7 @@ protected function getConnectionId() { */ protected function assertConnection($id) { $list = $this->monitor->query($this->getQuery()['processlist'])->fetchAllKeyed(0, 0); - return $this->assertTrue(isset($list[$id]), new FormattableMarkup('Connection ID @id found.', ['@id' => $id])); + $this->assertTrue(isset($list[$id]), new FormattableMarkup('Connection ID @id found.', ['@id' => $id])); } /** @@ -109,7 +109,7 @@ protected function assertConnection($id) { */ protected function assertNoConnection($id) { $list = $this->monitor->query($this->getQuery()['processlist'])->fetchAllKeyed(0, 0); - return $this->assertFalse(isset($list[$id]), new FormattableMarkup('Connection ID @id not found.', ['@id' => $id])); + $this->assertFalse(isset($list[$id]), new FormattableMarkup('Connection ID @id not found.', ['@id' => $id])); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php b/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php index 95421a138da23eacd534abda6d657d0cf4402627..34f36b9230baba813ddc666aefad05bf823e9410 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php @@ -326,7 +326,7 @@ public function assertRowPresent($name, $message = NULL) { $message = new FormattableMarkup('Row %name is present.', ['%name' => $name]); } $present = (boolean) $this->connection->query('SELECT 1 FROM {test} WHERE [name] = :name', [':name' => $name])->fetchField(); - return $this->assertTrue($present, $message); + $this->assertTrue($present, $message); } /** @@ -342,7 +342,7 @@ public function assertRowAbsent($name, $message = NULL) { $message = new FormattableMarkup('Row %name is absent.', ['%name' => $name]); } $present = (boolean) $this->connection->query('SELECT 1 FROM {test} WHERE [name] = :name', [':name' => $name])->fetchField(); - return $this->assertFalse($present, $message); + $this->assertFalse($present, $message); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php index f9af54342d77deae9a861a89b4c802944e358c5e..e408aeca9594ecbb19045f8a44bc60d03030519c 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php @@ -597,7 +597,7 @@ protected function assertResults($expected, $sorted = FALSE) { $found = FALSE; break; } - return $this->assertTrue($found, strtr('!expected expected, !found found', ['!expected' => print_r($expected, TRUE), '!found' => print_r($this->queryResult, TRUE)])); + $this->assertTrue($found, strtr('!expected expected, !found found', ['!expected' => print_r($expected, TRUE), '!found' => print_r($this->queryResult, TRUE)])); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php index eedf53a325546138f19ee41a8c977dab1012a851..2148290fe6223e6696910db04276e9da054bc588 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php @@ -98,7 +98,7 @@ protected function assertFieldStorageLangcode(FieldableEntityInterface $entity, } } - return $this->assertTrue($status, $message); + $this->assertTrue($status, $message); } } diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php index bcfef8369c7bd3e5d51634c6bb7294e5ec3a1150..160ef2f2b59d410d78e071d986c69d8700f2d619 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php @@ -66,9 +66,6 @@ public function testDiscoveryInterface() { * The definition to test. * @param array $expected_definition * The expected definition to test against. - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertDefinitionIdentical(array $definition, array $expected_definition) { $func = function (&$item) { @@ -78,7 +75,7 @@ protected function assertDefinitionIdentical(array $definition, array $expected_ }; array_walk_recursive($definition, $func); array_walk_recursive($expected_definition, $func); - return $this->assertSame($expected_definition, $definition); + $this->assertSame($expected_definition, $definition); } }