Make WordPress Core


Ignore:
Timestamp:
12/10/2022 01:31:55 PM (18 months ago)
Author:
SergeyBiryukov
Message:

Tests: Temporarily disable a WP_Http test for multiple Location headers.

The test verifies that WP_Http::handle_redirects() uses the last specified URL as the redirect location if multiple Location headers are specified in the response.

It appears that the redirection script on api.wordpress.org no longer sends the expected two Location headers, causing the test to fail.

While the exact cause is being investigated and confirmed, this commit disables the affected test for now, so that other commits and PRs are not blocked by these failures.

Follow-up to [342/tests], [874/tests], [1329/tests], [24846].

Props costdev, SergeyBiryukov.
See #57306.

File:
1 edited

Legend:

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

    r52010 r54955  
    439439     * Test HTTP Redirects with multiple Location headers specified.
    440440     *
     441     * This test has been disabled due to api.wordpress.org failing to
     442     * send two Location headers. See #57306.
     443     *
    441444     * @ticket 16890
    442445     *
     
    446449     * @covers ::wp_remote_retrieve_body
    447450     */
    448     public function test_multiple_location_headers() {
     451    public function disabled_test_multiple_location_headers() {
    449452        $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1';
    450453        $res = wp_remote_head( $url, array( 'timeout' => 30 ) );
Note: See TracChangeset for help on using the changeset viewer.