Changeset 55029 for trunk/tests/phpunit/tests/http/wpGetHttpHeaders.php
- Timestamp:
- 01/05/2023 10:21:19 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/wpGetHttpHeaders.php
r52382 r55029 45 45 * Mock the HTTP request response 46 46 * 47 * @param bool $false False.48 * @param array $arguments Request arguments.49 * @param string $url Request URL.50 * @return array|bool47 * @param false|array|WP_Error $response A preemptive return value of an HTTP request. Default false. 48 * @param array $parsed_args HTTP request arguments. 49 * @param string $url The request URL. 50 * @return false|array|WP_Error Response data. 51 51 */ 52 public function mock_http_request( $ false, $arguments, $url ) {52 public function mock_http_request( $response, $parsed_args, $url ) { 53 53 if ( 'http://example.com' === $url ) { 54 54 return array( 'headers' => true ); 55 55 } 56 56 57 return false;57 return $response; 58 58 } 59 59 }
Note: See TracChangeset
for help on using the changeset viewer.