Readme: Update the recommended PHP version to 5.6.

This also includes a unit test to ensure we're only recommending actively supported versions of PHP in the future.

Fixes #33758.



git-svn-id: https://develop.svn.wordpress.org/trunk@33937 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2015-09-07 05:22:03 +00:00
parent 95b3edd4ce
commit 0b6454bac5
2 changed files with 13 additions and 1 deletions

View File

@@ -26,6 +26,18 @@ class Tests_Basic extends WP_UnitTestCase {
preg_match( '#<br /> Version (.*)#', $readme, $matches );
list( $version ) = explode( '-', $GLOBALS['wp_version'] );
$this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." );
preg_match( '#Recommendations.*PHP</a> version <strong>([0-9.]*)#s', $readme, $matches );
$response = wp_remote_get( 'https://secure.php.net/supported-versions.php' );
if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
$this->markTestSkipped( 'Could not contact PHP.net to check versions.' );
}
$php = wp_remote_retrieve_body( $response );
preg_match_all( '#<tr class="stable">\s*<td>\s*<a [^>]*>\s*([0-9.]*)#s', $php, $phpmatches );
$this->assertContains( $matches[1], $phpmatches[1] );
}
function test_license() {