Changeset 46682 for trunk/tests/phpunit/tests/http/base.php
- Timestamp:
- 11/09/2019 03:36:19 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/base.php
r46586 r46682 18 18 protected $http_request_args; 19 19 20 /**21 * Mark test as skipped if the HTTP request times out.22 */23 function skipTestOnTimeout( $response ) {24 if ( ! is_wp_error( $response ) ) {25 return;26 }27 if ( 'connect() timed out!' === $response->get_error_message() ) {28 $this->markTestSkipped( 'HTTP timeout' );29 }30 31 if ( false !== strpos( $response->get_error_message(), 'timed out after' ) ) {32 $this->markTestSkipped( 'HTTP timeout' );33 }34 35 if ( 0 === strpos( $response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80' ) ) {36 $this->markTestSkipped( 'HTTP timeout' );37 }38 39 }40 41 20 function setUp() { 42 21 parent::setUp();
Note: See TracChangeset
for help on using the changeset viewer.