function FormStateDecoratorBaseTest::testGetError
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php \Drupal\Tests\Core\Form\FormStateDecoratorBaseTest::testGetError()
- 9 core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php \Drupal\Tests\Core\Form\FormStateDecoratorBaseTest::testGetError()
- 8.9.x core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php \Drupal\Tests\Core\Form\FormStateDecoratorBaseTest::testGetError()
Tests get error.
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormStateDecoratorBaseTest.php, line 1321
Class
Namespace
Drupal\Tests\Core\FormCode
public function testGetError() : void {
$element = [
'#foo' => 'bar',
];
$message = 'bar';
$this->decoratedFormState
->getError($element)
->willReturn($message)
->shouldBeCalled();
$this->assertSame($message, $this->formStateDecoratorBase
->getError($element));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.