Opened 11 years ago
Closed 11 years ago
#31705 closed defect (bug) (fixed)
Tests_Feed_RSS2::test_items errors with Undefined index: content
| Reported by: | ianmjones | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.2 |
| Component: | Build/Test Tools | Version: | 4.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
11 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.