Changeset 25402 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 09/12/2013 02:47:58 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/includes/testcase.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r25017 r25402 7 7 8 8 protected static $forced_tickets = array(); 9 protected $deprecated_functions = array(); 9 10 10 11 /** … … 25 26 $this->start_transaction(); 26 27 add_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) ); 28 29 if ( ! empty( $this->deprecated_functions ) ) 30 add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) ); 27 31 } 28 32 … … 33 37 remove_filter( 'query', array( $this, '_drop_temporary_tables' ) ); 34 38 remove_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) ); 39 if ( ! empty( $this->deprecated_functions ) ) 40 remove_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) ); 41 } 42 43 function deprecated_function_run( $function ) { 44 if ( in_array( $function, $this->deprecated_functions ) ) 45 add_filter( 'deprecated_function_trigger_error', array( $this, 'deprecated_function_trigger_error' ) ); 46 } 47 48 function deprecated_function_trigger_error() { 49 remove_filter( 'deprecated_function_trigger_error', array( $this, 'deprecated_function_trigger_error' ) ); 50 return false; 35 51 } 36 52
Note: See TracChangeset
for help on using the changeset viewer.