Changeset 50092 for branches/5.3/tests/phpunit/tests/http/functions.php
- Timestamp:
- 01/30/2021 12:55:05 PM (4 years ago)
- Location:
- branches/5.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3
- Property svn:mergeinfo changed
/trunk merged: 46682,46996
- Property svn:mergeinfo changed
-
branches/5.3/tests/phpunit/tests/http/functions.php
r45135 r50092 6 6 */ 7 7 class Tests_HTTP_Functions extends WP_UnitTestCase { 8 9 /**10 * Mark test as skipped if the HTTP request times out.11 */12 function skipTestOnTimeout( $response ) {13 if ( ! is_wp_error( $response ) ) {14 return;15 }16 if ( 'connect() timed out!' === $response->get_error_message() ) {17 $this->markTestSkipped( 'HTTP timeout' );18 }19 20 if ( false !== strpos( $response->get_error_message(), 'timed out after' ) ) {21 $this->markTestSkipped( 'HTTP timeout' );22 }23 24 if ( 0 === strpos( $response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80' ) ) {25 $this->markTestSkipped( 'HTTP timeout' );26 }27 28 }29 8 30 9 public function setUp() {
Note: See TracChangeset
for help on using the changeset viewer.