Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/mw/getRecentPosts.php
- Timestamp:
- 09/02/2020 12:35:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/getRecentPosts.php
r47122 r48937 26 26 $result = $this->myxmlrpcserver->mw_getRecentPosts( array( 1, 'username', 'password' ) ); 27 27 $this->assertIXRError( $result ); 28 $this->assert Equals( 403, $result->code );28 $this->assertSame( 403, $result->code ); 29 29 } 30 30 … … 37 37 $result = $this->myxmlrpcserver->mw_getRecentPosts( array( 1, 'subscriber', 'subscriber' ) ); 38 38 $this->assertIXRError( $result ); 39 $this->assert Equals( 401, $result->code );39 $this->assertSame( 401, $result->code ); 40 40 } 41 41 … … 45 45 $result = $this->myxmlrpcserver->mw_getRecentPosts( array( 1, 'author', 'author' ) ); 46 46 $this->assertNotIXRError( $result ); 47 $this->assert Equals( 0, count( $result ) );47 $this->assertSame( 0, count( $result ) ); 48 48 } 49 49 … … 83 83 $this->assertStringMatchesFormat( '%d', $result['userid'] ); 84 84 $this->assertStringMatchesFormat( '%d', $result['postid'] ); 85 $this->assert Equals( $post->post_title, $result['title'] );86 $this->assert Equals( 'draft', $result['post_status'] );85 $this->assertSame( $post->post_title, $result['title'] ); 86 $this->assertSame( 'draft', $result['post_status'] ); 87 87 $this->assertStringMatchesFormat( '%d', $result['wp_author_id'] ); 88 $this->assert Equals( $post->post_excerpt, $result['mt_excerpt'] );89 $this->assert Equals( url_to_postid( $result['link'] ), $post->ID );88 $this->assertSame( $post->post_excerpt, $result['mt_excerpt'] ); 89 $this->assertSame( url_to_postid( $result['link'] ), $post->ID ); 90 90 91 $this->assert Equals( '', $result['wp_post_thumbnail'] );91 $this->assertSame( '', $result['wp_post_thumbnail'] ); 92 92 } 93 93 … … 113 113 $attachment_id = get_post_meta( $result['postid'], '_thumbnail_id', true ); 114 114 115 $this->assert Equals( $attachment_id, $result['wp_post_thumbnail'] );115 $this->assertSame( $attachment_id, $result['wp_post_thumbnail'] ); 116 116 } 117 117 } … … 136 136 $this->assertInstanceOf( 'IXR_Date', $result['date_modified_gmt'] ); 137 137 138 $this->assert Equals( strtotime( $post->post_date ), $result['dateCreated']->getTimestamp() );139 $this->assert Equals( $date_gmt, $result['date_created_gmt']->getTimestamp() );140 $this->assert Equals( strtotime( $post->post_date ), $result['date_modified']->getTimestamp() );141 $this->assert Equals( $date_modified_gmt, $result['date_modified_gmt']->getTimestamp() );138 $this->assertSame( strtotime( $post->post_date ), $result['dateCreated']->getTimestamp() ); 139 $this->assertSame( $date_gmt, $result['date_created_gmt']->getTimestamp() ); 140 $this->assertSame( strtotime( $post->post_date ), $result['date_modified']->getTimestamp() ); 141 $this->assertSame( $date_modified_gmt, $result['date_modified_gmt']->getTimestamp() ); 142 142 } 143 143 }
Note: See TracChangeset
for help on using the changeset viewer.