public function CckSelectOtherMultipleFieldTest::setUp in CCK Select Other 8
Overrides CckSelectOtherTestBase::setUp
File
- tests/
src/ Functional/ CckSelectOtherMultipleFieldTest.php, line 43
Class
- CckSelectOtherMultipleFieldTest
- Tests that two select other fields work on the same node.
Namespace
Drupal\Tests\cck_select_other\FunctionalCode
public function setUp() {
parent::setUp();
// Create the first field.
$this->firstOptions = $this
->createOptions();
$field_info = [
'settings' => [
'allowed_values' => $this->firstOptions,
],
'cardinality' => 1,
];
$config_info = [
'required' => 0,
];
$this->firstField = $this
->createSelectOtherListField('list_string', $field_info, $config_info);
// Create the second field.
$this->secondOptions = $this
->createOptions();
$field_info['settings']['allowed_values'] = $this->secondOptions;
$this->secondField = $this
->createSelectOtherListField('list_string', $field_info, $config_info);
}