Changeset 47777 for trunk/tests/phpunit/tests/admin/includesTemplate.php
- Timestamp:
- 05/09/2020 12:24:31 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesTemplate.php
r47122 r47777 58 58 global $wp_meta_boxes; 59 59 60 // Add a meta box esto remove.60 // Add a meta box to remove. 61 61 add_meta_box( 'testbox1', 'Test Metabox', '__return_false', $current_screen = 'post' ); 62 62 … … 107 107 $this->assertFalse( $wp_meta_boxes['comment']['advanced']['default']['testbox1'] ); 108 108 $this->assertFalse( $wp_meta_boxes['attachment']['advanced']['default']['testbox1'] ); 109 } 110 111 /** 112 * @ticket 50019 113 */ 114 public function test_add_meta_box_with_previously_removed_box_and_sorted_priority() { 115 global $wp_meta_boxes; 116 117 // Add a meta box to remove. 118 add_meta_box( 'testbox1', 'Test Metabox', '__return_false', $current_screen = 'post' ); 119 120 // Remove the meta box. 121 remove_meta_box( 'testbox1', $current_screen, 'advanced' ); 122 123 // Attempt to re-add the meta box with the 'sorted' priority. 124 add_meta_box( 'testbox1', null, null, $current_screen, 'advanced', 'sorted' ); 125 126 // Check that the meta box was not re-added. 127 $this->assertFalse( $wp_meta_boxes[ $current_screen ]['advanced']['default']['testbox1'] ); 109 128 } 110 129
Note: See TracChangeset
for help on using the changeset viewer.