- Timestamp:
- 01/30/2021 12:08:49 PM (4 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
- Property svn:mergeinfo changed
/trunk merged: 38757,43511-43512,46682,46996
- Property svn:mergeinfo changed
-
branches/4.4/tests/phpunit/tests/external-http/basic.php
r42103 r50091 10 10 11 11 $readme = file_get_contents( ABSPATH . 'readme.html' ); 12 12 13 preg_match( '#Recommendations.*PHP</a> version <strong>([0-9.]*)#s', $readme, $matches ); 13 14 14 15 $response = wp_remote_get( 'https://secure.php.net/supported-versions.php' ); 15 if ( 200 != wp_remote_retrieve_response_code( $response ) ) { 16 $this->markTestSkipped( 'Could not contact PHP.net to check versions.' ); 16 17 $this->skipTestOnTimeout( $response ); 18 19 $response_code = wp_remote_retrieve_response_code( $response ); 20 if ( 200 !== $response_code ) { 21 $this->fail( sprintf( 'Could not contact PHP.net to check versions. Response code: %s', $response_code ) ); 17 22 } 23 18 24 $php = wp_remote_retrieve_body( $response ); 19 25 … … 25 31 26 32 $response = wp_remote_get( "https://dev.mysql.com/doc/relnotes/mysql/{$matches[1]}/en/" ); 27 if ( 200 != wp_remote_retrieve_response_code( $response ) ) { 28 $this->markTestSkipped( 'Could not contact dev.MySQL.com to check versions.' ); 33 34 $this->skipTestOnTimeout( $response ); 35 36 $response_code = wp_remote_retrieve_response_code( $response ); 37 if ( 200 !== $response_code ) { 38 $this->fail( sprintf( 'Could not contact dev.MySQL.com to check versions. Response code: %s', $response_code ) ); 29 39 } 40 30 41 $mysql = wp_remote_retrieve_body( $response ); 31 42
Note: See TracChangeset
for help on using the changeset viewer.