You are here

public function SelectOrOtherWidgetBaseTest::testDefaultSettings in Select (or other) 8.3

Test if defaultSettings() returns the correct keys.

File

tests/src/Unit/SelectOrOtherWidgetBaseTest.php, line 66

Class

SelectOrOtherWidgetBaseTest
Tests the form element implementation.

Namespace

Drupal\tests\select_or_other\Unit

Code

public function testDefaultSettings() {
  $expected_keys = [
    'select_element_type',
    'available_options',
    'other',
    'other_title',
    'other_unknown_defaults',
    'other_size',
    'sort_options',
  ];
  $actual_keys = array_keys(SelectOrOtherWidgetBase::defaultSettings());
  $this
    ->assertArrayEquals($expected_keys, $actual_keys);
}