Changeset 25402 for trunk/tests/phpunit/tests/ms.php
- Timestamp:
- 09/12/2013 02:47:58 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ms.php
r25397 r25402 9 9 */ 10 10 class Tests_MS extends WP_UnitTestCase { 11 11 protected $deprecated_functions = array( 'is_blog_user', 'get_dashboard_blog' ); 12 12 protected $plugin_hook_count = 0; 13 13 … … 16 16 17 17 $_SERVER['REMOTE_ADDR'] = ''; 18 add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) );19 }20 21 function tearDown() {22 parent::tearDown();23 remove_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) );24 }25 26 function deprecated_function_run_check( $function ) {27 if ( in_array( $function, array( 'is_blog_user', 'get_dashboard_blog' ) ) )28 add_filter( 'deprecated_function_trigger_error', array( $this, 'filter_deprecated_function_trigger_error' ) );29 }30 31 function filter_deprecated_function_trigger_error() {32 remove_filter( 'deprecated_function_trigger_error', array( $this, 'filter_deprecated_function_trigger_error' ) );33 return false;34 18 } 35 19
Note: See TracChangeset
for help on using the changeset viewer.