diff --git a/core/modules/node/src/Tests/NodeLinksTest.php b/core/modules/node/src/Tests/NodeLinksTest.php index f3873f5..4c0efa7 100644 --- a/core/modules/node/src/Tests/NodeLinksTest.php +++ b/core/modules/node/src/Tests/NodeLinksTest.php @@ -43,4 +43,5 @@ public function testHideLinks() { $this->assertText($node->getTitle()); $this->assertNoLink('Read more'); } -} + +} diff --git a/core/modules/node/src/Tests/Views/NodeFieldFilterTest.php b/core/modules/node/src/Tests/Views/NodeFieldFilterTest.php index d7ffc03..9460c7b 100644 --- a/core/modules/node/src/Tests/Views/NodeFieldFilterTest.php +++ b/core/modules/node/src/Tests/Views/NodeFieldFilterTest.php @@ -112,6 +112,9 @@ public function testFilters() { * Message suffix to display. */ protected function assertPageCounts($path, $counts, $message) { + // Disable read more links. + entity_get_display('node', 'page', 'teaser')->removeComponent('links')->save(); + // Get the text of the page. $this->drupalGet($path); $text = $this->getTextContent(); diff --git a/core/modules/node/src/Tests/Views/RowPluginTest.php b/core/modules/node/src/Tests/Views/RowPluginTest.php index 4813bd6..c9dd7f1 100644 --- a/core/modules/node/src/Tests/Views/RowPluginTest.php +++ b/core/modules/node/src/Tests/Views/RowPluginTest.php @@ -125,27 +125,6 @@ public function testRowPlugin() { $this->assertTrue(strpos($output, $node->body->summary) !== FALSE, 'Make sure the teaser appears in the output of the view.'); $this->assertFalse(strpos($output, $node->body->value) !== FALSE, 'Make sure the full text does not appears in the output of the view if teaser is set as viewmode.'); } - - // Test with links disabled. - $view->rowPlugin->options['links'] = FALSE; - \Drupal::entityManager()->getViewBuilder('node')->resetCache(); - $output = $view->preview(); - $output = drupal_render($output); - $this->drupalSetContent($output); - foreach ($this->nodes as $node) { - $this->assertFalse($this->xpath('//li[contains(@class, :class)]/a[contains(@href, :href)]', array(':class' => 'node-readmore', ':href' => "node/{$node->id()}")), 'Make sure no readmore link appears.'); - } - - // Test with links enabled. - $view->rowPlugin->options['links'] = TRUE; - \Drupal::entityManager()->getViewBuilder('node')->resetCache(); - $output = $view->preview(); - $output = drupal_render($output); - $this->drupalSetContent($output); - foreach ($this->nodes as $node) { - $this->assertTrue($this->xpath('//li[contains(@class, :class)]/a[contains(@href, :href)]', array(':class' => 'node-readmore', ':href' => "node/{$node->id()}")), 'Make sure no readmore link appears.'); - } - } }