[wp-trac] [WordPress Trac] #33968: Improve performance of Unit Tests for 4.4
WordPress Trac
noreply at wordpress.org
Sat Oct 3 21:26:38 UTC 2015
#33968: Improve performance of Unit Tests for 4.4
------------------------------+-----------------------
Reporter: jorbin | Owner: jorbin
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+-----------------------
Comment (by DrewAPicture):
Following [34802], [34803], [34807], and [34810], setting permalink
structures in tests is now a lot simpler.
For generic cases, all you need to do is set it and forget it, e.g:
{{{#!php
$this->set_permalink_structure( ‘/%postname%/‘ );
}}}
Doesn’t cover anything other than structures though. If you’re doing stuff
with new rules, etc. continue to use the `$wp_rewrite` global as
necessary. If you’re registering taxonomies, you’re still going to want to
run `flush_rewrite_rules()` afterward, regardless of whether you set the
structure earlier and the rules were flushed then.
Side note: I avoided changing the canonical tests because I found them to
be fragile. Maybe followup on that later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33968#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list