function ConfigTargetTest::testFromFormException

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php \Drupal\Tests\Core\Form\ConfigTargetTest::testFromFormException()

@covers ::fromForm @dataProvider providerTestFromFormException

File

core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php, line 161

Class

ConfigTargetTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Form%21ConfigTarget.php/class/ConfigTarget/11.x" title="Represents the mapping of a config property to a form element." class="local">\Drupal\Core\Form\ConfigTarget</a> @group Form

Namespace

Drupal\Tests\Core\Form

Code

public function testFromFormException(array $form, array $array_parents, string $exception_message) : void {
    $this->expectException(\LogicException::class);
    $this->expectExceptionMessage($exception_message);
    ConfigTarget::fromForm($array_parents, $form);
}

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