public function WebAssert::responseContains in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/WebAssert.php \Drupal\Tests\WebAssert::responseContains()
- 9 core/tests/Drupal/Tests/WebAssert.php \Drupal\Tests\WebAssert::responseContains()
Checks that page HTML (response content) contains text.
Parameters
string|object $text: Text value. Any non-string value will be cast to string.
Throws
\Behat\Mink\Exception\ExpectationException
File
- core/
tests/ Drupal/ Tests/ WebAssert.php, line 504
Class
- WebAssert
- Defines a class with methods for asserting presence of elements during tests.
Namespace
Drupal\TestsCode
public function responseContains($text) {
assert(func_num_args() === 1);
parent::responseContains((string) $text);
}