You are here

public function RobotsTxtBasicTest::testRobotsTxtCacheTags in RobotsTxt 8

Test that the robots.txt path delivers content the appropriate cache tags.

File

tests/src/Functional/RobotsTxtBasicTest.php, line 92

Class

RobotsTxtBasicTest
Tests basic functionality of configured robots.txt files.

Namespace

Drupal\Tests\robotstxt\Functional

Code

public function testRobotsTxtCacheTags() {
  $this
    ->drupalGet('robots-test.txt');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->responseHeaderContains('X-Drupal-Cache-Tags', 'robotstxt');
}