protected function WebformAssertLegacyTrait::assertRaw in Webform 8.5
Same name and namespace in other branches
- 6.x tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::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.
210 calls to WebformAssertLegacyTrait::assertRaw()
- WebformAccessEntityJsonApiTest::testRestAccess in tests/
src/ Functional/ Access/ WebformAccessEntityJsonApiTest.php - Tests webform entity REST acces.
- WebformAccessEntityPermissionsTest::testAccessControlHandler in tests/
src/ Functional/ Access/ WebformAccessEntityPermissionsTest.php - Tests webform entity access controls.
- WebformAccessEntityRestTest::testRestAccess in tests/
src/ Functional/ Access/ WebformAccessEntityRestTest.php - Tests webform entity REST acces.
- WebformAccessEntityRulesTest::testAccessRules in tests/
src/ Functional/ Access/ WebformAccessEntityRulesTest.php - Tests webform entity access rules.
- WebformAccessSubmissionPermissionsTest::testPermissions in tests/
src/ Functional/ Access/ WebformAccessSubmissionPermissionsTest.php - Test webform submission access permissions.
File
- tests/
src/ Traits/ WebformAssertLegacyTrait.php, line 307
Class
- WebformAssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function assertRaw($raw) {
$actual = $this
->getRawContent();
$message = sprintf('The string "%s" was not found anywhere in the HTML response of the current page.', $raw);
$this
->assertNotSame(strpos($actual, (string) $raw), false, $message);
}