Changeset 50101 for branches/4.3/tests/phpunit/includes/testcase.php
- Timestamp:
- 01/30/2021 08:45:47 PM (5 years ago)
- Location:
- branches/4.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/includes/testcase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/trunk merged: 38757,43511-43512,46682,46996
- Property svn:mergeinfo changed
-
branches/4.3/tests/phpunit/includes/testcase.php
r40244 r50101 112 112 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 113 113 } 114 } 115 116 /** 117 * Allow tests to be skipped if the HTTP request times out. 118 * 119 * @param array|WP_Error $response HTTP response. 120 */ 121 public function skipTestOnTimeout( $response ) { 122 if ( ! is_wp_error( $response ) ) { 123 return; 124 } 125 if ( 'connect() timed out!' === $response->get_error_message() ) { 126 $this->markTestSkipped( 'HTTP timeout' ); 127 } 128 129 if ( false !== strpos( $response->get_error_message(), 'timed out after' ) ) { 130 $this->markTestSkipped( 'HTTP timeout' ); 131 } 132 133 if ( 0 === strpos( $response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80' ) ) { 134 $this->markTestSkipped( 'HTTP timeout' ); 135 } 136 114 137 } 115 138
Note: See TracChangeset
for help on using the changeset viewer.