Changeset 768 in tests for trunk/wp-testcase/test-xmlrpc-api/test_wp_getPage.php
- Timestamp:
- 06/30/2012 05:48:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-testcase/test-xmlrpc-api/test_wp_getPage.php
r604 r768 1 1 <?php 2 2 3 include_once(ABSPATH . WPINC . '/post-thumbnail-template.php'); 4 5 class TestXMLRPCServer_wp_getPage extends WPXMLRPCServerTestCase { 3 class TestXMLRPCServer_wp_getPage extends WP_XMLRPC_UnitTestCase { 6 4 var $post_data; 7 5 var $post_id; … … 17 15 'post_content' => rand_str( 2000 ), 18 16 'post_excerpt' => rand_str( 100 ), 19 'post_author' => get_user_by( 'login', 'author' )->ID,17 'post_author' => $this->make_user_by_role( 'author' ), 20 18 'post_date' => strftime( "%Y-%m-%d %H:%M:%S", $this->post_date_ts ), 21 19 ); … … 38 36 $this->knownWPBug(20336); 39 37 40 $result = $this->myxmlrpcserver->wp_getPage( array( 1, 9999, 'author', 'author' ) ); 38 $this->make_user_by_role( 'editor' ); 39 40 $result = $this->myxmlrpcserver->wp_getPage( array( 1, 9999, 'editor', 'editor' ) ); 41 41 $this->assertInstanceOf( 'IXR_Error', $result ); 42 42 $this->assertEquals( 404, $result->code ); … … 44 44 45 45 function test_valid_page() { 46 $this->make_user_by_role( 'editor' ); 47 46 48 $result = $this->myxmlrpcserver->wp_getPage( array( 1, $this->post_id, 'editor', 'editor' ) ); 47 49 $this->assertNotInstanceOf( 'IXR_Error', $result ); … … 81 83 82 84 function test_date() { 85 $this->make_user_by_role( 'editor' ); 86 83 87 $result = $this->myxmlrpcserver->wp_getPage( array( 1, $this->post_id, 'editor', 'editor' ) ); 84 88 $this->assertNotInstanceOf( 'IXR_Error', $result );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)