[wp-trac] [WordPress Trac] #35492: Separate unit test factory classes into separate files
WordPress Trac
noreply at wordpress.org
Mon Jan 18 12:58:17 UTC 2016
#35492: Separate unit test factory classes into separate files
--------------------------------------+------------------------------
Reporter: ericlewis | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: dev-feedback 2nd-opinion | Focuses:
--------------------------------------+------------------------------
Changes (by ericlewis):
* keywords: dev-feedback 2nd-opinion needs-patch => dev-feedback 2nd-
opinion
Comment:
As this will be a somewhat large change, I'd like to propose the solution
before putting together a patch.
Split out classes into a new folder `tests/phpunit/includes/factory/`,
which will include
{{{
class-wp-unittest-factory-for-post.php
class-wp-unittest-factory-for-attachment.php
class-wp-unittest-factory-for-user.php
class-wp-unittest-factory-for-comment.php
class-wp-unittest-factory-for-blog.php
class-wp-unittest-factory-for-network.php
class-wp-unittest-factory-for-term.php
class-wp-unittest-factory-for-thing.php
class-wp-unittest-generator-sequence.php
class-wp-unittest-factory-callback-after-create.php
}}}
then `require_once` each of these
[https://github.com/aaronjorbin/develop.wordpress/blob/1dbc5b29188cc7d3542b9710e69559bef3816c83/tests/phpunit/includes/testcase.php#L3
in `bootstrap.php`].
Does thought sound good?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35492#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list