Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/wp/getPosts.php
- Timestamp:
- 09/02/2020 12:35:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/getPosts.php
r47122 r48937 9 9 $result = $this->myxmlrpcserver->wp_getPosts( array( 1, 'username', 'password' ) ); 10 10 $this->assertIXRError( $result ); 11 $this->assert Equals( 403, $result->code );11 $this->assertSame( 403, $result->code ); 12 12 } 13 13 … … 20 20 $result = $this->myxmlrpcserver->wp_getPosts( array( 1, 'subscriber', 'subscriber' ) ); 21 21 $this->assertIXRError( $result ); 22 $this->assert Equals( 401, $result->code );22 $this->assertSame( 401, $result->code ); 23 23 24 24 $filter = array( 'post_type' => 'page' ); 25 25 $result = $this->myxmlrpcserver->wp_getPosts( array( 1, 'subscriber', 'subscriber', $filter ) ); 26 26 $this->assertIXRError( $result ); 27 $this->assert Equals( 401, $result->code );27 $this->assertSame( 401, $result->code ); 28 28 } 29 29 … … 72 72 $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) ); 73 73 $this->assertNotIXRError( $results ); 74 $this->assert Equals( $num_posts, count( $results ) );74 $this->assertSame( $num_posts, count( $results ) ); 75 75 76 76 // Page through results. … … 84 84 } while ( count( $presults ) > 0 ); 85 85 // Verify that $post_ids matches $posts_found. 86 $this->assert Equals( 0, count( array_diff( $post_ids, $posts_found ) ) );86 $this->assertSame( 0, count( array_diff( $post_ids, $posts_found ) ) ); 87 87 88 88 // Add comments to some of the posts. … … 118 118 $results3 = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter3 ) ); 119 119 $this->assertNotIXRError( $results3 ); 120 $this->assert Equals( 1, count( $results3 ) );120 $this->assertSame( 1, count( $results3 ) ); 121 121 $this->assertEquals( $post->ID, $results3[0]['post_id'] ); 122 122 … … 160 160 $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) ); 161 161 $this->assertNotIXRError( $results ); 162 $this->assert Equals( 0, count( $results ) );162 $this->assertSame( 0, count( $results ) ); 163 163 164 164 // Search for one of them. … … 166 166 $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) ); 167 167 $this->assertNotIXRError( $results ); 168 $this->assert Equals( 1, count( $results ) );168 $this->assertSame( 1, count( $results ) ); 169 169 } 170 170
Note: See TracChangeset
for help on using the changeset viewer.