function UncaughtExceptionTest::assertNoText
Passes if the page (with HTML stripped) does not contains the text.
Note that stripping HTML tags also removes their attributes, such as the values of text fields.
Parameters
string $text: Plain text to look for.
Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
- $this->assertSession()->responseNotContains() for non-HTML responses, like XML or Json.
- $this->assertSession()->pageTextNotContains() for HTML responses. Unlike the deprecated assertNoText(), the passed text should be HTML decoded, exactly as a human sees it in the browser.
Overrides AssertLegacyTrait::assertNoText
3 calls to UncaughtExceptionTest::assertNoText()
- UncaughtExceptionTest::assertNoRaw in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Passes if the raw text IS not found on the loaded page, fail otherwise.
- UncaughtExceptionTest::testUncaughtException in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests uncaught exception handling when system is in a bad state.
- UncaughtExceptionTest::testUncaughtExceptionCustomExceptionHandler in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests uncaught exception handling with custom exception handler.
File
-
core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php, line 380
Class
- UncaughtExceptionTest
- Tests kernel panic when things are really messed up.
Namespace
Drupal\FunctionalTests\BootstrapCode
protected function assertNoText($text) {
$this->assertStringNotContainsString($text, $this->response);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.