You are here

public function WebformOptionsHelperTest::testGetOptionsText 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::testGetOptionsText()

Tests WebformOptionsHelper::getOptionsText().

@dataProvider providerGetOptionsText

Parameters

array $values: The array to run through WebformOptionsHelper::getOptionsText().

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

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

See also

WebformOptionsHelper::getOptionsText()

File

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

Class

WebformOptionsHelperTest
Tests webform options utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

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