Changeset 53802
- Timestamp:
- 07/31/2022 01:09:00 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/filters.php
r52983 r53802 47 47 48 48 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 ) ); 60 62 } 61 63
Note: See TracChangeset
for help on using the changeset viewer.