public function FieldFormatterFromViewDisplayUITest::testFieldFormatterFromViewConfigForm in (Entity Reference) Field Formatters 8
Same name and namespace in other branches
- 8.2 src/Tests/FieldFormatterFromViewDisplayUITest.php \Drupal\field_formatter\Tests\FieldFormatterFromViewDisplayUITest::testFieldFormatterFromViewConfigForm()
- 3.x src/Tests/FieldFormatterFromViewDisplayUITest.php \Drupal\field_formatter\Tests\FieldFormatterFromViewDisplayUITest::testFieldFormatterFromViewConfigForm()
Tests a field_formatter from view config form.
File
- src/
Tests/ FieldFormatterFromViewDisplayUITest.php, line 71
Class
- FieldFormatterFromViewDisplayUITest
- Ensures that field_formatter UI work correctly.
Namespace
Drupal\field_formatter\TestsCode
public function testFieldFormatterFromViewConfigForm() {
$account = $this
->drupalCreateUser([
'administer node display',
]);
$this
->drupalLogin($account);
$this
->drupalGet('admin/structure/types/manage/test_content_type/display');
$this
->drupalPostAjaxForm(NULL, [], 'field_field_test_ref_settings_edit');
$this
->assertFieldByName('fields[field_field_test_ref][settings_edit_form][settings][view_mode]', NULL, 'Field to select the view mode is available.');
$this
->assertRaw('<option value="default">Default</option>', 'Default view mode can be selected.');
$this
->assertFieldByName('fields[field_field_test_ref][settings_edit_form][settings][field_name]', NULL, 'Field to select the field name is available.');
}