Changeset 52010 for trunk/tests/phpunit/tests/xmlrpc/wp/getPages.php
- Timestamp:
- 11/04/2021 03:22:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/getPages.php
r51587 r52010 31 31 } 32 32 33 function test_invalid_username_password() {33 public function test_invalid_username_password() { 34 34 $result = $this->myxmlrpcserver->wp_getPages( array( 1, 'username', 'password' ) ); 35 35 $this->assertIXRError( $result ); … … 37 37 } 38 38 39 function test_incapable_user() {39 public function test_incapable_user() { 40 40 $this->make_user_by_role( 'contributor' ); 41 41 … … 45 45 } 46 46 47 function test_capable_user() {47 public function test_capable_user() { 48 48 $results = $this->myxmlrpcserver->wp_getPages( array( 1, 'administrator', 'administrator' ) ); 49 49 $this->assertNotIXRError( $results ); … … 55 55 } 56 56 57 function remove_editor_edit_page_cap( $caps, $cap, $user_id, $args ) {57 public function remove_editor_edit_page_cap( $caps, $cap, $user_id, $args ) { 58 58 if ( in_array( $cap, array( 'edit_page', 'edit_others_pages' ), true ) ) { 59 59 if ( $user_id === self::$editor_id && $args[0] === self::$post_id ) { … … 68 68 * @ticket 20629 69 69 */ 70 function test_semi_capable_user() {70 public function test_semi_capable_user() { 71 71 add_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap' ), 10, 4 ); 72 72
Note: See TracChangeset
for help on using the changeset viewer.