Changeset 46642 for trunk/tests/phpunit/tests/adminbar.php
- Timestamp:
- 11/03/2019 10:12:32 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/adminbar.php
r46586 r46642 347 347 348 348 /** 349 * @ticket 19647 350 */ 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 /** 349 369 * @ticket 22247 350 370 */
Note: See TracChangeset
for help on using the changeset viewer.