function FieldConfigEditFormTest::testHasAnyRequired

Tests has any required.

@legacy-covers ::hasAnyRequired

Attributes

#[DataProvider('providerRequired')]

File

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

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.