protected function AssertContentTrait::assertNoText in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/AssertContentTrait.php \Drupal\KernelTests\AssertContentTrait::assertNoText()
- 10 core/tests/Drupal/KernelTests/AssertContentTrait.php \Drupal\KernelTests\AssertContentTrait::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.
string $message: (optional) A message to display with the assertion. Do not translate messages: use \Drupal\Component\Render\FormattableMarkup to embed variables in the message text, not t(). If left blank, a default message will be displayed.
string $group: (optional) The group this message is in, which is displayed in a column in test output. Use 'Debug' to indicate this is debugging output. Do not translate this string. Defaults to 'Other'; most tests do not override this default.
Return value
bool TRUE on pass, FALSE on fail.
See also
\Drupal\simpletest\AssertContentTrait::assertNoRaw()
11 calls to AssertContentTrait::assertNoText()
- AreaEmptyTest::testRenderEmptyHeaderFooter in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaEmptyTest.php - Tests that the header and footer areas are not rendered if empty.
- AreaResultTest::testResultEmpty in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaResultTest.php - Tests the results area handler.
- ClassyTest::testClassyTheme in core/
modules/ system/ tests/ src/ Kernel/ Render/ ClassyTest.php - Test the classy theme.
- CommentAdminViewTest::doTestFilters in core/
modules/ comment/ tests/ src/ Kernel/ Views/ CommentAdminViewTest.php - Tests comment admin view display.
- ContentTranslationUITestBase::doTestBasicTranslation in core/
modules/ content_translation/ src/ Tests/ ContentTranslationUITestBase.php - Tests the basic translation workflow.
File
- core/
tests/ Drupal/ KernelTests/ AssertContentTrait.php, line 598
Class
- AssertContentTrait
- Provides test methods to assert content.
Namespace
Drupal\KernelTestsCode
protected function assertNoText($text, $message = '', $group = 'Other') {
return $this
->assertTextHelper($text, $message, $group, TRUE);
}