Build/Test Tools: Don't skip tests when php.net or dev.mysql.com are unreachable.

This sort of behaviour subtly hides the fact that these tests will never fail if the URLs where version number information is fetched from go away for one reason or another.

See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40519 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-04-22 18:44:18 +00:00
parent 040b411ec2
commit c717bfbba9
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class Tests_External_HTTP_Basic extends WP_UnitTestCase {
$response = wp_remote_get( 'https://secure.php.net/supported-versions.php' ); $response = wp_remote_get( 'https://secure.php.net/supported-versions.php' );
if ( 200 != wp_remote_retrieve_response_code( $response ) ) { if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
$this->markTestSkipped( 'Could not contact PHP.net to check versions.' ); $this->fail( 'Could not contact PHP.net to check versions.' );
} }
$php = wp_remote_retrieve_body( $response ); $php = wp_remote_retrieve_body( $response );
@ -26,7 +26,7 @@ class Tests_External_HTTP_Basic extends WP_UnitTestCase {
$response = wp_remote_get( "https://dev.mysql.com/doc/relnotes/mysql/{$matches[1]}/en/" ); $response = wp_remote_get( "https://dev.mysql.com/doc/relnotes/mysql/{$matches[1]}/en/" );
if ( 200 != wp_remote_retrieve_response_code( $response ) ) { if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
$this->markTestSkipped( 'Could not contact dev.MySQL.com to check versions.' ); $this->fail( 'Could not contact dev.MySQL.com to check versions.' );
} }
$mysql = wp_remote_retrieve_body( $response ); $mysql = wp_remote_retrieve_body( $response );