diff --git a/src/readme.html b/src/readme.html
index 5f7513bbff..d581b8b3fc 100644
--- a/src/readme.html
+++ b/src/readme.html
@@ -59,7 +59,7 @@
Recommendations
- - PHP version 5.4 or higher.
+ - PHP version 5.6 or higher.
- MySQL version 5.5 or higher.
- The mod_rewrite Apache module.
- A link to wordpress.org on your site.
diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php
index 3370f8ca21..691b6cf91e 100644
--- a/tests/phpunit/tests/basic.php
+++ b/tests/phpunit/tests/basic.php
@@ -26,6 +26,18 @@ class Tests_Basic extends WP_UnitTestCase {
preg_match( '#
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 version ([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( '#\s*\s*]*>\s*([0-9.]*)#s', $php, $phpmatches );
+
+ $this->assertContains( $matches[1], $phpmatches[1] );
}
function test_license() {
|