Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
r47122 r48937 10 10 $result = $this->myxmlrpcserver->mw_newPost( 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 … … 19 19 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'subscriber', 'subscriber', $post ) ); 20 20 $this->assertIXRError( $result ); 21 $this->assert Equals( 401, $result->code );21 $this->assertSame( 401, $result->code ); 22 22 } 23 23 … … 28 28 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'author', 'author', $post ) ); 29 29 $this->assertIXRError( $result ); 30 $this->assert Equals( 500, $result->code );31 $this->assert Equals( 'Content, title, and excerpt are empty.', $result->message );30 $this->assertSame( 500, $result->code ); 31 $this->assertSame( 'Content, title, and excerpt are empty.', $result->message ); 32 32 } 33 33 … … 73 73 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'contributor', 'contributor', $post ) ); 74 74 $this->assertIXRError( $result ); 75 $this->assert Equals( 401, $result->code );75 $this->assertSame( 401, $result->code ); 76 76 } 77 77 … … 98 98 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'contributor', 'contributor', $post ) ); 99 99 $this->assertIXRError( $result ); 100 $this->assert Equals( 401, $result->code );100 $this->assertSame( 401, $result->code ); 101 101 } 102 102 … … 113 113 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'editor', 'editor', $post ) ); 114 114 $this->assertIXRError( $result ); 115 $this->assert Equals( 404, $result->code );115 $this->assertSame( 404, $result->code ); 116 116 } 117 117 … … 126 126 $out = get_post( $result ); 127 127 $this->assertEquals( $my_author_id, $out->post_author ); 128 $this->assert Equals( 'Test', $out->post_title );128 $this->assertSame( 'Test', $out->post_title ); 129 129 } 130 130 … … 158 158 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'author', 'author', $post ) ); 159 159 $this->assertIXRError( $result ); 160 $this->assert Equals( 401, $result->code );160 $this->assertSame( 401, $result->code ); 161 161 } 162 162 … … 173 173 174 174 $out = get_post( $result ); 175 $this->assert Equals( 'Test', $out->post_title );176 $this->assert Equals( 'page', $out->post_type );175 $this->assertSame( 'Test', $out->post_title ); 176 $this->assertSame( 'page', $out->post_type ); 177 177 } 178 178 … … 194 194 195 195 $out = get_post( $result ); 196 $this->assert Equals( 'post', $out->post_type );197 $this->assert Equals( 'draft', $out->post_status );198 $this->assert Equals( '0000-00-00 00:00:00', $out->post_date_gmt );196 $this->assertSame( 'post', $out->post_type ); 197 $this->assertSame( 'draft', $out->post_status ); 198 $this->assertSame( '0000-00-00 00:00:00', $out->post_date_gmt ); 199 199 } 200 200 }
Note: See TracChangeset
for help on using the changeset viewer.