From 95efa62a7d7974712c7ac753382437758ddb4ae2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 31 Jul 2022 13:09:00 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/filters.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/phpunit/tests/filters.php b/tests/phpunit/tests/filters.php index 1f5bc8342d..415f8a47c5 100644 --- a/tests/phpunit/tests/filters.php +++ b/tests/phpunit/tests/filters.php @@ -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.