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

Breadcrumb

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

function WebAssert::assertResponseText

Asserts a condition involving the response text.

Parameters

bool $condition:

string $message Failure message:

Return value

void

Throws

ResponseTextException when the condition is not fulfilled

4 calls to WebAssert::assertResponseText()
WebAssert::pageTextContains in vendor/behat/mink/src/WebAssert.php
Checks that current page contains text.
WebAssert::pageTextMatches in vendor/behat/mink/src/WebAssert.php
Checks that current page text matches regex.
WebAssert::pageTextNotContains in vendor/behat/mink/src/WebAssert.php
Checks that current page does not contain text.
WebAssert::pageTextNotMatches in vendor/behat/mink/src/WebAssert.php
Checks that current page text does not match regex.

File

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

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

private function assertResponseText(bool $condition, string $message) : void {
    if ($condition) {
        return;
    }
    throw new ResponseTextException($message, $this->session
        ->getDriver());
}

API Navigation

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