Make WordPress Core

#47701 closed enhancement (fixed)

unit test for wp_get_mime_types()

Reported by: pbearne Owned by: 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 17 months ago.
new unit test
47701.2.patch (1.1 KB) - added by pbearne 17 months ago.
cleaned up and removed the duplicate data

Download all attachments as: .zip

Change History (6)

17 months ago

new unit test

#1 @SergeyBiryukov
17 months 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
17 months ago

I agree, I will rewrite it

17 months ago

cleaned up and removed the duplicate data

#3 @SergeyBiryukov
17 months ago

  • Milestone changed from Awaiting Review to 5.3

#4 @SergeyBiryukov
17 months 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.