Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#47701 closed enhancement (fixed)

unit test for wp_get_mime_types()

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

Description

just a unit test for a function in functions.php

Attachments (2)

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

Download all attachments as: .zip

Change History (6)

@pbearne
7 years ago

new unit test

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

I agree, I will rewrite it

@pbearne
7 years ago

cleaned up and removed the duplicate data

#3 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review5.3

#4 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 45646:

Media: Add a unit test for wp_get_mime_types().

Props pbearne.
Fixes #47701.

Note: See TracTickets for help on using tickets.