Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/mw/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/mw/getPost.php
r47163 r48937 25 25 $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'username', 'password' ) ); 26 26 $this->assertIXRError( $result ); 27 $this->assert Equals( 403, $result->code );27 $this->assertSame( 403, $result->code ); 28 28 } 29 29 … … 33 33 $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'subscriber', 'subscriber' ) ); 34 34 $this->assertIXRError( $result ); 35 $this->assert Equals( 401, $result->code );35 $this->assertSame( 401, $result->code ); 36 36 } 37 37 … … 42 42 $result = $this->myxmlrpcserver->mw_getPost( array( 9999, 'author', 'author' ) ); 43 43 $this->assertIXRError( $result ); 44 $this->assert Equals( 404, $result->code );44 $this->assertSame( 404, $result->code ); 45 45 } 46 46 … … 79 79 // Check expected values. 80 80 $this->assertStringMatchesFormat( '%d', $result['userid'] ); 81 $this->assert Equals( $post_data->post_title, $result['title'] );82 $this->assert Equals( 'publish', $result['post_status'] );81 $this->assertSame( $post_data->post_title, $result['title'] ); 82 $this->assertSame( 'publish', $result['post_status'] ); 83 83 $this->assertStringMatchesFormat( '%d', $result['wp_author_id'] ); 84 $this->assert Equals( $post_data->post_excerpt, $result['mt_excerpt'] );85 $this->assert Equals( url_to_postid( $result['link'] ), self::$post_id );84 $this->assertSame( $post_data->post_excerpt, $result['mt_excerpt'] ); 85 $this->assertSame( url_to_postid( $result['link'] ), self::$post_id ); 86 86 87 $this->assert Equals( 0, $result['wp_post_thumbnail'] );87 $this->assertSame( 0, $result['wp_post_thumbnail'] ); 88 88 89 89 remove_theme_support( 'post-thumbnails' ); … … 104 104 105 105 $this->assertInternalType( 'int', $result['wp_post_thumbnail'] ); 106 $this->assert Equals( $attachment_id, $result['wp_post_thumbnail'] );106 $this->assertSame( $attachment_id, $result['wp_post_thumbnail'] ); 107 107 108 108 remove_theme_support( 'post-thumbnails' ); … … 121 121 $post_data = get_post( self::$post_id ); 122 122 123 $this->assert Equals( strtotime( $post_data->post_date ), $result['dateCreated']->getTimestamp() );124 $this->assert Equals( strtotime( $post_data->post_date ), $result['date_modified']->getTimestamp() );123 $this->assertSame( strtotime( $post_data->post_date ), $result['dateCreated']->getTimestamp() ); 124 $this->assertSame( strtotime( $post_data->post_date ), $result['date_modified']->getTimestamp() ); 125 125 126 126 $post_date_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post_data->post_date, false ), 'Ymd\TH:i:s' ) ); 127 127 $post_modified_gmt = strtotime( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $post_data->post_date, false ), 'Ymd\TH:i:s' ) ); 128 128 129 $this->assert Equals( $post_date_gmt, $result['date_created_gmt']->getTimestamp() );130 $this->assert Equals( $post_modified_gmt, $result['date_modified_gmt']->getTimestamp() );129 $this->assertSame( $post_date_gmt, $result['date_created_gmt']->getTimestamp() ); 130 $this->assertSame( $post_modified_gmt, $result['date_modified_gmt']->getTimestamp() ); 131 131 } 132 132 }
Note: See TracChangeset
for help on using the changeset viewer.