Make WordPress Core

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


Ignore:
Timestamp:
12/05/2007 04:35:52 AM (18 years ago)
Author:
tellyworth
Message:

extra checks in filter tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_filters.php

    r100 r118  
    162162
    163163        remove_filter('all', array(&$a, 'filterall'));
     164        $this->assertFalse( has_filter('all', array(&$a, 'filterall')) );
    164165
    165166    }
     
    171172
    172173        add_filter('all', array(&$a, 'filterall'));
     174        $this->assertTrue( has_filter('all') );
     175        $this->assertEquals( 10, has_filter('all', array(&$a, 'filterall')) );
    173176        $this->assertEquals($val, apply_filters($tag, $val));
    174177
     
    179182        // now remove the filter, do it again, and make sure it's not called this time
    180183        remove_filter('all', array(&$a, 'filterall'));
     184        $this->assertFalse( has_filter('all', array(&$a, 'filterall')) );
     185        $this->assertFalse( has_filter('all') );
    181186        $this->assertEquals($val, apply_filters($tag, $val));
    182187        // call cound should remain at 1
Note: See TracChangeset for help on using the changeset viewer.