Changeset 47122 for trunk/tests/phpunit/tests/rest-api/rest-server.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-server.php
r46586 r47122 14 14 parent::setUp(); 15 15 16 // Reset REST server to ensure only our routes are registered 16 // Reset REST server to ensure only our routes are registered. 17 17 $GLOBALS['wp_rest_server'] = null; 18 18 add_filter( 'wp_rest_server_class', array( $this, 'filter_wp_rest_server_class' ) ); … … 22 22 23 23 public function tearDown() { 24 // Remove our temporary spy server 24 // Remove our temporary spy server. 25 25 $GLOBALS['wp_rest_server'] = null; 26 26 unset( $_REQUEST['_wpnonce'] ); … … 910 910 } 911 911 912 // Last-Modified should be unset as per #WP23021 912 // Last-Modified should be unset as per #WP23021. 913 913 $this->assertFalse( isset( $headers['Last-Modified'] ), 'Last-Modified should not be sent.' ); 914 914 } … … 963 963 ); 964 964 965 // WordPress internally will slash the superglobals on bootstrap 965 // WordPress internally will slash the superglobals on bootstrap. 966 966 $_GET = wp_slash( 967 967 array( … … 991 991 ); 992 992 993 // WordPress internally will slash the superglobals on bootstrap 993 // WordPress internally will slash the superglobals on bootstrap. 994 994 $_POST = wp_slash( 995 995 array( … … 1048 1048 ); 1049 1049 1050 // WordPress internally will slash the superglobals on bootstrap 1050 // WordPress internally will slash the superglobals on bootstrap. 1051 1051 $_FILES = array( 1052 1052 'data' => array( … … 1076 1076 ); 1077 1077 1078 // WordPress internally will slash the superglobals on bootstrap 1078 // WordPress internally will slash the superglobals on bootstrap. 1079 1079 $_SERVER['HTTP_X_MY_HEADER'] = wp_slash( 'data\\with\\slashes' ); 1080 1080
Note: See TracChangeset
for help on using the changeset viewer.