Changeset 55256 for trunk/tests/phpunit/tests/option/wpLoadAlloptions.php
- Timestamp:
- 02/07/2023 12:47:30 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/wpLoadAlloptions.php
r53865 r55256 121 121 return $this->alloptions; 122 122 } 123 124 /** 125 * Tests that `$alloptions` can be filtered with a custom value, short circuiting `wp_load_alloptions()`. 126 * 127 * @ticket 56045 128 * 129 * @covers ::wp_load_alloptions 130 */ 131 public function test_filter_pre_wp_load_alloptions_filter_is_called() { 132 $filter = new MockAction(); 133 134 add_filter( 'pre_wp_load_alloptions', array( &$filter, 'filter' ) ); 135 136 wp_load_alloptions(); 137 138 $this->assertSame( 139 1, 140 $filter->get_call_count(), 141 'The filter was not called 1 time.' 142 ); 143 144 $this->assertSame( 145 array( 'pre_wp_load_alloptions' ), 146 $filter->get_hook_names(), 147 'The hook name was incorrect.' 148 ); 149 } 123 150 }
Note: See TracChangeset
for help on using the changeset viewer.