Tests: Temporarily skip the test for recommended PHP version in readme.html.

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
This commit is contained in:
Sergey Biryukov 2022-09-05 21:14:38 +00:00
parent 3ab0dc20b3
commit 98cf070991

View File

@ -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( '#<tr class="stable">\s*<td>\s*<a [^>]*>\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." );
}
/**