Skip to content

Commit

Permalink
Fix integration tests deprecation issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Aug 24, 2024
1 parent f1cf76f commit 93c0574
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .tests/php/integration/includes/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,23 +391,22 @@ public function test_hcaptcha_get_verify_output_not_validated_empty_POST(): void
* Test hcaptcha_get_verify_output() with deprecated argument.
*
* @return void
* @expectedDeprecated
*/
public function test_hcaptcha_get_verify_output_with_deprecated_argument(): void {
$nonce_field_name = 'some nonce field';
$nonce_action_name = 'some nonce action';
$test_case = $this;

$this->prepare_hcaptcha_verify_post( $nonce_field_name, $nonce_action_name );

remove_action( 'deprecated_argument_run', [ $this, 'deprecated_function_run' ] );
add_action(
'deprecated_argument_run',
static function ( $f, $m, $v ) use ( &$function_name, &$message, &$version, $test_case ) {
static function ( $f, $m, $v ) use ( &$function_name, &$message, &$version ) {
$function_name = $f;
$message = $m;
$version = $v;
},
PHP_INT_MAX,
10,
3
);

Expand Down

0 comments on commit 93c0574

Please sign in to comment.