[wp-trac] [WordPress Trac] #15397: redirect_guess_404_permalink() doesn't guess posts with updated dates
WordPress Trac
noreply at wordpress.org
Wed Dec 27 10:19:28 UTC 2017
#15397: redirect_guess_404_permalink() doesn't guess posts with updated dates
--------------------------------------------------+-----------------------
Reporter: archon810 | Owner: pento
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.9.2
Component: Canonical | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests fixed-major | Focuses:
--------------------------------------------------+-----------------------
Comment (by Frank Klein):
The tests could be improved:
- Use shared fixtures, which makes the tests faster.
- Use `assertSame()`, which checks types (not necessary here, but a good
best practice nonetheless).
- Avoid using legacy method arguments when creating the attachment fixture
(existing tests are often reused when writing others, so let's do it right
the first time).
- Do not remove the added filter on `tearDown()`, as this is handled by
the `WP_UnitTestCase` class (hooks are saved in `setUp()` and restored in
`tearDown()`).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/15397#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list