Changeset 36529 for trunk/tests/phpunit/tests/rest-api/rest-server.php
- Timestamp:
- 02/16/2016 01:11:31 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-server.php
r35773 r36529 16 16 /** @var WP_REST_Server $wp_rest_server */ 17 17 global $wp_rest_server; 18 $this->server = $wp_rest_server = new Spy_REST_Server(); 19 20 do_action( 'rest_api_init', $this->server ); 18 19 unset( $wp_rest_server ); 20 add_filter( 'wp_rest_server_class', array( $this, 'filter_wp_rest_server_class' ) ); 21 $this->server = rest_get_server(); 22 remove_filter( 'wp_rest_server_class', array( $this, 'filter_wp_rest_server_class' ) ); 21 23 } 22 24 … … 646 648 } 647 649 } 650 651 public function filter_wp_rest_server_class() { 652 return 'Spy_REST_Server'; 653 } 648 654 }
Note: See TracChangeset
for help on using the changeset viewer.