WordPress.org

Make WordPress Core

Opened 6 weeks ago

Closed 6 weeks ago

#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: trunk
Component: Media Keywords: has-patch has-unit-tests dev-feedback
Focuses: Cc:

Description

just a unit test for a function in functions.php

Attachments (2)

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

Download all attachments as: .zip

Change History (6)

@pbearne
6 weeks ago

new unit test

#1 @SergeyBiryukov
6 weeks 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
6 weeks ago

I agree, I will rewrite it

@pbearne
6 weeks ago

cleaned up and removed the duplicate data

#3 @SergeyBiryukov
6 weeks ago

  • Milestone changed from Awaiting Review to 5.3

#4 @SergeyBiryukov
6 weeks 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.