- 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/includes/abstract-testcase.php
r47125 r50092 181 181 182 182 /** 183 * Allow tests to be skipped on some automated runs 183 * Allow tests to be skipped on some automated runs. 184 184 * 185 185 * For test runs on Travis for something other than trunk/master … … 220 220 $this->markTestSkipped( 'Test does not run on Multisite' ); 221 221 } 222 } 223 224 /** 225 * Allow tests to be skipped if the HTTP request times out. 226 * 227 * @param array|WP_Error $response HTTP response. 228 */ 229 public function skipTestOnTimeout( $response ) { 230 if ( ! is_wp_error( $response ) ) { 231 return; 232 } 233 if ( 'connect() timed out!' === $response->get_error_message() ) { 234 $this->markTestSkipped( 'HTTP timeout' ); 235 } 236 237 if ( false !== strpos( $response->get_error_message(), 'timed out after' ) ) { 238 $this->markTestSkipped( 'HTTP timeout' ); 239 } 240 241 if ( 0 === strpos( $response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80' ) ) { 242 $this->markTestSkipped( 'HTTP timeout' ); 243 } 244 222 245 } 223 246
Note: See TracChangeset
for help on using the changeset viewer.