Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. WebAssert.php

function WebAssert::responseHeaderContains

Checks that current response header contains value.

Parameters

string $name:

string $value:

Return value

void

Throws

ExpectationException

File

vendor/behat/mink/src/WebAssert.php, line 211

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

public function responseHeaderContains(string $name, string $value) {
    $actual = (string) $this->session
        ->getResponseHeader($name);
    $message = sprintf('The text "%s" was not found anywhere in the "%s" response header.', $value, $name);
    $this->assert(false !== stripos($actual, $value), $message);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal