Make WordPress Core

Changeset 40519


Ignore:
Timestamp:
04/22/2017 06:44:18 PM (7 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/external-http/basic.php

    r40241 r40519  
    1515        $response = wp_remote_get( 'https://secure.php.net/supported-versions.php' );
    1616        if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
    17             $this->markTestSkipped( 'Could not contact PHP.net to check versions.' );
     17            $this->fail( 'Could not contact PHP.net to check versions.' );
    1818        }
    1919        $php = wp_remote_retrieve_body( $response );
     
    2727        $response = wp_remote_get( "https://dev.mysql.com/doc/relnotes/mysql/{$matches[1]}/en/" );
    2828        if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
    29             $this->markTestSkipped( 'Could not contact dev.MySQL.com to check versions.' );
     29            $this->fail( 'Could not contact dev.MySQL.com to check versions.' );
    3030        }
    3131        $mysql = wp_remote_retrieve_body( $response );
Note: See TracChangeset for help on using the changeset viewer.