Skip to content

Commit

Permalink
Fix parameter type causing test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tarecord committed Aug 22, 2024
1 parent b82d6f4 commit cece562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/_support/Helper/Http_API/Http_API_Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ public function will_reply_to_request( string $method, string $uri, $response ):
/**
* Hooked on the `pre_http_request` filter to prefill the mocked HTTP responses.
*
* @param bool $preempt Whether to preempt an HTTP request's return value. Default `false`.
* @param bool|array|WP_Error $preempt Whether to preempt an HTTP request's return value. Default `false`.
* @param array<string,mixed> $parsed_args The HTTP request arguments.
* @param string $url The full request URL.
*
* @return false|mixed Either the mocked response or `false` to let the request go through.
*/
public function mock_http_response( bool $preempt, array $parsed_args, string $url ) {
public function mock_http_response( $preempt, array $parsed_args, string $url ) {
$uri = '/' . ltrim( str_replace( $this->get_url(), '', $url ), '/' );
$method = $parsed_args['method'] ?? 'GET';
$key = "$method $uri";
Expand Down

0 comments on commit cece562

Please sign in to comment.