function AssertLegacyTrait::assertRaw

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertRaw()

Passes if the raw text IS found on the loaded page, fail otherwise.

Raw text refers to the raw HTML that the page generated.

Parameters

string $raw: Raw (HTML) string to look for.

Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() instead.

480 calls to AssertLegacyTrait::assertRaw()
AccessDeniedTest::testAccessDenied in core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
ActionListTest::testEmptyActionList in core/modules/action/tests/src/Functional/ActionListTest.php
Tests the behavior when there are no actions to list in the admin page.
ActionUninstallTest::testActionUninstall in core/modules/action/tests/src/Functional/ActionUninstallTest.php
Tests Action uninstall.
AddFeedTest::testAddFeed in core/modules/aggregator/tests/src/Functional/AddFeedTest.php
Creates and ensures that a feed is unique, checks source, and deletes feed.
AdminMetaTagTest::testMetaTag in core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php
Verify that the meta tag HTML is generated correctly.

... See full list

1 method overrides AssertLegacyTrait::assertRaw()
UncaughtExceptionTest::assertRaw in core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
Passes if the raw text IS found on the loaded page, fail otherwise.

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 314

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertRaw($raw) {
    $this->assertSession()
        ->responseContains($raw);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.