public function YamlFormOptionsHelperTest::testHasOption in YAML Form 8
Tests YamlFormOptionsHelper::hasOption().
@dataProvider providerHasOption
Parameters
string $value: The value to run through YamlFormOptionsHelper::hasOption().
array $options: The array to run through YamlFormOptionsHelper::hasOption().
string $expected: The expected result from calling the function.
See also
YamlFormOptionsHelperl::hasOption()
File
- tests/
src/ Unit/ YamlFormOptionsHelperTest.php, line 31
Class
- YamlFormOptionsHelperTest
- Tests form options utility.
Namespace
Drupal\Tests\yamlform\UnitCode
public function testHasOption($value, array $options, $expected) {
$result = YamlFormOptionsHelper::hasOption($value, $options);
$this
->assertEquals($expected, $result);
}