Opened 9 years ago
Closed 9 years ago
#31705 closed defect (bug) (fixed)
Tests_Feed_RSS2::test_items errors with Undefined index: content
Reported by: | ianmjones | Owned by: | |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
When running the current Unit Tests, there is an error.
There was 1 error: 1) Tests_Feed_RSS2::test_items Undefined index: content /Users/ian/Dropbox/Websites/wordpress-core/tests/phpunit/tests/feed/rss2.php:120
On investigation it turns out that the posts generated in the Tests_Feed_RSS2::setUp()
do not have authors properly defined and therefore the <dc:creator>
elements of the feed have no content.
I have a patch for the unit tests.
Attachments (1)
Change History (8)
This ticket was mentioned in Slack in #core by ianmjones. View the logs.
9 years ago
Note: See
TracTickets for help on using
tickets.
Thanks for the report! In my tests, I'm not able to reproduce the PHP notice - the 'content' index is defined, but it's an empty string - but you are quite correct that the posts should have an author, otherwise the
assertEquals()
assertions don't mean much.