protected function WebTestBase::assertNoText

Pass if the text is NOT found on the text version of the page. The text version is the equivalent of what a user would see when viewing through a web browser. In other words the HTML has been filtered out of the contents.

Parameters

$text: Plain text to look for.

$message: (optional) A message to display with the assertion. Do not translate messages: use format_string() to embed variables in the message text, not t(). If left blank, a default message will be displayed.

$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

TRUE on pass, FALSE on fail.

145 calls to WebTestBase::assertNoText()
AggregatorRenderingTest::testBlockLinks in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php
Add a feed block to the page and checks its links.
BasicTest::testViewsWizardAndListing in drupal/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php
BlockCacheTest::testCachePerPage in drupal/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
Test DRUPAL_CACHE_PER_PAGE.
BlockCacheTest::testCachePerRole in drupal/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
Test DRUPAL_CACHE_PER_ROLE.
BlockLanguageTest::testLanguageBlockVisibility in drupal/core/modules/block/lib/Drupal/block/Tests/BlockLanguageTest.php
Tests the visibility settings for the blocks based on language.

... See full list

File

drupal/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php, line 2205
Definition of Drupal\simpletest\WebTestBase.

Class

WebTestBase
Test case for typical Drupal tests.

Namespace

Drupal\simpletest

Code

protected function assertNoText($text, $message = '', $group = 'Other') {
  return $this
    ->assertTextHelper($text, $message, $group, TRUE);
}