You are here

protected function WebformElementBrowserTestBase::assertElementPreview in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/Element/WebformElementBrowserTestBase.php \Drupal\Tests\webform\Functional\Element\WebformElementBrowserTestBase::assertElementPreview()

Assert element preview.

Parameters

string $label: The element's label.

string $value: The element's value.

1 call to WebformElementBrowserTestBase::assertElementPreview()
WebformElementDateTest::testDateElement in tests/src/Functional/Element/WebformElementDateTest.php
Test date element.

File

tests/src/Functional/Element/WebformElementBrowserTestBase.php, line 20

Class

WebformElementBrowserTestBase
Defines an abstract test base for webform element tests.

Namespace

Drupal\Tests\webform\Functional\Element

Code

protected function assertElementPreview($label, $value) {
  $this
    ->assertPattern('/<label>' . preg_quote($label, '/') . '<\\/label>\\s+' . preg_quote($value, '/') . '/');
}