[wp-trac] [WordPress Trac] #36566: Improve unit tests around multisite's bootstrap, networks, and sites
WordPress Trac
noreply at wordpress.org
Mon Apr 18 01:28:58 UTC 2016
#36566: Improve unit tests around multisite's bootstrap, networks, and sites
--------------------------------+------------------------
Reporter: jeremyfelt | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 4.6
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: | Focuses: multisite
--------------------------------+------------------------
Comment (by jeremyfelt):
In [changeset:"37233"]:
{{{
#!CommitTicketReference repository="" revision="37233"
Tests: Improve `get_blog_count()` tests
* Use `wp_update_network_counts()` to update the database with the most
current data before testing.
* Use `wp_update_network_counts()` to update the database with the most
current data after deleting the sites created during the test.
* Create only 1 extra site in each test rather than 4. This shaves several
seconds off the test time.
* Stop testing for an extra count now that we update the network counts
properly. Previously we looked at `$site_count_start + 9` rather than 8.
Now this is `+ 1`, which aligns with the actual number of sites created.
* Test 3 explicit conditions - default, filter applied as `true`, and
filter applied as `false`.
* Reset data before testing assertion to avoid a suspended state.
See #36566.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36566#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list