Commit 626d170c authored by catch's avatar catch
Browse files

Issue #3276108 by jasonfelix, mherchel, zenimagine, lauriii: Allow the RSS...

Issue #3276108 by jasonfelix, mherchel, zenimagine, lauriii: Allow the RSS Feed block's title to be customized by user
parent 3ccd5985
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ protected function blockAccess(AccountInterface $account) {
   * {@inheritdoc}
   */
  public function build() {
    $title = $this->configFactory->get('system.site')->get('name');
    $title = $this->configuration['label'];
    return [
      '#theme' => 'feed_icon',
      '#url' => Url::fromUri('internal:/rss.xml'),
+2 −2
Original line number Diff line number Diff line
@@ -34,12 +34,12 @@ protected function setUp(): void {
   */
  public function testSyndicateBlock() {
    // Place the "Syndicate" block and confirm that it is rendered.
    $this->drupalPlaceBlock('node_syndicate_block', ['id' => 'test_syndicate_block']);
    $this->drupalPlaceBlock('node_syndicate_block', ['id' => 'test_syndicate_block', 'label' => 'Subscribe to RSS Feed']);
    $this->drupalGet('');
    $this->assertSession()->elementExists('xpath', '//div[@id="block-test-syndicate-block"]/*');

    // Verify syndicate block title.
    $this->assertSession()->pageTextContains('Subscribe to Drupal');
    $this->assertSession()->pageTextContains('Subscribe to RSS Feed');
    // Tests the syndicate block RSS link rendered at non-front pages.
    $this->drupalGet('user');
    $this->clickLink('Subscribe to');