Changeset 38810 for trunk/tests/phpunit/tests/adminbar.php
- Timestamp:
- 10/18/2016 08:04:36 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/adminbar.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/adminbar.php
r38708 r38810 551 551 $this->assertNull( $node ); 552 552 } 553 554 /** 555 * @ticket 30937 556 * @covers wp_admin_bar_customize_menu() 557 */ 558 public function test_customize_link() { 559 global $wp_customize; 560 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; 561 $uuid = wp_generate_uuid4(); 562 $this->go_to( home_url( "/?customize_changeset_uuid=$uuid" ) ); 563 wp_set_current_user( self::$admin_id ); 564 565 $this->factory()->post->create( array( 566 'post_type' => 'customize_changeset', 567 'post_status' => 'auto-draft', 568 'post_name' => $uuid, 569 ) ); 570 $wp_customize = new WP_Customize_Manager( array( 571 'changeset_uuid' => $uuid, 572 ) ); 573 $wp_customize->start_previewing_theme(); 574 575 set_current_screen( 'front' ); 576 $wp_admin_bar = $this->get_standard_admin_bar(); 577 $node = $wp_admin_bar->get_node( 'customize' ); 578 $this->assertNotEmpty( $node ); 579 580 $parsed_url = wp_parse_url( $node->href ); 581 $query_params = array(); 582 wp_parse_str( $parsed_url['query'], $query_params ); 583 $this->assertEquals( $uuid, $query_params['changeset_uuid'] ); 584 $this->assertNotContains( 'changeset_uuid', $query_params['url'] ); 585 } 553 586 }
Note: See TracChangeset
for help on using the changeset viewer.