You are here

protected function MultipleValuesWidgetTest::setAllowExisting in Inline Entity Form 7

Sets allow_existing IEF setting.

Parameters

bool $flag: "allow_existing" flag to be set.

5 calls to MultipleValuesWidgetTest::setAllowExisting()
MultipleValuesWidgetTest::testEditedInlineEntityValidation in tests/multiple_values_widget.test
Tests if a referenced content can be edited while the referenced content is newer than the referencing parent node.
MultipleValuesWidgetTest::testEmptyFieldIEF in tests/multiple_values_widget.test
Tests if form behaves correctly when field is empty.
MultipleValuesWidgetTest::testEntityCreation in tests/multiple_values_widget.test
Tests creation of entities.
MultipleValuesWidgetTest::testEntityEditingAndRemoving in tests/multiple_values_widget.test
Tests if editing and removing entities work.
MultipleValuesWidgetTest::testReferencingExistingEntities in tests/multiple_values_widget.test
Tests if referencing existing entities work.

File

tests/multiple_values_widget.test, line 552

Class

MultipleValuesWidgetTest
IEF multiple values field widget tests.

Code

protected function setAllowExisting($flag) {
  $edit = array(
    'instance[widget][settings][type_settings][allow_existing]' => $flag,
  );
  $this
    ->drupalPost('admin/structure/types/manage/ief-test-multiple/fields/field_multiple_nodes', $edit, t('Save settings'));
  $this
    ->drupalGet('admin/structure/types/manage/ief-test-multiple/fields/field_multiple_nodes');
}