function BuildTestBase::assertDrupalVisit

Same name and namespace in other branches
  1. 9 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::assertDrupalVisit()
  2. 8.9.x core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::assertDrupalVisit()
  3. 10 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::assertDrupalVisit()

Helper function to assert that the last visit was a Drupal site.

This method asserts that the X-Generator header shows that the site is a Drupal site.

2 calls to BuildTestBase::assertDrupalVisit()
HtRouterTest::testHtRouter in core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php
@covers ::instantiateServer
InstallTest::testInstall in core/tests/Drupal/BuildTests/TestSiteApplication/InstallTest.php

File

core/tests/Drupal/BuildTests/Framework/BuildTestBase.php, line 338

Class

BuildTestBase
Provides a workspace to test build processes.

Namespace

Drupal\BuildTests\Framework

Code

public function assertDrupalVisit() {
    $this->getMink()
        ->assertSession()
        ->responseHeaderMatches('X-Generator', '/Drupal \\d+ \\(https:\\/\\/www.drupal.org\\)/');
}

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