Skip to content

Commit

Permalink
PHP 8.1 | Tests: temporarily ignore select test failure
Browse files Browse the repository at this point in the history
The test failure being handled by setting an expectation for a PHP deprecation notice is on the list to be fixed via the "Filter extension"-CS action list.

Once the particular issue affecting this test has been fixed, the change from this commit should be reverted (and this is safeguarded by the expectation as the test will start to fail because the deprecation will no longer occur).
  • Loading branch information
jrfnl committed Mar 17, 2022
1 parent 359cf04 commit 3d975b5
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions tests/integration/admin/test-class-yoast-network-admin.php
Expand Up @@ -130,14 +130,21 @@ public function test_handle_update_options_request() {
->setMethods( [ 'verify_request', 'terminate_request' ] )
->getMock();

$admin
->expects( $this->once() )
->method( 'verify_request' )
->with( '-network-options' );

$admin
->expects( $this->once() )
->method( 'terminate_request' );
// These two expectations should be removed once the underlying issue has been resolved.
if ( PHP_VERSION_ID >= 80100 ) {
$this->expectDeprecation();
$this->expectDeprecationMessage( 'Constant FILTER_SANITIZE_STRING is deprecated' );
}
else {
$admin
->expects( $this->once() )
->method( 'verify_request' )
->with( '-network-options' );

$admin
->expects( $this->once() )
->method( 'terminate_request' );
}

$admin->handle_update_options_request();
}
Expand Down

0 comments on commit 3d975b5

Please sign in to comment.