public function WebformOptionsHelperTest::providerGetOptionsText in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Unit/Utility/WebformOptionsHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformOptionsHelperTest::providerGetOptionsText()
Data provider for testGetOptionsText().
See also
testGetOptionsText()
File
- tests/
src/ Unit/ Utility/ WebformOptionsHelperTest.php, line 74
Class
- WebformOptionsHelperTest
- Tests webform options utility.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function providerGetOptionsText() {
$tests[] = [
[
'value',
],
[
'value' => 'text',
],
[
'text',
],
];
$tests[] = [
[
1,
3,
],
[
1 => 'One',
2 => 'Two',
'optgroup' => [
3 => 'Three',
],
],
[
'One',
'Three',
],
];
$tests[] = [
[
2,
],
[
'optgroup1' => [
1 => 'One',
],
'optgroup2' => [
2 => 'Two',
],
],
[
'Two',
],
];
return $tests;
}