function FieldConfigEditFormTest::testHasAnyRequired

Same name and namespace in other branches
  1. 11.x core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php \Drupal\Tests\field_ui\Unit\FieldConfigEditFormTest::testHasAnyRequired()
  2. 10 core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php \Drupal\Tests\field_ui\Unit\FieldConfigEditFormTest::testHasAnyRequired()

Tests has any required.

Attributes

#[DataProvider('providerRequired')]

File

core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php, line 47

Class

FieldConfigEditFormTest
Tests Drupal\field_ui\Form\FieldConfigEditForm.

Namespace

Drupal\Tests\field_ui\Unit

Code

public function testHasAnyRequired(array $element, bool $result) : void {
  $reflection = new \ReflectionClass('\\Drupal\\field_ui\\Form\\FieldConfigEditForm');
  $method = $reflection->getMethod('hasAnyRequired');
  $this->assertEquals($result, $method->invoke($this->fieldConfigEditForm, $element));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.