Changeset 54977 for branches/5.8/tests/phpunit/tests/http/base.php
- Timestamp:
- 12/15/2022 04:23:56 AM (3 years ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/http/base.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
-
branches/5.8/tests/phpunit/tests/http/base.php
r50463 r54977 439 439 440 440 /** 441 * Test HTTP Redirects with multiple Location headers specified.442 *443 * @ticket 16890444 *445 * @covers ::wp_remote_head446 * @covers ::wp_remote_retrieve_header447 * @covers ::wp_remote_get448 * @covers ::wp_remote_retrieve_body449 */450 function test_multiple_location_headers() {451 $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1';452 $res = wp_remote_head( $url, array( 'timeout' => 30 ) );453 454 $this->skipTestOnTimeout( $res );455 $this->assertInternalType( 'array', wp_remote_retrieve_header( $res, 'location' ) );456 $this->assertCount( 2, wp_remote_retrieve_header( $res, 'location' ) );457 458 $res = wp_remote_get( $url, array( 'timeout' => 30 ) );459 460 $this->skipTestOnTimeout( $res );461 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) );462 463 }464 465 /**466 441 * Test HTTP Cookie handling. 467 442 *
Note: See TracChangeset
for help on using the changeset viewer.