- Timestamp:
- 01/27/2024 08:35:27 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/sanitizeTextField.php
r56548 r57368 144 144 ); 145 145 } 146 147 /** 148 * @ticket 60357 149 */ 150 public function test_sanitize_text_field_filter() { 151 $filter = new MockAction(); 152 add_filter( 'sanitize_text_field', array( $filter, 'filter' ) ); 153 154 $this->assertSame( 'example', sanitize_text_field( 'example' ) ); 155 $this->assertSame( 1, $filter->get_call_count(), 'The sanitize_text_field filter was not called.' ); 156 } 157 158 /** 159 * @ticket 60357 160 */ 161 public function test_sanitize_textarea_field_filter() { 162 $filter = new MockAction(); 163 add_filter( 'sanitize_textarea_field', array( $filter, 'filter' ) ); 164 165 $this->assertSame( 'example', sanitize_textarea_field( 'example' ) ); 166 $this->assertSame( 1, $filter->get_call_count(), 'The sanitize_textarea_field filter was not called.' ); 167 } 146 168 }
Note: See TracChangeset
for help on using the changeset viewer.