You are here

protected function BanMiddlewareTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/ban/tests/src/Unit/BanMiddlewareTest.php \Drupal\Tests\ban\Unit\BanMiddlewareTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/ban/tests/src/Unit/BanMiddlewareTest.php, line 46
Contains \Drupal\Tests\ban\Unit\BanMiddlewareTest.

Class

BanMiddlewareTest
@coversDefaultClass \Drupal\ban\BanMiddleware @group ban

Namespace

Drupal\Tests\ban\Unit

Code

protected function setUp() {
  parent::setUp();
  $this->kernel = $this
    ->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
  $this->banManager = $this
    ->getMock('Drupal\\ban\\BanIpManagerInterface');
  $this->banMiddleware = new BanMiddleware($this->kernel, $this->banManager);
}