Make WordPress Core

Changeset 32785


Ignore:
Timestamp:
06/16/2015 12:03:25 AM (11 years ago)
Author:
wonderboymusic
Message:

Set $_SERVER['REQUEST_METHOD'] for unit tests.

Props johnbillion.
Fixes #32636.

Location:
trunk/tests/phpunit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r30298 r32785  
    3838$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
    3939$_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN;
     40$_SERVER['REQUEST_METHOD'] = 'GET';
    4041$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
    4142
  • trunk/tests/phpunit/includes/install.php

    r32139 r32785  
    1616$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
    1717$_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN;
     18$_SERVER['REQUEST_METHOD'] = 'GET';
    1819$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
    1920
  • trunk/tests/phpunit/tests/auth.php

    r30576 r32785  
    1111                parent::setUp();
    1212                $this->user_id = $this->factory->user->create();
    13 
    14                 $_SERVER['REQUEST_METHOD'] = null;
    1513        }
    1614
Note: See TracChangeset for help on using the changeset viewer.