[wp-trac] [WordPress Trac] #41915: REST_REQUEST and parse_request in tests

WordPress Trac noreply at wordpress.org
Wed Sep 20 02:10:14 UTC 2017


#41915: REST_REQUEST and parse_request in tests
------------------------------+-----------------------
 Reporter:  drzraf            |       Owner:
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:
Component:  Build/Test Tools  |     Version:  4.8.1
 Severity:  normal            |  Resolution:  wontfix
 Keywords:                    |     Focuses:  rest-api
------------------------------+-----------------------
Changes (by rmccue):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 `REST_REQUEST` should be avoided where possible, because it can only be
 turned on, not off. We set this only when a request comes in through a
 request to `/wp-json/*`, and it's not set in unit tests or when using
 `rest_do_request()` internally.

 There's no way to set this during tests, and we don't recommend it in any
 case, so closing this as wontfix.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41915#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list