You are here

public function YamlFormOptionsHelperTest::testGetOptionsText in YAML Form 8

Tests YamlFormOptionsHelper::getOptionsText().

@dataProvider providerGetOptionsText

Parameters

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

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

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

See also

YamlFormOptionsHelperl::getOptionsText()

File

tests/src/Unit/YamlFormOptionsHelperTest.php, line 79

Class

YamlFormOptionsHelperTest
Tests form options utility.

Namespace

Drupal\Tests\yamlform\Unit

Code

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