Make WordPress Core


Ignore:
Timestamp:
12/06/2021 09:29:00 PM (3 years ago)
Author:
SergeyBiryukov
Message:

HTTP API: Revert changeset [52244].

Reverting Requests 2.0.0 changes and moving to WordPress 6.0 cycle. Why? The namespace and file case renaming revealed 2 issues in Core's upgrader process.

See https://core.trac.wordpress.org/ticket/54504#comment:22 for more information.

Follow-up to [52327].

See #54562, #54504.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/http/functions.php

    r52244 r52328  
    217217    public function test_get_cookie_host_only() {
    218218        // Emulate WP_Http::request() internals.
    219         $requests_response = new WpOrg\Requests\Response();
    220 
    221         $requests_response->cookies['test'] = WpOrg\Requests\Cookie::parse( 'test=foo; domain=.wordpress.org' );
     219        $requests_response = new Requests_Response();
     220
     221        $requests_response->cookies['test'] = Requests_Cookie::parse( 'test=foo; domain=.wordpress.org' );
    222222
    223223        $requests_response->cookies['test']->flags['host-only'] = false; // https://github.com/WordPress/Requests/issues/306
     
    232232        $this->assertFalse( $cookie->host_only, 'host-only flag not set' );
    233233
    234         // Regurgitate (WpOrg\Requests\Cookie -> WP_Http_Cookie -> WpOrg\Requests\Cookie).
     234        // Regurgitate (Requests_Cookie -> WP_Http_Cookie -> Requests_Cookie).
    235235        $cookies = WP_Http::normalize_cookies( wp_remote_retrieve_cookies( $response ) );
    236236        $this->assertFalse( $cookies['test']->flags['host-only'], 'host-only flag data lost' );
Note: See TracChangeset for help on using the changeset viewer.