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

Breadcrumb

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

function WebAssert::assert

Asserts a condition.

Parameters

bool $condition:

string $message Failure message:

Return value

void

Throws

ExpectationException when the condition is not fulfilled

24 calls to WebAssert::assert()
WebAssert::addressEquals in vendor/behat/mink/src/WebAssert.php
Checks that current session address is equals to provided one.
WebAssert::addressMatches in vendor/behat/mink/src/WebAssert.php
Checks that current session address matches regex.
WebAssert::addressNotEquals in vendor/behat/mink/src/WebAssert.php
Checks that current session address is not equals to provided one.
WebAssert::checkboxChecked in vendor/behat/mink/src/WebAssert.php
Checks that specific checkbox is checked.
WebAssert::checkboxNotChecked in vendor/behat/mink/src/WebAssert.php
Checks that specific checkbox is unchecked.

... See full list

File

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

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

private function assert(bool $condition, string $message) : void {
    if ($condition) {
        return;
    }
    throw new ExpectationException($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