You are here

protected function FormAjaxSubscriberTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 54
Contains \Drupal\Tests\Core\Form\EventSubscriber\FormAjaxSubscriberTest.

Class

FormAjaxSubscriberTest
@coversDefaultClass \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber @group EventSubscriber

Namespace

Drupal\Tests\Core\Form\EventSubscriber

Code

protected function setUp() {
  parent::setUp();
  $this->httpKernel = $this
    ->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
  $this->formAjaxResponseBuilder = $this
    ->getMock('Drupal\\Core\\Form\\FormAjaxResponseBuilderInterface');
  $this->stringTranslation = $this
    ->getStringTranslationStub();
  $this->subscriber = new FormAjaxSubscriber($this->formAjaxResponseBuilder, $this->stringTranslation);
}