Changeset 46678
- Timestamp:
- 11/08/2019 01:17:35 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-admin-bar.php
r46642 r46678 91 91 */ 92 92 public function add_menu( $node ) { 93 _deprecated_function( __METHOD__, '5.4.0', __CLASS__ . '::add_node()' );94 93 $this->add_node( $node ); 95 94 } … … 104 103 */ 105 104 public function remove_menu( $id ) { 106 _deprecated_function( __METHOD__, '5.4.0', __CLASS__ . '::remove_node()' );107 105 $this->remove_node( $id ); 108 106 } -
trunk/tests/phpunit/tests/adminbar.php
r46642 r46678 347 347 348 348 /** 349 * @ticket 19647350 */351 public function test_deprecated_menu_methods() {352 $admin_bar = new WP_Admin_Bar();353 $node_data = array( 'id' => 'test-node-19647' );354 355 // Test add_menu() deprecation.356 $this->setExpectedDeprecated( 'WP_Admin_Bar::add_menu' );357 $admin_bar->add_menu( $node_data );358 $node_test = $admin_bar->get_node( 'test-node-19647' );359 $this->assertNotNull( $node_test );360 361 // Test remove_menu() deprecation.362 $this->setExpectedDeprecated( 'WP_Admin_Bar::remove_menu' );363 $admin_bar->remove_menu( 'test-node-19647' );364 $node_test = $admin_bar->get_node( 'test-node-19647' );365 $this->assertNull( $node_test );366 }367 368 /**369 349 * @ticket 22247 370 350 */
Note: See TracChangeset
for help on using the changeset viewer.