Changeset 36715 for trunk/tests/phpunit/includes/functions.php
- Timestamp:
- 02/25/2016 09:59:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/functions.php
r36565 r36715 1 1 <?php 2 3 /** 4 * Resets various `$_SERVER` variables that can get altered during tests. 5 */ 6 function tests_reset_SERVER() { 7 $_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN; 8 $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; 9 $_SERVER['REQUEST_METHOD'] = 'GET'; 10 $_SERVER['SERVER_NAME'] = WP_TESTS_DOMAIN; 11 $_SERVER['SERVER_PORT'] = '80'; 12 $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; 13 14 unset( $_SERVER['HTTP_REFERER'] ); 15 unset( $_SERVER['HTTPS'] ); 16 } 2 17 3 18 // For adding hooks before loading WP
Note: See TracChangeset
for help on using the changeset viewer.