Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#47701 closed enhancement (fixed)

unit test for wp_get_mime_types()

Reported by: pbearne's profile pbearne Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.3
Component: Media Keywords: has-patch has-unit-tests dev-feedback
Focuses: Cc:


just a unit test for a function in functions.php

Attachments (2)

47701.patch (7.1 KB) - added by pbearne 5 years ago.
new unit test
47701.2.patch (1.1 KB) - added by pbearne 5 years ago.
cleaned up and removed the duplicate data

Download all attachments as: .zip

Change History (6)

5 years ago

new unit test

#1 @SergeyBiryukov
5 years ago

Thanks for the patch! However, I'm not sure if there's any benefit in duplicate the entire list of of mime types in the test and maintaining it in two places...

Perhaps something like test_wp_get_ext_types() that we have for wp_get_ext_types() would be enough here?

#2 @pbearne
5 years ago

I agree, I will rewrite it

5 years ago

cleaned up and removed the duplicate data

#3 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.3

#4 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 45646:

Media: Add a unit test for wp_get_mime_types().

Props pbearne.
Fixes #47701.

Note: See TracTickets for help on using tickets.