[Wp-unit-tests] [WordPress Unit Tests] #32: Fix failed tests in TestFeedRss2

WordPress Unit Tests noreply at wordpress.org
Mon Apr 9 23:46:14 UTC 2012


#32: Fix failed tests in TestFeedRss2
--------------------------+--------------------------------
 Reporter:  kurtpayne     |      Owner:
     Type:  defect        |     Status:  new
 Priority:  major         |  Milestone:  Fix existing Tests
Component:  Capabilities  |    Version:
 Keywords:  feed, rss     |
--------------------------+--------------------------------
 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

-- 
Ticket URL: <https://unit-test.trac.wordpress.org/ticket/32>
WordPress Unit Tests <https://unit-test.trac.wordpress.org>
My example project


More information about the wp-unit-tests mailing list