From 306f53a798a4ec57b29055d324ac76ed528b5410 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 20 Jun 2022 17:29:17 +0000 Subject: [PATCH] Tests: Always include the error message in `assertNotWPError()` and `assertNotIXRError()`. Previously, in case of failure, `WP_UnitTestCase_Base::assertNotWPError()` displayed the actual error message from the passed `WP_Error` object, but only if the `$message` parameter was empty. This made the assertion less helpful, as the actual error message was lost in case there was a non-empty `$message` parameter passed to the method, as per the [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#using-assertions Writing PHP Tests] guidelines: > All PHPUnit assertions, as well as all WordPress custom assertions, allow for a `$message` parameter to be passed. This message will be displayed when the assertion fails and can help immensely when debugging a test. This parameter should always be used if more than one assertion is used in a test method. This commit ensures that the actual error message is always displayed, in addition to the passed `$message` parameter. The same applies to `WP_UnitTestCase_Base::assertNotIXRError()`. Follow-up to [34638], [40417]. Props jrf, SergeyBiryukov. See #55652. Built from https://develop.svn.wordpress.org/trunk@53536 git-svn-id: http://core.svn.wordpress.org/trunk@53125 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 42cfac275f..5d59f135b8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53535'; +$wp_version = '6.1-alpha-53536'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.