Commit fe6ef2a7 authored by alexpott's avatar alexpott
Browse files

Issue #2429501 by ParisLiakos, EclipseGc, mitrpaka: AggregatorFeedBlock does not output item links

parent 6a7d1bb2
......@@ -165,7 +165,7 @@ public function build() {
foreach ($items as $item) {
$aggregator_block_item = array(
'#type' => 'link',
'#href' => $item->getLink(),
'#url' => $item->urlInfo(),
'#title' => $item->label(),
);
$rendered_items[] = drupal_render($aggregator_block_item);
......
......@@ -52,6 +52,11 @@ public function testBlockLinks() {
$this->drupalGet('test-page');
$this->assertText($block->label(), 'Feed block is displayed on the page.');
// Confirm items appear as links.
$items = $this->container->get('entity.manager')->getStorage('aggregator_item')->loadByFeed($feed->id(), 1);
$links = $this->xpath('//a[@href = :href]', array(':href' => reset($items)->getLink()));
$this->assert(isset($links[0]), 'Item link found.');
// Find the expected read_more link.
$href = $feed->url();
$links = $this->xpath('//a[@href = :href]', array(':href' => $href));
......
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