Changeset 55029 for trunk/tests/phpunit/tests/admin/includesFile.php
- Timestamp:
- 01/05/2023 10:21:19 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesFile.php
r52760 r55029 69 69 } 70 70 71 public function _fake_download_url_non_200_response_code( $response, $ args, $url ) {71 public function _fake_download_url_non_200_response_code( $response, $parsed_args, $url ) { 72 72 file_put_contents( $args['filename'], 'This is an unexpected error message from your favorite server.' ); 73 73 return array( … … 151 151 * @return array 152 152 */ 153 public function filter_content_disposition_header_with_filename( $response, $ args, $url ) {153 public function filter_content_disposition_header_with_filename( $response, $parsed_args, $url ) { 154 154 return array( 155 155 'response' => array( … … 169 169 * @return array 170 170 */ 171 public function filter_content_disposition_header_with_filename_with_path_traversal( $response, $ args, $url ) {171 public function filter_content_disposition_header_with_filename_with_path_traversal( $response, $parsed_args, $url ) { 172 172 return array( 173 173 'response' => array( … … 187 187 * @return array 188 188 */ 189 public function filter_content_disposition_header_with_filename_without_quotes( $response, $ args, $url ) {189 public function filter_content_disposition_header_with_filename_without_quotes( $response, $parsed_args, $url ) { 190 190 return array( 191 191 'response' => array( … … 236 236 * @return array 237 237 */ 238 public function filter_content_disposition_header_with_filename_without_context( $response, $ args, $url ) {238 public function filter_content_disposition_header_with_filename_without_context( $response, $parsed_args, $url ) { 239 239 return array( 240 240 'response' => array( … … 254 254 * @return array 255 255 */ 256 public function filter_content_disposition_header_with_filename_with_inline_context( $response, $ args, $url ) {256 public function filter_content_disposition_header_with_filename_with_inline_context( $response, $parsed_args, $url ) { 257 257 return array( 258 258 'response' => array( … … 272 272 * @return array 273 273 */ 274 public function filter_content_disposition_header_with_filename_with_form_data_context( $response, $ args, $url ) {274 public function filter_content_disposition_header_with_filename_with_form_data_context( $response, $parsed_args, $url ) { 275 275 return array( 276 276 'response' => array( … … 366 366 * Mock the HTTP request response. 367 367 * 368 * @param bool $false False.369 * @param array $arguments Request arguments.370 * @param string $url Request URL.371 * @return array|bool372 */ 373 public function mock_http_request( $ false, $arguments, $url ) {368 * @param false|array|WP_Error $response A preemptive return value of an HTTP request. Default false. 369 * @param array $parsed_args HTTP request arguments. 370 * @param string $url The request URL. 371 * @return false|array|WP_Error Response data. 372 */ 373 public function mock_http_request( $response, $parsed_args, $url ) { 374 374 if ( 'https://example.com' === $url ) { 375 375 return array( … … 380 380 } 381 381 382 return $ false;382 return $response; 383 383 } 384 384 }
Note: See TracChangeset
for help on using the changeset viewer.