Tests: Correct alignment in has_filter() unit test.

Follow-up to [100/tests].

See #55652, #55647.

git-svn-id: https://develop.svn.wordpress.org/trunk@53802 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-07-31 13:09:00 +00:00
parent 338c69ddb4
commit 95efa62a7d

View File

@@ -46,17 +46,19 @@ class Tests_Filters extends WP_UnitTestCase {
}
public function test_has_filter() {
$tag = __FUNCTION__;
$func = __FUNCTION__ . '_func';
$tag = __FUNCTION__;
$func = __FUNCTION__ . '_func';
$this->assertFalse( has_filter( $tag, $func ) );
$this->assertFalse( has_filter( $tag ) );
add_filter( $tag, $func );
$this->assertSame( 10, has_filter( $tag, $func ) );
$this->assertTrue( has_filter( $tag ) );
remove_filter( $tag, $func );
$this->assertFalse( has_filter( $tag, $func ) );
$this->assertFalse( has_filter( $tag ) );
$this->assertFalse( has_filter( $tag, $func ) );
$this->assertFalse( has_filter( $tag ) );
add_filter( $tag, $func );
$this->assertSame( 10, has_filter( $tag, $func ) );
$this->assertTrue( has_filter( $tag ) );
remove_filter( $tag, $func );
$this->assertFalse( has_filter( $tag, $func ) );
$this->assertFalse( has_filter( $tag ) );
}
// One tag with multiple filters.