From 98cf0709914f59b1118077a0e9cd4c99c1d35ea0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 5 Sep 2022 21:14:38 +0000 Subject: [PATCH] Tests: Temporarily skip the test for recommended PHP version in `readme.html`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test verifies that the WordPress `readme.html` file recommends a PHP version that is actively supported. However, WordPress currently still recommends PHP 7.4 due to PHP 8.0/8.1 compatibility not being fully achieved, even though PHP 7.4 is end-of-life. As things were, the assertion in the test was commented out, leading to this test being marked as “risky” for not performing any assertions. Instead, let’s skip the test with a clear skip notification. Follow-up to [52260]. Props jrf. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54074 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/external-http/basic.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/external-http/basic.php b/tests/phpunit/tests/external-http/basic.php index 437e93b469..7ecc8713cc 100644 --- a/tests/phpunit/tests/external-http/basic.php +++ b/tests/phpunit/tests/external-http/basic.php @@ -10,6 +10,10 @@ class Tests_External_HTTP_Basic extends WP_UnitTestCase { * @covers ::wp_remote_retrieve_body */ public function test_readme_php_version() { + $this->markTestSkipped( + 'Temporarily disabled. Test should be re-enabled once WordPress is fully compatible with PHP 8.0+.' + ); + // This test is designed to only run on trunk. $this->skipOnAutomatedBranches(); @@ -21,8 +25,7 @@ class Tests_External_HTTP_Basic extends WP_UnitTestCase { preg_match_all( '#\s*\s*]*>\s*([0-9.]*)#s', $response_body, $php_matches ); - // TODO: Enable this check once PHP 8.0 compatibility is achieved. - // $this->assertContains( $matches[1], $php_matches[1], "readme.html's Recommended PHP version is too old. Remember to update the WordPress.org Requirements page, too." ); + $this->assertContains( $matches[1], $php_matches[1], "readme.html's Recommended PHP version is too old. Remember to update the WordPress.org Requirements page, too." ); } /**