Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#36417 new enhancement

Unit tests for functions.php's maybe_unserialize

Reported by: tloureiro's profile tloureiro Owned by:
Milestone: 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 8 years ago.
maybe_unserialize test class

Download all attachments as: .zip

Change History (3)

8 years ago

maybe_unserialize test class

#1 @DrewAPicture
8 years ago

  • Version changed from trunk to 2.0

#2 @swissspidy
8 years 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.