Changeset 1033 in tests
- Timestamp:
- 09/21/2012 10:15:22 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/xmlrpc/wp/getPosts.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/xmlrpc/wp/getPosts.php
r904 r1033 128 128 } 129 129 } 130 131 /** 132 * @ticket 21623 133 */ 134 function test_search() { 135 $this->make_user_by_role( 'editor' ); 136 137 $post_ids[] = $this->factory->post->create( array( 'post_title' => 'First: ' . rand_str() ) ); 138 $post_ids[] = $this->factory->post->create( array( 'post_title' => 'Second: ' . rand_str() ) ); 139 140 // Search for none of them 141 $filter = array( 's' => rand_str() ); 142 $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) ); 143 $this->assertNotInstanceOf( 'IXR_Error', $results ); 144 $this->assertEquals( 0, count( $results ) ); 145 146 // Search for one of them 147 $filter = array( 's' => 'First:' ); 148 $results = $this->myxmlrpcserver->wp_getPosts( array( 1, 'editor', 'editor', $filter ) ); 149 $this->assertNotInstanceOf( 'IXR_Error', $results ); 150 $this->assertEquals( 1, count( $results ) ); 151 } 152 130 153 }
Note: See TracChangeset
for help on using the changeset viewer.