Changeset 50954 for trunk/tests/phpunit/tests/xmlrpc/basic.php
- Timestamp:
- 05/24/2021 02:17:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/basic.php
r49862 r50954 17 17 } 18 18 19 function test_disabled() {20 add_filter( 'xmlrpc_enabled', '__return_false' );21 22 $result = $this->myxmlrpcserver->wp_getOptions( array( 1, 'username', 'password' ) );23 24 $this->assertIXRError( $result );25 $this->assertSame( 405, $result->code );26 }27 28 19 function test_login_pass_ok() { 29 $ user_id = $this->make_user_by_role( 'subscriber' );20 $this->make_user_by_role( 'subscriber' ); 30 21 31 22 $this->assertTrue( $this->myxmlrpcserver->login_pass_ok( 'subscriber', 'subscriber' ) ); … … 34 25 35 26 function test_login_pass_bad() { 36 $ user_id = $this->make_user_by_role( 'subscriber' );27 $this->make_user_by_role( 'subscriber' ); 37 28 38 29 $this->assertFalse( $this->myxmlrpcserver->login_pass_ok( 'username', 'password' ) ); … … 118 109 $this->assertXmlStringEqualsXmlString( $return, $value->getXML() ); 119 110 } 111 112 function test_disabled() { 113 add_filter( 'xmlrpc_enabled', '__return_false' ); 114 $testcase_xmlrpc_server = new wp_xmlrpc_server(); 115 $result = $testcase_xmlrpc_server->wp_getOptions( array( 1, 'username', 'password' ) ); 116 117 $this->assertIXRError( $result ); 118 $this->assertSame( 405, $result->code ); 119 } 120 120 }
Note: See TracChangeset
for help on using the changeset viewer.