function WebAssert::assertElementText
Asserts a condition involving the text of an element.
Parameters
bool $condition:
string $message Failure message:
Element $element:
Return value
void
Throws
ElementTextException when the condition is not fulfilled
2 calls to WebAssert::assertElementText()
- WebAssert::elementTextContains in vendor/
behat/ mink/ src/ WebAssert.php - Checks that specific element contains text.
- WebAssert::elementTextNotContains in vendor/
behat/ mink/ src/ WebAssert.php - Checks that specific element does not contains text.
File
-
vendor/
behat/ mink/ src/ WebAssert.php, line 941
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
private function assertElementText(bool $condition, string $message, Element $element) : void {
if ($condition) {
return;
}
throw new ElementTextException($message, $this->session
->getDriver(), $element);
}