Changeset 52328 for trunk/tests/phpunit/tests/http/functions.php
- Timestamp:
- 12/06/2021 09:29:00 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/functions.php
r52244 r52328 217 217 public function test_get_cookie_host_only() { 218 218 // 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' ); 222 222 223 223 $requests_response->cookies['test']->flags['host-only'] = false; // https://github.com/WordPress/Requests/issues/306 … … 232 232 $this->assertFalse( $cookie->host_only, 'host-only flag not set' ); 233 233 234 // Regurgitate ( WpOrg\Requests\Cookie -> WP_Http_Cookie -> WpOrg\Requests\Cookie).234 // Regurgitate (Requests_Cookie -> WP_Http_Cookie -> Requests_Cookie). 235 235 $cookies = WP_Http::normalize_cookies( wp_remote_retrieve_cookies( $response ) ); 236 236 $this->assertFalse( $cookies['test']->flags['host-only'], 'host-only flag data lost' );
Note: See TracChangeset
for help on using the changeset viewer.