protected function WebformAssertLegacyTrait::assertPattern in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::assertPattern()
Triggers a pass if the Perl regex pattern is found in the raw content.
Parameters
string $pattern: Perl regex to look for including the regex delimiters.
18 calls to WebformAssertLegacyTrait::assertPattern()
- WebformElementBrowserTestBase::assertElementPreview in tests/
src/ Functional/ Element/ WebformElementBrowserTestBase.php - Assert element preview.
- WebformElementCheckboxTest::testCheckboxValue in tests/
src/ Functional/ Element/ WebformElementCheckboxTest.php - Tests checkbox value element.
- WebformElementHeightTest::testheightElement in tests/
src/ Functional/ Element/ WebformElementHeightTest.php - Test height element.
- WebformElementLikertTest::testLikertElement in tests/
src/ Functional/ Element/ WebformElementLikertTest.php - Test likert element.
- WebformElementRadiosTest::testElementRadios in tests/
src/ Functional/ Element/ WebformElementRadiosTest.php - Tests radios element.
File
- tests/
src/ Traits/ WebformAssertLegacyTrait.php, line 622
Class
- WebformAssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function assertPattern($pattern) {
$this
->assertSession()
->responseMatches($pattern);
}