[wp-trac] [WordPress Trac] #46227: Add Rel-Feed Link to Header

WordPress Trac noreply at wordpress.org
Fri Jan 8 17:45:46 UTC 2021


#46227: Add Rel-Feed Link to Header
-------------------------------------------------+-------------------------
 Reporter:  dshanske                             |       Owner:
                                                 |  johnbillion
     Type:  enhancement                          |      Status:  reviewing
 Priority:  low                                  |   Milestone:  5.7
Component:  Feeds                                |     Version:
 Severity:  trivial                              |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback needs-dev-note                        |
-------------------------------------------------+-------------------------

Comment (by johnbillion):

 This all looks good, however the test appears to be useless. The document
 HTML is loaded from the `$test_link_str` within the test, not from the
 page that's loaded as a result of calling `$this->go_to('/')`.

 In order to test this properly:

 * Load the actual HTML from the request. I don't believe that this is done
 anywhere in core's tests currently, as `go_to()` doesn't render the
 template. For this a new test method would be needed which returns the
 complete template output. [https://github.com/johnbillion/query-
 monitor/blob/39556be576bcbe06f9404e7afb045a4a2c16932f/tests/phpunit/includes
 /qm-test.php#L15-L28 Here's an example from one of my plugins].
 * Add an unhappy path test to ensure the link does not get output when the
 front page is also the page for posts.

 Also, cc @jonoaldersonwp for an SEO sanity check on this if you don't
 mind?

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


More information about the wp-trac mailing list