Changeset 25785 for trunk/tests/phpunit/tests/dependencies/jquery.php
- Timestamp:
- 10/15/2013 02:30:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/jquery.php
r25375 r25785 39 39 /** 40 40 * @ticket 22896 41 * 42 * @expectedIncorrectUsage wp_deregister_script 41 43 */ 42 44 function test_dont_allow_deregister_core_scripts_in_admin() { … … 52 54 ); 53 55 54 add_action( 'doing_it_wrong_run', array( $this, 'doing_it_wrong_run' ) );55 56 56 foreach ( $libraries as $library ) { 57 57 // Try to deregister the script, which should fail. … … 60 60 } 61 61 62 remove_action( 'doing_it_wrong_run', array( $this, 'doing_it_wrong_run' ) );63 64 62 set_current_screen( 'front' ); 65 }66 67 function doing_it_wrong_run() {68 add_filter( 'doing_it_wrong_trigger_error', array( $this, 'doing_it_wrong_trigger_error' ) );69 }70 71 function doing_it_wrong_trigger_error() {72 remove_filter( 'doing_it_wrong_trigger_error', array( $this, 'doing_it_wrong_trigger_error' ) );73 return false;74 63 } 75 64
Note: See TracChangeset
for help on using the changeset viewer.