Changeset 899 in tests
- Timestamp:
- 07/10/2012 09:23:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/test_includes_admin_bar.php
r898 r899 7 7 */ 8 8 class TestWPAdminBar extends WP_UnitTestCase { 9 10 static function setUpBeforeClass() { 11 WP_UnitTestCase::setUpBeforeClass(); 12 require_once ABSPATH . WPINC . '/class-wp-admin-bar.php'; 13 } 14 9 15 function setUp() { 10 16 parent::setUp(); … … 24 30 register_post_type( 'content', array( 'show_in_admin_bar' => true ) ); 25 31 26 require_once ABSPATH . WPINC . '/class-wp-admin-bar.php';27 32 $admin_bar = new WP_Admin_Bar; 28 33 … … 36 41 } 37 42 43 /** 44 * @ticket 21117 45 */ 46 function test_merging_existing_meta_values() { 47 $admin_bar = new WP_Admin_Bar; 48 49 $admin_bar->add_node( array( 50 'id' => 'test-node', 51 'meta' => array( 'class' => 'test-class' ), 52 ) ); 53 $node = $admin_bar->get_node( 'test-node' ); 54 $this->assertEquals( array( 'class' => 'test-class' ), $node->meta ); 55 56 $admin_bar->add_node( array( 57 'id' => 'test-node', 58 'meta' => array( 'some-meta' => 'value' ), 59 ) ); 60 61 $node = $admin_bar->get_node( 'test-node' ); 62 $this->assertEquals( array( 'class' => 'test-class', 'some-meta' => 'value' ), $node->meta ); 63 } 38 64 }
Note: See TracChangeset
for help on using the changeset viewer.