You are here

protected function AdvbanMiddlewareTest::setUp in Advanced ban 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/AdvbanMiddlewareTest.php, line 41

Class

AdvbanMiddlewareTest
@coversDefaultClass \Drupal\advban\AdvbanMiddleware @group Advban

Namespace

Drupal\Tests\advban\Unit

Code

protected function setUp() {
  parent::setUp();
  $this->kernel = $this
    ->createMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
  $this->banManager = $this
    ->createMock('Drupal\\advban\\AdvbanIpManagerInterface');
  $this->banMiddleware = new AdvbanMiddleware($this->kernel, $this->banManager);
}