[wp-trac] [WordPress Trac] #36417: Unit tests for functions.php's maybe_unserialize

WordPress Trac noreply at wordpress.org
Tue Apr 5 08:46:19 UTC 2016


#36417: Unit tests for functions.php's maybe_unserialize
----------------------------+-----------------------------
 Reporter:  tloureiro       |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  General         |     Version:  2.0
 Severity:  normal          |  Resolution:
 Keywords:  has-unit-tests  |     Focuses:
----------------------------+-----------------------------
Changes (by swissspidy):

 * keywords:   => has-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for the tests!

 I'd probably use [https://phpunit.de/manual/current/en/writing-tests-for-
 phpunit.html#writing-tests-for-phpunit.data-providers 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36417#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list