Make WordPress Core

Opened 10 years ago

Last modified 7 years ago

#36417 new enhancement

Unit tests for functions.php's maybe_unserialize

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

Description

Unit tests for maybe_unseriaze

Attachments (1)

maybe_unserialize.diff (2.5 KB ) - added by tloureiro 10 years ago.
maybe_unserialize test class

Download all attachments as: .zip

Change History (3)

@tloureiro
10 years ago

maybe_unserialize test class

#1 @DrewAPicture
10 years ago

  • Version trunk2.0

#2 @swissspidy
10 years ago

  • Keywords has-unit-tests added
  • Milestone Awaiting ReviewFuture 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.