You are here

public function WebformOptionsHelperTest::testConvertOptionsToString in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/Utility/WebformOptionsHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformOptionsHelperTest::testConvertOptionsToString()

Tests WebformOptionsHelper::convertOptionsToString().

@dataProvider providerConvertOptionsToString

Parameters

array $options: The array to run through WebformOptionsHelper::range().

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

See also

WebformOptionsHelper::convertOptionsToString()

File

tests/src/Unit/Utility/WebformOptionsHelperTest.php, line 93

Class

WebformOptionsHelperTest
Tests webform options utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function testConvertOptionsToString(array $options, $expected) {
  $result = WebformOptionsHelper::convertOptionsToString($options);
  $this
    ->assertEquals($expected, $result);
}