Make WordPress Core

Changeset 52760


Ignore:
Timestamp:
02/17/2022 05:38:23 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Tests: Correct the @ticket reference in a download_url() test with the Content-Disposition header.

Move the data provider next to the test, for consistency.

Follow-up to [51939], [52734].

Props azouamauriac.
See #55109.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesFile.php

    r52734 r52760  
    103103
    104104    /**
    105      * @ticket #55109
     105     * Data provider for test_download_url_should_respect_filename_from_content_disposition_header.
     106     *
     107     * @return array
     108     */
     109    public function data_download_url_should_respect_filename_from_content_disposition_header() {
     110        return array(
     111            'valid parameters' => array( 'filter_content_disposition_header_with_filename' ),
     112            'path traversal'   => array( 'filter_content_disposition_header_with_filename_with_path_traversal' ),
     113            'no quotes'        => array( 'filter_content_disposition_header_with_filename_without_quotes' ),
     114        );
     115    }
     116
     117    /**
     118     * @ticket 55109
    106119     * @dataProvider data_save_to_temp_directory_when_getting_filename_from_content_disposition_header
    107120     *
     
    118131
    119132        remove_filter( 'pre_http_request', array( $this, $filter ) );
    120     }
    121 
    122     /**
    123      * Data provider for test_download_url_should_respect_filename_from_content_disposition_header.
    124      *
    125      * @return array
    126      */
    127     public function data_download_url_should_respect_filename_from_content_disposition_header() {
    128         return array(
    129             'valid parameters' => array( 'filter_content_disposition_header_with_filename' ),
    130             'path traversal'   => array( 'filter_content_disposition_header_with_filename_with_path_traversal' ),
    131             'no quotes'        => array( 'filter_content_disposition_header_with_filename_without_quotes' ),
    132         );
    133133    }
    134134
Note: See TracChangeset for help on using the changeset viewer.