protected function FormErrorHandlerTest::setUp in Drupal 8
Same name in this branch
- 8 core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php \Drupal\Tests\Core\Form\FormErrorHandlerTest::setUp()
- 8 core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php \Drupal\Tests\inline_form_errors\Unit\FormErrorHandlerTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ FormErrorHandlerTest.php, line 32
Class
- FormErrorHandlerTest
- @coversDefaultClass \Drupal\Core\Form\FormErrorHandler @group Form
Namespace
Drupal\Tests\Core\FormCode
protected function setUp() {
parent::setUp();
$this->messenger = $this
->createMock(MessengerInterface::class);
$this->formErrorHandler = $this
->getMockBuilder('Drupal\\Core\\Form\\FormErrorHandler')
->setMethods([
'messenger',
])
->getMock();
$this->formErrorHandler
->expects($this
->atLeastOnce())
->method('messenger')
->willReturn($this->messenger);
}