function FormErrorHandlerTest::setUp
Same name in this branch
- 11.x core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php \Drupal\Tests\inline_form_errors\Unit\FormErrorHandlerTest::setUp()
Same name and namespace in other branches
- 9 core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php \Drupal\Tests\inline_form_errors\Unit\FormErrorHandlerTest::setUp()
- 9 core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php \Drupal\Tests\Core\Form\FormErrorHandlerTest::setUp()
- 8.9.x core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php \Drupal\Tests\inline_form_errors\Unit\FormErrorHandlerTest::setUp()
- 8.9.x core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php \Drupal\Tests\Core\Form\FormErrorHandlerTest::setUp()
- 10 core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php \Drupal\Tests\inline_form_errors\Unit\FormErrorHandlerTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php \Drupal\Tests\Core\Form\FormErrorHandlerTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormErrorHandlerTest.php, line 34
Class
- FormErrorHandlerTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Form%21FormErrorHandler.php/class/FormErrorHandler/11.x" title="Handles form errors." class="local">\Drupal\Core\Form\FormErrorHandler</a> @group Form
Namespace
Drupal\Tests\Core\FormCode
protected function setUp() : void {
parent::setUp();
$this->messenger = $this->createMock(MessengerInterface::class);
$this->formErrorHandler = $this->getMockBuilder('Drupal\\Core\\Form\\FormErrorHandler')
->onlyMethods([
'messenger',
])
->getMock();
$this->formErrorHandler
->expects($this->atLeastOnce())
->method('messenger')
->willReturn($this->messenger);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.