You are here

public function CspSubscriberTest::setUp in Googalytics - Google Analytics 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/EventSubscriber/CspSubscriberTest.php, line 31

Class

CspSubscriberTest
Test for Content Security Policy event integration.

Namespace

Drupal\Tests\ga\Unit\EventSubscriber

Code

public function setUp() {
  parent::setUp();
  if (!class_exists(Csp::class)) {
    $this
      ->markTestSkipped('Content Security Policy module is not available.');
  }
  $this->response = $this
    ->getMockBuilder(HtmlResponse::class)
    ->disableOriginalConstructor()
    ->getMock();
}