You are here

public function UniqueFieldAjaxTest::testUniqueFieldNotEnabledNoIssues in Unique field ajax 2.x

Test if not field is not enabled we can edit without issues.

Throws

\Drupal\Core\Entity\EntityStorageException

\Behat\Mink\Exception\ResponseTextException

File

tests/src/Functional/UniqueFieldAjaxTest.php, line 18

Class

UniqueFieldAjaxTest
Test the field permissions report page.

Namespace

Drupal\Tests\unique_field_ajax\Functional

Code

public function testUniqueFieldNotEnabledNoIssues() {
  foreach ($this->fieldTypes as $field_type) {
    $this
      ->createField($field_type['type'], $field_type['widget'], $field_type['settings']);
    $field_name = $this->fieldStorage
      ->getName();

    // Field unique is not enabled should be able to create anything.
    $this
      ->updateThirdPartyFieldSetting('unique', FALSE);
    $edit = $this
      ->createUpdateFieldData($field_name, $field_type['value'], $field_type['effect']);
    $this
      ->itCanSaveField($edit);
    $this
      ->itCanSaveField($edit);
    $this
      ->itCanSaveField($edit);
    $this
      ->itCanSaveField($edit);
  }
}