@@ 46-53 (lines=8) @@ | ||
43 | /** |
|
44 | * Tests that the hook manager can add actions. |
|
45 | */ |
|
46 | public function test_adds_action() { |
|
47 | $callable = function () {}; |
|
48 | ||
49 | $this->hook_manager->add_action( 'test', $callable, 11, 12 ); |
|
50 | ||
51 | $this->assertFalse( test_has_filter( 'test', $callable, 10, 12 ) ); |
|
52 | $this->assertTrue( test_has_filter( 'test', $callable, 11, 12 ) ); |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * Tests that the hook manager can add filters. |
|
@@ 58-65 (lines=8) @@ | ||
55 | /** |
|
56 | * Tests that the hook manager can add filters. |
|
57 | */ |
|
58 | public function test_adds_filters() { |
|
59 | $callable = function () {}; |
|
60 | ||
61 | $this->hook_manager->add_filter( 'test', $callable, 11, 12 ); |
|
62 | ||
63 | $this->assertFalse( test_has_filter( 'test', $callable, 10, 12 ) ); |
|
64 | $this->assertTrue( test_has_filter( 'test', $callable, 11, 12 ) ); |
|
65 | } |
|
66 | ||
67 | /** |
|
68 | * Tests that the hook manager removes hooks on reset. |