Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Aron Novak’s picture

sardara’s picture

With the patch provided in #1 I get a type hint error because _parser_common_syndication_RSS20_parse() is passing the $news variable which has been casted to array at that point. I'm providing a new patch to handle that.

hmdnawaz’s picture

Updated the patch for the latest 7.x-2.x version.

Status: Needs review » Needs work
hmdnawaz’s picture

Status: Needs work » Needs review
FileSize
3.37 KB
hmdnawaz’s picture

MegaChriz’s picture

Category: Task » Feature request

@hmdnawaz
Would you like to add automated tests for this feature as well? The tests would need to cover that an item is alterable through the hook hook_common_syndication_parser_item_alter() and that the hook gets invoked for each feed type (rss, atom, rdf).

To cover this:

  1. Add a test module that implements the hook.
  2. For each feed type, add a test method to FeedsSyndicationParserTestCase.
  3. Enable the test module in each added test method.
  4. Tests if the alterations done in the hook implementation are kept after parsing (or after import).

In feeds/tests/feeds there are files for each feed type to parse.