Opened 14 months ago

Last modified 11 months ago

#32 new defect

Fix failed tests in TestFeedRss2

Reported by: kurtpayne Owned by:
Priority: normal Milestone: Fix Existing Tests
Component: Capabilities Keywords: feed, rss
Cc:

Description

This test was asserting the order in which the posts would appear in the feed. The attached patch doesn't care about the order of the posts in the feed.

This patch also includes a few more future-forward fixes

  • Fetch the WP_User object for the author of the post, don't assume it was created by the current user
  • Fetch the categories and terms of the current post. For some reason, wp_get_post_categories was simply returning array(1);
  • Not all posts have excerpts
  • Compare pubDate to post_date_gmt to avoid failures due to timezone shift

Attachments (2)

test_includes_feed_rss2.php.patch (4.7 KB) - added by kurtpayne 14 months ago.
test_includes_feed_rss2.php.2.patch (4.7 KB) - added by maxcutler 11 months ago.

Download all attachments as: .zip

Change History (3)

Refreshed the patch so it applies cleanly again. However, I'm seeing failures with the feed's description field. kurtpayne, would you mind checking this again?

Note: See TracTickets for help on using tickets.