[wp-trac] [WordPress Trac] #46439: Add missing unit tests for `get_page_by_title()`
WordPress Trac
noreply at wordpress.org
Thu Mar 7 22:18:42 UTC 2019
#46439: Add missing unit tests for `get_page_by_title()`
--------------------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.2
Component: Posts, Post Types | Version:
Severity: minor | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by birgire):
Looks good @desrosj and runs successfully on my install.
Just minor things I noticed in [attachment:"46439.diff"]:
- I think we could delete this comment in {{{test_get_page_by_title()}}}:
{{{
// get_page_by_path() should return a post of the requested type before
returning an attachment.
}}}
- There's a {{{global $wpdb;}}} in
{{{test_get_page_by_title_with_special_characters()}}} that's not needed.
- Would be nice to have the file header with title, {{{@since 5.2.0}}},
etc.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46439#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list