From c717bfbba939050f05bb7b6414697ca7ed492e39 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 22 Apr 2017 18:44:18 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/external-http/basic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/external-http/basic.php b/tests/phpunit/tests/external-http/basic.php index e84ab6a454..8799746692 100644 --- a/tests/phpunit/tests/external-http/basic.php +++ b/tests/phpunit/tests/external-http/basic.php @@ -14,7 +14,7 @@ class Tests_External_HTTP_Basic extends WP_UnitTestCase { $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.' ); + $this->fail( 'Could not contact PHP.net to check versions.' ); } $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/" ); 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 );