Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/wp/getPost.php
- Timestamp:
- 09/02/2020 12:35:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/getPost.php
r47122 r48937 32 32 $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'username', 'password', 1 ) ); 33 33 $this->assertIXRError( $result ); 34 $this->assert Equals( 403, $result->code );34 $this->assertSame( 403, $result->code ); 35 35 } 36 36 … … 66 66 // Check expected values. 67 67 $this->assertStringMatchesFormat( '%d', $result['post_id'] ); 68 $this->assert Equals( $this->post_data['post_title'], $result['post_title'] );69 $this->assert Equals( 'draft', $result['post_status'] );70 $this->assert Equals( 'post', $result['post_type'] );68 $this->assertSame( $this->post_data['post_title'], $result['post_title'] ); 69 $this->assertSame( 'draft', $result['post_status'] ); 70 $this->assertSame( 'post', $result['post_type'] ); 71 71 $this->assertStringMatchesFormat( '%d', $result['post_author'] ); 72 $this->assert Equals( $this->post_data['post_excerpt'], $result['post_excerpt'] );73 $this->assert Equals( $this->post_data['post_content'], $result['post_content'] );74 $this->assert Equals( url_to_postid( $result['link'] ), $this->post_id );72 $this->assertSame( $this->post_data['post_excerpt'], $result['post_excerpt'] ); 73 $this->assertSame( $this->post_data['post_content'], $result['post_content'] ); 74 $this->assertSame( url_to_postid( $result['link'] ), $this->post_id ); 75 75 $this->assertEquals( $this->post_custom_field['id'], $result['custom_fields'][0]['id'] ); 76 $this->assert Equals( $this->post_custom_field['key'], $result['custom_fields'][0]['key'] );76 $this->assertSame( $this->post_custom_field['key'], $result['custom_fields'][0]['key'] ); 77 77 $this->assertEquals( $this->post_custom_field['value'], $result['custom_fields'][0]['value'] ); 78 78 … … 86 86 87 87 // When no fields are requested, only the IDs should be returned. 88 $this->assert Equals( 1, count( $result ) );89 $this->assert Equals( array( 'post_id' ), array_keys( $result ) );88 $this->assertSame( 1, count( $result ) ); 89 $this->assertSame( array( 'post_id' ), array_keys( $result ) ); 90 90 } 91 91 … … 110 110 $this->assertInstanceOf( 'IXR_Date', $result['post_modified_gmt'] ); 111 111 112 $this->assert Equals( $this->post_date_ts, $result['post_date']->getTimestamp() );113 $this->assert Equals( $this->post_date_ts, $result['post_modified']->getTimestamp() );112 $this->assertSame( $this->post_date_ts, $result['post_date']->getTimestamp() ); 113 $this->assertSame( $this->post_date_ts, $result['post_modified']->getTimestamp() ); 114 114 115 115 $post_date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this->post_data['post_date'], false ), 'Ymd\TH:i:s' ) ); 116 116 $post_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $this->post_data['post_date'], false ), 'Ymd\TH:i:s' ) ); 117 117 118 $this->assert Equals( $post_date_gmt, $result['post_date_gmt']->getTimestamp() );119 $this->assert Equals( $post_modified_gmt, $result['post_modified_gmt']->getTimestamp() );118 $this->assertSame( $post_date_gmt, $result['post_date_gmt']->getTimestamp() ); 119 $this->assertSame( $post_modified_gmt, $result['post_modified_gmt']->getTimestamp() ); 120 120 } 121 121 … … 144 144 $this->assertInternalType( 'string', $result['post_mime_type'] ); 145 145 146 $this->assert Equals( 'page', $result['post_type'] );146 $this->assertSame( 'page', $result['post_type'] ); 147 147 $this->assertEquals( $parent_page_id, $result['post_parent'] ); 148 $this->assert Equals( 2, $result['menu_order'] );148 $this->assertSame( 2, $result['menu_order'] ); 149 149 } 150 150 }
Note: See TracChangeset
for help on using the changeset viewer.