Make WordPress Core

Opened 23 months ago

Last modified 23 months ago

#36417 new enhancement

Unit tests for functions.php's maybe_unserialize

Reported by: tloureiro Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.0
Component: General Keywords: has-unit-tests
Focuses: Cc:


Unit tests for maybe_unseriaze

Attachments (1)

maybe_unserialize.diff (2.5 KB) - added by tloureiro 23 months ago.
maybe_unserialize test class

Download all attachments as: .zip

Change History (3)

23 months ago

maybe_unserialize test class

#1 @DrewAPicture
23 months ago

  • Version changed from trunk to 2.0

#2 @swissspidy
23 months ago

  • Keywords has-unit-tests added
  • Milestone changed from Awaiting Review to Future Release

Thanks for the tests!

I'd probably use data providers here to make it easier and more extensible. You can also use named datasets (see example 2.6 on that page) for better readability.

Also, there's no need for the ! defined( 'WPINC' ) check.

Note: See TracTickets for help on using tickets.