You are here

public function MultipleValuesWidgetTest::testNestedEntityCreateAccess in Inline Entity Form 7

Tests entity create access is correct on nested IEF forms.

File

tests/multiple_values_widget.test, line 508

Class

MultipleValuesWidgetTest
IEF multiple values field widget tests.

Code

public function testNestedEntityCreateAccess() {
  $permissions = array(
    'create ief_test_nested1 content',
    'create ief_test_nested2 content',
  );
  $this
    ->setupNestedMultipleForm(TRUE, $permissions);
  $this
    ->assertFieldByName('title');
  $this
    ->assertFieldByName('field_test_ref_nested1[und][form][title]');
  $this
    ->assertNoFieldByName('field_test_ref_nested1[und][form][field_test_ref_nested2][und][form][title]', NULL);
  $this
    ->setupNestedMultipleForm(FALSE, $permissions);
  $this
    ->assertNoFieldByXPath('//input[@type="submit" and @value="Create node 3"]');
}