Skip to content

Commit

Permalink
Tests: Clarify description for unregister_setting() test with an un…
Browse files Browse the repository at this point in the history
…known setting.

Follow-up to [56817].

See #61530.

git-svn-id: https://develop.svn.wordpress.org/trunk@58954 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Aug 29, 2024
1 parent b20e852 commit 30523ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/phpunit/tests/option/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,13 @@ public function test_unregister_setting_removes_default() {
}

/**
* The test passes if a Notice | Warning | Error is not raised. Thus. the absence of a Notice | Warning | Error
* is an indicator the fix in the ticket resolves the issue.
* Ensures that unregister_setting() does not throw a notice or warning for unknown settings.
*
* @ticket 57674
*
* @covers ::unregister_setting
*/
public function test_unregister_invalid_setting_does_not_raise_php_notice_warning_or_error() {
public function test_unregister_invalid_setting_does_not_throw_notice_or_warning() {
$setting = uniqid();
unregister_setting( $setting, $setting );
$this->assertFalse( has_filter( 'default_option_' . $setting, 'filter_default_option' ) );
Expand Down

0 comments on commit 30523ee

Please sign in to comment.