mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
This commit adds the `public` visibility keyword to each method which did not have an explicit visibility keyword. Why `public`? With no visibility previously declared, these methods are implicitly `public` and available for use. As these are part of the WordPress testing framework (for Core and extenders), changing them to anything else would be a backwards-compatibility break. Props costdev, jrf, hellofromTonya. See #54177. git-svn-id: https://develop.svn.wordpress.org/trunk@52009 602fd350-edb4-49c9-b593-d223f7449a82
36 lines
790 B
PHP
36 lines
790 B
PHP
<?php
|
|
require_once ABSPATH . 'wp-admin/includes/admin.php';
|
|
require_once ABSPATH . WPINC . '/class-IXR.php';
|
|
require_once ABSPATH . WPINC . '/class-wp-xmlrpc-server.php';
|
|
|
|
abstract class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase {
|
|
protected $myxmlrpcserver;
|
|
|
|
public function set_up() {
|
|
parent::set_up();
|
|
|
|
add_filter( 'pre_option_enable_xmlrpc', '__return_true' );
|
|
|
|
$this->myxmlrpcserver = new wp_xmlrpc_server();
|
|
}
|
|
|
|
public function tear_down() {
|
|
remove_filter( 'pre_option_enable_xmlrpc', '__return_true' );
|
|
|
|
$this->remove_added_uploads();
|
|
|
|
parent::tear_down();
|
|
}
|
|
|
|
protected static function make_user_by_role( $role ) {
|
|
return self::factory()->user->create(
|
|
array(
|
|
'user_login' => $role,
|
|
'user_pass' => $role,
|
|
'role' => $role,
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|