mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 09:34:41 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user