Changeset 25402 for trunk/tests/phpunit/tests/image/functions.php
- Timestamp:
- 09/12/2013 02:47:58 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/functions.php
r25380 r25402 7 7 */ 8 8 class Tests_Image_Functions extends WP_UnitTestCase { 9 protected $deprecated_functions = array( 'wp_load_image' ); 10 9 11 /** 10 12 * Setup test fixture … … 18 20 19 21 include_once( DIR_TESTDATA . '/../includes/mock-image-editor.php' ); 20 add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) );21 }22 23 function tearDown() {24 parent::tearDown();25 remove_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) );26 }27 28 function deprecated_function_run( $function ) {29 if ( in_array( $function, array( 'wp_load_image' ) ) )30 add_filter( 'deprecated_function_trigger_error', array( $this, 'deprecated_function_trigger_error' ) );31 }32 33 function deprecated_function_trigger_error() {34 remove_filter( 'deprecated_function_trigger_error', array( $this, 'deprecated_function_trigger_error' ) );35 return false;36 22 } 37 23
Note: See TracChangeset
for help on using the changeset viewer.