diff --git a/core/modules/node/src/Plugin/Block/SyndicateBlock.php b/core/modules/node/src/Plugin/Block/SyndicateBlock.php index 118021f9e0b7b0b82ccd8d644556190a9fe404d3..90af1d54b46787b1049df9496c376607b73bca18 100644 --- a/core/modules/node/src/Plugin/Block/SyndicateBlock.php +++ b/core/modules/node/src/Plugin/Block/SyndicateBlock.php @@ -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'), diff --git a/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php b/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php index 18430e79b540c5a6366b688f0b5f7eae6950f5f1..8449a9e7419993e0951035ff7142baa10ed20d5b 100644 --- a/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php +++ b/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php @@ -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');