Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/phpunit/tests/admin/includesFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ public function mock_http_request( $response, $parsed_args, $url ) {
* @covers ::download_url
* @ticket 54738
*
* @param string $filter A callback containing a fake Content-Type header.
* @param string $ext The expected file extension to match.
* @param string $filter A callback containing a fake Content-Type header.
* @param string $extension The expected file extension to match.
*/
public function test_download_url_should_use_the_content_type_header_to_set_extension_of_a_file_if_extension_was_not_determined( $filter, $extension ) {
add_filter( 'pre_http_request', $filter );
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/tests/dependencies/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ public function get_data_to_filter_eligible_strategies() {
* @dataProvider get_data_to_filter_eligible_strategies
*
* @param callable $set_up Set up.
* @param bool $async_only Async only.
* @param bool $expected Expected return value.
*/
public function test_filter_eligible_strategies( $set_up, $expected ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function test_should_delete_a_directory_with_contents() {
*
* @dataProvider data_should_delete_a_file
*
* @param string $key The key for the file in `self::$filesystem_structure`.
* @param string $file The key for the file in `self::$filesystem_structure`.
*/
public function test_should_delete_a_file( $file ) {
$file = self::$file_structure[ $file ]['path'] . $file;
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/tests/filesystem/wpFilesystemDirect/isDir.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public function test_should_determine_that_a_path_is_a_directory() {
* @dataProvider data_should_determine_that_a_path_is_not_a_directory
*
* @param string $path The path to check.
* @param string $type The type of resource. Accepts 'f' or 'd'.
* Used to invert $expected due to data provider setup.
*/
public function test_should_determine_that_a_path_is_not_a_directory( $path ) {
$this->assertFalse( self::$filesystem->is_dir( self::$file_structure['test_dir']['path'] . $path ) );
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/functions/allowedProtocols.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function test_allowed_protocol_has_an_example() {
* @depends test_allowed_protocol_has_an_example
* @dataProvider data_example_urls
*
* @param string The scheme.
* @param string Example URL.
* @param string $protocol The scheme.
* @param string $url Example URL.
*/
public function test_allowed_protocols( $protocol, $url ) {
$this->assertSame( $url, esc_url( $url, $protocol ) );
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/functions/doEnclose.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ public function test_function_enclosure_links_should_be_filterable() {
*
* @since 5.3.0
*
* @param array $post_links An array of enclosure links.
* @param int $post_id Post ID.
* @param array $enclosure_links An array of enclosure links.
* @param int $post_id Post ID.
* @return array An array of enclosure links.
*/
public function filter_enclosure_links( $enclosure_links, $post_id ) {
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/image/meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ public function test_exif_keywords() {
* @ticket 52826
* @ticket 52922
*
* @param string Stream's URI.
* @param array Expected metadata.
* @param string $file Stream's URI.
* @param array $expected Expected metadata.
*/
public function test_stream( $file, $expected ) {
$actual = wp_read_image_metadata( $file );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/multisite/updateBlogDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function test_update_blog_details() {
*
* @param string $flag The name of the flag being set or unset on a site.
* @param string $flag_value '0' or '1'. The value of the flag being set.
* @param string $action The hook expected to fire for the flag name and flag combination.
* @param string $hook The hook expected to fire for the flag name and flag combination.
*
* @dataProvider data_flag_hooks
*/
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/tests/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,6 @@ public function data_stick_post_with_unexpected_sticky_posts_option() {
*
* @ticket 52007
* @covers ::stick_post
*
* @param mixed $stick Value to pass to stick_post().
*/
public function test_stick_post_removes_duplicate_post_ids_when_adding_new_value() {
update_option( 'sticky_posts', array( 1, 1, 2, 2 ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function data_send_as_email_options() {
*
* @dataProvider data_send_as_email_options
*
* @param bool Whether the final results of the export should be emailed to the user.
* @param bool $send_as_email Whether the final results of the export should be emailed to the user.
*/
public function test_send_error_when_invalid_request_id( $send_as_email ) {
$response = array(
Expand Down Expand Up @@ -388,7 +388,7 @@ public function test_send_error_when_invalid_request_id( $send_as_email ) {
*
* @dataProvider data_send_as_email_options
*
* @param bool Whether the final results of the export should be emailed to the user.
* @param bool $send_as_email Whether the final results of the export should be emailed to the user.
*/
public function test_send_error_when_invalid_request_action_name( $send_as_email ) {
$response = array(
Expand Down Expand Up @@ -420,7 +420,7 @@ public function test_send_error_when_invalid_request_action_name( $send_as_email
*
* @dataProvider data_send_as_email_options
*
* @param bool Whether the final results of the export should be emailed to the user.
* @param bool $send_as_email Whether the final results of the export should be emailed to the user.
*
*/
public function test_raw_data_post_meta( $send_as_email ) {
Expand Down Expand Up @@ -461,7 +461,7 @@ public function test_raw_data_post_meta( $send_as_email ) {
*
* @dataProvider data_send_as_email_options
*
* @param bool Whether the final results of the export should be emailed to the user.
* @param bool $send_as_email Whether the final results of the export should be emailed to the user.
*/
public function test_add_post_meta_with_groups_data_only_available_when_export_file_generated( $send_as_email ) {
// Adds post meta when processing data, given the first exporter on the first page and send as email.
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/tests/rest-api/rest-block-type-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,6 @@ public function test_get_item_no_permission( $method ) {
* @dataProvider data_readable_http_methods
* @ticket 47620
* @ticket 56481
*
* @param string $method HTTP method to use.
*/
public function test_prepare_item() {
$registry = new WP_Block_Type_Registry();
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/rest-comments-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3646,7 +3646,7 @@ public static function data_head_request_with_specified_fields_returns_success_r
/**
* Create a test post with note.
*
* @param int $user_id Post author's user ID.
* @param string $role User role to assign the post author.
* @return int Post ID.
*/
protected function create_test_post_with_note( $role ) {
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/tests/rest-api/rest-search-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ public function test_get_items_search_type_invalid( $method ) {
*
* @dataProvider data_readable_http_methods
* @ticket 56481
*
* @param string $method HTTP method to use.
*/
public function test_get_items_search_type_post_subtype_invalid() {
$response = $this->do_request_with_params(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ public function test_get_items_with_head_request_should_not_prepare_block_patter

/**
* @ticket 56481
*
* @param string $path The path to test.
*/
public function test_head_request_with_specified_fields_returns_success_response() {
wp_set_current_user( self::$admin_id );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function test_url_to_postid_of_http_site_when_current_site_uses_https() {
* @param string $url The complete home URL including scheme and path.
* @param string $path Path relative to the home URL. Blank string if no path is specified.
* @param string|null $orig_scheme Scheme to give the home URL context.
* @param int|null $blog_id Site ID, or null for the current site.
* @param int|null $_blog_id Site ID, or null for the current site.
* @return string The complete home URL including scheme and path.
*/
public function filter_http_home_url( $url, $path, $orig_scheme, $_blog_id ) {
Expand Down
Loading