You are here

protected function AssertContentTrait::assertNoText in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/AssertContentTrait.php \Drupal\simpletest\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\Utility\SafeMarkup::format() 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()

222 calls to AssertContentTrait::assertNoText()
AggregatorRenderingTest::testBlockLinks in core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
Adds a feed block to the page and checks its links.
BaseFieldAccessTest::testProtectedField in core/modules/views/src/Tests/Entity/BaseFieldAccessTest.php
Test access to protected base fields.
BasicAuthTest::testBasicAuth in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Test http basic authentication.
BasicAuthTest::testUnauthorizedErrorMessage in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Tests if a comprehensive message is displayed when the route is denied.
BasicTest::testViewsWizardAndListing in core/modules/views/src/Tests/Wizard/BasicTest.php

... See full list

File

core/modules/simpletest/src/AssertContentTrait.php, line 582
Contains \Drupal\simpletest\AssertContentTrait.

Class

AssertContentTrait
Provides test methods to assert content.

Namespace

Drupal\simpletest

Code

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