mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@52760 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4ca813d29d
commit
f92bc1fafc
@ -102,7 +102,20 @@ class Tests_Admin_IncludesFile extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket #55109
|
||||
* Data provider for test_download_url_should_respect_filename_from_content_disposition_header.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function data_download_url_should_respect_filename_from_content_disposition_header() {
|
||||
return array(
|
||||
'valid parameters' => array( 'filter_content_disposition_header_with_filename' ),
|
||||
'path traversal' => array( 'filter_content_disposition_header_with_filename_with_path_traversal' ),
|
||||
'no quotes' => array( 'filter_content_disposition_header_with_filename_without_quotes' ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 55109
|
||||
* @dataProvider data_save_to_temp_directory_when_getting_filename_from_content_disposition_header
|
||||
*
|
||||
* @covers ::download_url
|
||||
@ -119,19 +132,6 @@ class Tests_Admin_IncludesFile extends WP_UnitTestCase {
|
||||
remove_filter( 'pre_http_request', array( $this, $filter ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for test_download_url_should_respect_filename_from_content_disposition_header.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function data_download_url_should_respect_filename_from_content_disposition_header() {
|
||||
return array(
|
||||
'valid parameters' => array( 'filter_content_disposition_header_with_filename' ),
|
||||
'path traversal' => array( 'filter_content_disposition_header_with_filename_with_path_traversal' ),
|
||||
'no quotes' => array( 'filter_content_disposition_header_with_filename_without_quotes' ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for test_save_to_temp_directory_when_getting_filename_from_content_disposition_header.
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user