2013-08-07 08:38:38 +02:00
|
|
|
<?php
|
|
|
|
include_once(ABSPATH . 'wp-admin/includes/admin.php');
|
|
|
|
include_once(ABSPATH . WPINC . '/class-IXR.php');
|
|
|
|
include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php');
|
|
|
|
|
|
|
|
class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase {
|
|
|
|
protected $myxmlrpcserver;
|
|
|
|
|
|
|
|
function setUp() {
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
add_filter( 'pre_option_enable_xmlrpc', '__return_true' );
|
|
|
|
|
|
|
|
$this->myxmlrpcserver = new wp_xmlrpc_server();
|
|
|
|
}
|
|
|
|
|
|
|
|
function tearDown() {
|
|
|
|
remove_filter( 'pre_option_enable_xmlrpc', '__return_true' );
|
2014-11-08 21:17:17 +01:00
|
|
|
$this->remove_added_uploads();
|
2013-08-07 08:38:38 +02:00
|
|
|
|
|
|
|
parent::tearDown();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function make_user_by_role( $role ) {
|
|
|
|
return $this->factory->user->create( array(
|
|
|
|
'user_login' => $role,
|
|
|
|
'user_pass' => $role,
|
|
|
|
'role' => $role
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|