function NodeViewTest::testLinkHeader

Same name and namespace in other branches
  1. 9 core/modules/node/tests/src/Functional/NodeViewTest.php \Drupal\Tests\node\Functional\NodeViewTest::testLinkHeader()
  2. 8.9.x core/modules/node/tests/src/Functional/NodeViewTest.php \Drupal\Tests\node\Functional\NodeViewTest::testLinkHeader()
  3. 10 core/modules/node/tests/src/Functional/NodeViewTest.php \Drupal\Tests\node\Functional\NodeViewTest::testLinkHeader()

Tests the Link header.

File

core/modules/node/tests/src/Functional/NodeViewTest.php, line 38

Class

NodeViewTest
Tests the node/{node} page.

Namespace

Drupal\Tests\node\Functional

Code

public function testLinkHeader() : void {
    $node = $this->drupalCreateNode();
    $this->drupalGet($node->toUrl());
    $this->assertArrayNotHasKey('Link', $this->getSession()
        ->getResponseHeaders());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.