function FieldConfigEditFormTest::testHasAnyRequired

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

@covers ::hasAnyRequired

@dataProvider providerRequired

File

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

Class

FieldConfigEditFormTest
@coversDefaultClass \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.