Make WordPress Core

Changeset 100 in tests for wp-testcase/test_filters.php


Ignore:
Timestamp:
12/03/2007 10:52:51 AM (19 years ago)
Author:
tellyworth
Message:

add test_has_filter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_filters.php

    r78 r100  
    4040                $this->assertEquals(array($tag), $a->get_tags());
    4141
     42        }
     43       
     44        function test_has_filter() {
     45                        $tag = rand_str();
     46                        $func = rand_str();
     47                       
     48                        $this->assertFalse( has_filter($tag, $func) );
     49                        $this->assertFalse( has_filter($tag) );
     50                        add_filter($tag, $func);
     51                        $this->assertEquals( 10, has_filter($tag, $func) );
     52                        $this->assertTrue( has_filter($tag) );
     53                        remove_filter($tag, $func);
     54                        $this->assertFalse( has_filter($tag, $func) );
     55                        $this->assertFalse( has_filter($tag) );
    4256        }
    4357
Note: See TracChangeset for help on using the changeset viewer.