Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php
- Timestamp:
- 09/02/2020 12:35:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php
r47122 r48937 10 10 $result = $this->myxmlrpcserver->mw_editPost( array( 1, 'username', 'password', $post ) ); 11 11 $this->assertIXRError( $result ); 12 $this->assert Equals( 403, $result->code );12 $this->assertSame( 403, $result->code ); 13 13 } 14 14 … … 28 28 29 29 $out = get_post( $post_id ); 30 $this->assert Equals( $new_title, $out->post_title );30 $this->assertSame( $new_title, $out->post_title ); 31 31 } 32 32 … … 48 48 49 49 $out = get_post( $post_id ); 50 $this->assert Equals( $new_title, $out->post_title );50 $this->assertSame( $new_title, $out->post_title ); 51 51 } 52 52 … … 66 66 $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'contributor', 'contributor', $post2 ) ); 67 67 $this->assertIXRError( $result ); 68 $this->assert Equals( 401, $result->code );69 70 $out = get_post( $post_id ); 71 $this->assert Equals( $original_title, $out->post_title );68 $this->assertSame( 401, $result->code ); 69 70 $out = get_post( $post_id ); 71 $this->assertSame( $original_title, $out->post_title ); 72 72 } 73 73 … … 105 105 $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'contributor', 'contributor', $post2 ) ); 106 106 $this->assertIXRError( $result ); 107 $this->assert Equals( 401, $result->code );107 $this->assertSame( 401, $result->code ); 108 108 109 109 $out = get_post( $post_id ); … … 144 144 $post_id = wp_insert_post( $post ); 145 145 146 $this->assert Equals( '', get_post_meta( $post_id, '_thumbnail_id', true ) );146 $this->assertSame( '', get_post_meta( $post_id, '_thumbnail_id', true ) ); 147 147 148 148 // Create attachment. … … 175 175 $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'author', 'author', $post5 ) ); 176 176 $this->assertNotIXRError( $result ); 177 $this->assert Equals( '', get_post_meta( $post_id, '_thumbnail_id', true ) );177 $this->assertSame( '', get_post_meta( $post_id, '_thumbnail_id', true ) ); 178 178 179 179 remove_theme_support( 'post-thumbnails' ); … … 200 200 201 201 $out = get_post( $post_id ); 202 $this->assert Equals( $post2['title'], $out->post_title );202 $this->assertSame( $post2['title'], $out->post_title ); 203 203 204 204 $post3 = array( … … 211 211 212 212 $out = get_post( $post_id ); 213 $this->assert Equals( $post2['title'], $out->post_title );214 $this->assert Equals( $post3['description'], $out->post_content );213 $this->assertSame( $post2['title'], $out->post_title ); 214 $this->assertSame( $post3['description'], $out->post_content ); 215 215 216 216 $post4 = array( … … 223 223 224 224 $out = get_post( $post_id ); 225 $this->assert Equals( $post2['title'], $out->post_title );226 $this->assert Equals( $post3['description'], $out->post_content );227 $this->assert Equals( $post4['mt_excerpt'], $out->post_excerpt );225 $this->assertSame( $post2['title'], $out->post_title ); 226 $this->assertSame( $post3['description'], $out->post_content ); 227 $this->assertSame( $post4['mt_excerpt'], $out->post_excerpt ); 228 228 } 229 229 … … 260 260 $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'contributor', 'contributor', $post2 ) ); 261 261 $this->assertIXRError( $result ); 262 $this->assert Equals( $result->code, 401 );262 $this->assertSame( $result->code, 401 ); 263 263 } 264 264 … … 328 328 329 329 $after = get_post( $post_id ); 330 $this->assert Equals( 'future', $after->post_status );330 $this->assertSame( 'future', $after->post_status ); 331 331 332 332 $future_date_string = strftime( '%Y-%m-%d %H:%M:%S', $future_time ); 333 $this->assert Equals( $future_date_string, $after->post_date );333 $this->assertSame( $future_date_string, $after->post_date ); 334 334 } 335 335 }
Note: See TracChangeset
for help on using the changeset viewer.