protected function FormAjaxSubscriberTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php \Drupal\Tests\Core\Form\EventSubscriber\FormAjaxSubscriberTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ EventSubscriber/ FormAjaxSubscriberTest.php, line 57
Class
- FormAjaxSubscriberTest
- @coversDefaultClass \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\Form\EventSubscriberCode
protected function setUp() {
parent::setUp();
$this->httpKernel = $this
->createMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
$this->formAjaxResponseBuilder = $this
->createMock('Drupal\\Core\\Form\\FormAjaxResponseBuilderInterface');
$this->stringTranslation = $this
->getStringTranslationStub();
$this->messenger = $this
->createMock(MessengerInterface::class);
$this->subscriber = new FormAjaxSubscriber($this->formAjaxResponseBuilder, $this->stringTranslation, $this->messenger);
}