function OptionsFieldUITest::testOptionsTrimmedValuesText in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/options/src/Tests/OptionsFieldUITest.php \Drupal\options\Tests\OptionsFieldUITest::testOptionsTrimmedValuesText()
Options (text) : test 'trimmed values' input.
File
- core/
modules/ options/ src/ Tests/ OptionsFieldUITest.php, line 252 - Contains \Drupal\options\Tests\OptionsFieldUITest.
Class
- OptionsFieldUITest
- Tests the Options field UI functionality.
Namespace
Drupal\options\TestsCode
function testOptionsTrimmedValuesText() {
$this->fieldName = 'field_options_trimmed_text';
$this
->createOptionsField('list_string');
// Explicit keys.
$string = "zero |Zero\none | One";
$array = array(
'zero' => 'Zero',
'one' => 'One',
);
$this
->assertAllowedValuesInput($string, $array, 'Explicit keys are accepted and trimmed.');
}