Commit ae32aaae authored by alexpott's avatar alexpott

Issue #2151103 by twistor, kerby70, ParisLiakos, cilefen: Zend feed plugins...

Issue #2151103 by twistor, kerby70, ParisLiakos, cilefen: Zend feed plugins are incorrectly registered
parent 77b9dbc1
......@@ -1191,50 +1191,71 @@ services:
calls:
- [setContainer, ['@service_container']]
arguments: ['feed.writer.']
# Zend Feed reader plugins
# Zend Feed reader plugins. Plugins should be set as prototype scope.
feed.reader.dublincoreentry:
class: Zend\Feed\Reader\Extension\DublinCore\Entry
scope: prototype
feed.reader.dublincorefeed:
class: Zend\Feed\Reader\Extension\DublinCore\Feed
scope: prototype
feed.reader.contententry:
class: Zend\Feed\Reader\Extension\Content\Entry
scope: prototype
feed.reader.atomentry:
class: Zend\Feed\Reader\Extension\Atom\Entry
scope: prototype
feed.reader.atomfeed:
class: Zend\Feed\Reader\Extension\Atom\Feed
scope: prototype
feed.reader.slashentry:
class: Zend\Feed\Reader\Extension\Slash\Entry
scope: prototype
feed.reader.wellformedwebentry:
class: Zend\Feed\Reader\Extension\WellFormedWeb\Entry
scope: prototype
feed.reader.threadentry:
class: Zend\Feed\Reader\Extension\Thread\Entry
scope: prototype
feed.reader.podcastentry:
class: Zend\Feed\Reader\Extension\Podcast\Entry
scope: prototype
feed.reader.podcastfeed:
class: Zend\Feed\Reader\Extension\Podcast\Feed
# Zend Feed writer plugins
scope: prototype
# Zend Feed writer plugins. Plugins should be set as prototype scope.
feed.writer.atomrendererfeed:
class: Zend\Feed\Writer\Extension\Atom\Renderer\Feed
scope: prototype
feed.writer.contentrendererentry:
class: Zend\Feed\Writer\Extension\Content\Renderer\Entry
scope: prototype
feed.writer.dublincorerendererentry:
class: Zend\Feed\Writer\Extension\DublinCore\Renderer\Entry
scope: prototype
feed.writer.dublincorerendererfeed:
class: Zend\Feed\Writer\Extension\DublinCore\Renderer\Feed
scope: prototype
feed.writer.itunesentry:
class: Zend\Feed\Writer\Extension\ITunes\Entry
scope: prototype
feed.writer.itunesfeed:
class: Zend\Feed\Writer\Extension\ITunes\Feed
scope: prototype
feed.writer.itunesrendererentry:
class: Zend\Feed\Writer\Extension\ITunes\Renderer\Entry
scope: prototype
feed.writer.itunesrendererfeed:
class: Zend\Feed\Writer\Extension\ITunes\Renderer\Feed
scope: prototype
feed.writer.slashrendererentry:
class: Zend\Feed\Writer\Extension\Slash\Renderer\Entry
scope: prototype
feed.writer.threadingrendererentry:
class: Zend\Feed\Writer\Extension\Threading\Renderer\Entry
scope: prototype
feed.writer.wellformedwebrendererentry:
class: Zend\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry
scope: prototype
theme.manager:
class: Drupal\Core\Theme\ThemeManager
arguments: ['@app.root', '@theme.negotiator', '@theme.initialization', '@request_stack', '@module_handler']
......
......@@ -26,11 +26,6 @@ protected function setUp() {
// feeds have hardcoded dates in them (which may be expired when this test
// is run).
$this->config('aggregator.settings')->set('items.expire', AGGREGATOR_CLEAR_NEVER)->save();
// Reset any reader cache between tests.
Reader::reset();
// Set our bridge extension manager to Zend Feed.
$bridge = $this->container->get('feed.bridge.reader');
Reader::setExtensionManager($bridge);
}
/**
......@@ -68,6 +63,15 @@ public function testAtomSample() {
$this->assertLinkByHref('http://example.org/2003/12/13/atom03');
$this->assertText('Some text.');
$this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', array(':link' => 'http://example.org/2003/12/13/atom03'))->fetchField(), 'Atom entry id element is parsed correctly.');
// Check for second feed entry.
$this->assertText('We tried to stop them, but we failed.');
$this->assertLinkByHref('http://example.org/2003/12/14/atom03');
$this->assertText('Some other text.');
$db_guid = db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', array(
':link' => 'http://example.org/2003/12/14/atom03',
))->fetchField();
$this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $db_guid, 'Atom entry id element is parsed correctly.');
}
/**
......
......@@ -17,4 +17,12 @@
<summary>Some text.</summary>
</entry>
<entry>
<title>We tried to stop them, but we failed.</title>
<link href="http://example.org/2003/12/14/atom03" />
<id>urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a</id>
<updated>2003-12-14T16:30:02Z</updated>
<summary>Some other text.</summary>
</entry>
</feed>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment