You are here

public function WebformHtmlHelperTest::testHasBlockTags in Webform 8.5

Same name and namespace in other branches
  1. 6.x tests/src/Unit/Utility/WebformHtmlHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformHtmlHelperTest::testHasBlockTags()

Tests WebformHtmlHelper::hasBlockTags().

@dataProvider providerHasBlockTags

Parameters

string $text: Text to run through WebformHtmlHelper::hasBlockTags().

string $expected: The expected result from calling the function.

See also

\Drupal\webform\Utility\WebformHtmlHelper::hasBlockTags()

File

tests/src/Unit/Utility/WebformHtmlHelperTest.php, line 139

Class

WebformHtmlHelperTest
Tests webform HTML helper.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function testHasBlockTags($text, $expected) {
  $result = WebformHtmlHelper::hasBlockTags($text);
  $this
    ->assertEquals($expected, $result, $text);
}