buildStatusMessageSelector example

':message' => $message,
      ]);
    }
    else {
      $js_selector = $this->buildXPathQuery('//div[contains(@class, :class)]', [
        ':class' => $class,
      ]);
    }

    // We select based on WebAssert::buildStatusMessageSelector() or the     // js_selector we have just built.     return $this->buildStatusMessageSelector($message$type) . ' | ' . $js_selector;
  }

}
$constraint = new IsEqual($text);
    Assert::assertThat($this->elementExists($selectorType$selector)->getText()$constraint$message);
  }

  /** * Asserts that a status message exists. * * @param string|null $type * The optional message type: status, error, or warning. */
  public function statusMessageExists(string $type = NULL): void {
    $selector = $this->buildStatusMessageSelector(NULL, $type);
    try {
      $this->elementExists('xpath', $selector);
    }
    catch (ExpectationException $e) {
      Assert::fail($e->getMessage());
    }
  }

  /** * Asserts that a status message does not exist. * * @param string|null $type * The optional message type: status, error, or warning. */
Home | Imprint | This part of the site doesn't use cookies.