[wp-trac] [WordPress Trac] #29896: Organize Multisite Unit Tests

WordPress Trac noreply at wordpress.org
Sun Oct 12 05:49:50 UTC 2014


#29896: Organize Multisite Unit Tests
------------------------------+-------------------------
 Reporter:  jeremyfelt        |       Owner:  jeremyfelt
     Type:  enhancement       |      Status:  assigned
 Priority:  normal            |   Milestone:  4.1
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  multisite
------------------------------+-------------------------

Comment (by jeremyfelt):

 Replying to [comment:4 nacin]:
 > Thought: should these instead be user/multisite.php?

 Yes.

 I think if we have multisite specific tests for other components (users,
 options, media, taxonomy), we should use a `multisite.php` in that
 directory. (i.e. similar to focuses and components in Trac)

 For the "networks and sites" component as well as the multisite boot
 process, I think we're good with a `multisite/` directory.

 We go this direction in
 [https://core.trac.wordpress.org/attachment/ticket/29896/29896.3.diff
 29896.3.diff]:

 * `ms.php` becomes `multisite.php` and retains a couple registration
 related tests. We can move these out over time once we start testing that
 process.
 * Tests specific to options move from `option/blogOption.php` to
 `option/multisite.php`. This also brings one multisite specific test from
 `option/siteOption.php`. Really, `*_site_option()` is `*_option()` in
 single site, so the naming here can get confusing.
 * Tests specific to users are in `user/multisite.php`
 * Tests specific to sites on a network are in `multisite/site.php`
 * Tests specific to networks are in `multisite/network.php`
 * Tests specific to the bootstrap / load process are in
 `multisite/bootstrap.php`


 We can now run tests with `ms-site`, `ms-user`, `ms-option`, `ms-network`,
 and `ms-bootstrap` groups, which is nice.

 I'm going to sleep on it, but it's feeling good and everything is still
 passing. :)

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


More information about the wp-trac mailing list