Changeset 25378
- Timestamp:
- 09/12/2013 04:20:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/CleanPre.php
r25002 r25378 8 8 */ 9 9 class Tests_Formatting_CleanPre extends WP_UnitTestCase { 10 function setUp() { 11 parent::setUp(); 12 add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) ); 13 } 14 15 function tearDown() { 16 parent::tearDown(); 17 remove_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) ); 18 } 19 20 function deprecated_function_run_check( $function ) { 21 if ( in_array( $function, array( 'clean_pre' ) ) ) 22 add_filter( 'deprecated_function_trigger_error', array( $this, 'deprecated_function_trigger_error' ) ); 23 } 24 25 function deprecated_function_trigger_error() { 26 remove_filter( 'deprecated_function_trigger_error', array( $this, 'deprecated_function_trigger_error' ) ); 27 return false; 28 } 29 10 30 function test_removes_self_closing_br_with_space() { 11 31 $source = 'a b c\n<br />sldfj<br />';
Note: See TracChangeset
for help on using the changeset viewer.