Changeset 48937 for trunk/tests/phpunit/tests/ajax/CustomizeMenus.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/CustomizeMenus.php
r48858 r48937 550 550 551 551 if ( isset( $post_args['search'] ) && 'test' === $post_args['search'] ) { 552 $this->assert same( true,$response['success'] );552 $this->assertTrue( $response['success'] ); 553 553 $this->assertSame( 6, count( $response['data']['items'] ) ); 554 554 $item_ids = wp_list_pluck( $response['data']['items'], 'id' ); … … 629 629 $this->assertArrayHasKey( 'url', $response['data'] ); 630 630 $post = get_post( $response['data']['post_id'] ); 631 $this->assert Equals( 'Hello World', $post->post_title );632 $this->assert Equals( 'post', $post->post_type );633 $this->assert Equals( '', $post->post_name );634 $this->assert Equals( 'hello-world', get_post_meta( $post->ID, '_customize_draft_post_name', true ) );635 $this->assert Equals( $this->wp_customize->changeset_uuid(), get_post_meta( $post->ID, '_customize_changeset_uuid', true ) );631 $this->assertSame( 'Hello World', $post->post_title ); 632 $this->assertSame( 'post', $post->post_type ); 633 $this->assertSame( '', $post->post_name ); 634 $this->assertSame( 'hello-world', get_post_meta( $post->ID, '_customize_draft_post_name', true ) ); 635 $this->assertSame( $this->wp_customize->changeset_uuid(), get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ); 636 636 } 637 637 … … 648 648 $response = json_decode( $this->_last_response, true ); 649 649 $this->assertFalse( $response['success'] ); 650 $this->assert Equals( 'bad_nonce', $response['data'] );650 $this->assertSame( 'bad_nonce', $response['data'] ); 651 651 652 652 // Bad nonce. … … 660 660 $response = json_decode( $this->_last_response, true ); 661 661 $this->assertFalse( $response['success'] ); 662 $this->assert Equals( 'bad_nonce', $response['data'] );662 $this->assertSame( 'bad_nonce', $response['data'] ); 663 663 664 664 // Bad nonce. … … 673 673 $response = json_decode( $this->_last_response, true ); 674 674 $this->assertFalse( $response['success'] ); 675 $this->assert Equals( 'customize_not_allowed', $response['data'] );675 $this->assertSame( 'customize_not_allowed', $response['data'] ); 676 676 677 677 // Missing params. … … 686 686 $response = json_decode( $this->_last_response, true ); 687 687 $this->assertFalse( $response['success'] ); 688 $this->assert Equals( 'missing_params', $response['data'] );688 $this->assertSame( 'missing_params', $response['data'] ); 689 689 690 690 // insufficient_post_permissions. … … 702 702 $response = json_decode( $this->_last_response, true ); 703 703 $this->assertFalse( $response['success'] ); 704 $this->assert Equals( 'insufficient_post_permissions', $response['data'] );704 $this->assertSame( 'insufficient_post_permissions', $response['data'] ); 705 705 706 706 // insufficient_post_permissions. … … 717 717 $response = json_decode( $this->_last_response, true ); 718 718 $this->assertFalse( $response['success'] ); 719 $this->assert Equals( 'missing_post_type_param', $response['data'] );719 $this->assertSame( 'missing_post_type_param', $response['data'] ); 720 720 721 721 // missing_post_title. … … 733 733 $response = json_decode( $this->_last_response, true ); 734 734 $this->assertFalse( $response['success'] ); 735 $this->assert Equals( 'missing_post_title', $response['data'] );735 $this->assertSame( 'missing_post_title', $response['data'] ); 736 736 737 737 // illegal_params. … … 751 751 $response = json_decode( $this->_last_response, true ); 752 752 $this->assertFalse( $response['success'] ); 753 $this->assert Equals( 'illegal_params', $response['data'] );753 $this->assertSame( 'illegal_params', $response['data'] ); 754 754 } 755 755 }
Note: See TracChangeset
for help on using the changeset viewer.