Make WordPress Core

Changeset 53802


Ignore:
Timestamp:
07/31/2022 01:09:00 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Tests: Correct alignment in has_filter() unit test.

Follow-up to [100/tests].

See #55652, #55647.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/filters.php

    r52983 r53802  
    4747
    4848    public function test_has_filter() {
    49             $tag  = __FUNCTION__;
    50             $func = __FUNCTION__ . '_func';
    51 
    52             $this->assertFalse( has_filter( $tag, $func ) );
    53             $this->assertFalse( has_filter( $tag ) );
    54             add_filter( $tag, $func );
    55             $this->assertSame( 10, has_filter( $tag, $func ) );
    56             $this->assertTrue( has_filter( $tag ) );
    57             remove_filter( $tag, $func );
    58             $this->assertFalse( has_filter( $tag, $func ) );
    59             $this->assertFalse( has_filter( $tag ) );
     49        $tag  = __FUNCTION__;
     50        $func = __FUNCTION__ . '_func';
     51
     52        $this->assertFalse( has_filter( $tag, $func ) );
     53        $this->assertFalse( has_filter( $tag ) );
     54
     55        add_filter( $tag, $func );
     56        $this->assertSame( 10, has_filter( $tag, $func ) );
     57        $this->assertTrue( has_filter( $tag ) );
     58
     59        remove_filter( $tag, $func );
     60        $this->assertFalse( has_filter( $tag, $func ) );
     61        $this->assertFalse( has_filter( $tag ) );
    6062    }
    6163
Note: See TracChangeset for help on using the changeset viewer.