Changeset 637 in tests for wp-testcase/test-xmlrpc-api/test_mt_getRecentPostTitles.php
- Timestamp:
- 04/07/2012 10:00:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-testcase/test-xmlrpc-api/test_mt_getRecentPostTitles.php
r604 r637 35 35 } 36 36 37 function test_no_posts() { 38 $this->_delete_all_posts(); 39 40 $result = $this->myxmlrpcserver->mt_getRecentPostTitles( array( 1, 'author', 'author' ) ); 41 $this->assertInstanceOf( 'IXR_Error', $result ); 42 $this->assertEquals( 500, $result->code ); 43 44 wp_delete_post( $post_id ); 45 } 46 37 47 function test_no_editable_posts() { 38 48 wp_delete_post( $this->post_id ); 49 50 $post_data_editor = array( 51 'post_title' => rand_str(), 52 'post_content' => rand_str( 2000 ), 53 'post_excerpt' => rand_str( 100 ), 54 'post_author' => get_user_by( 'login', 'editor' )->ID, 55 ); 56 $post_id = wp_insert_post( $post_data_editor ); 39 57 40 58 $result = $this->myxmlrpcserver->mt_getRecentPostTitles( array( 1, 'author', 'author' ) ); 41 59 $this->assertNotInstanceOf( 'IXR_Error', $result ); 42 60 $this->assertEquals( 0, count( $result ) ); 61 62 wp_delete_post( $post_id ); 43 63 } 44 64 45 65 function test_date() { 46 66 $results = $this->myxmlrpcserver->mt_getRecentPostTitles( array( 1, 'author', 'author' ) ); 47 $this->assertNotInstanceOf( 'IXR_Error', $result );67 $this->assertNotInstanceOf( 'IXR_Error', $results ); 48 68 49 69 foreach( $results as $result ) {
Note: See TracChangeset
for help on using the changeset viewer.