You are here

protected function DfpHtmlResponseAttachmentsProcessorTest::setUp in Doubleclick for Publishers (DFP) 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/DfpHtmlResponseAttachmentsProcessorTest.php, line 88
Contains \Drupal\Tests\dfp\Unit\DfpHtmlResponseAttachmentsProcessorTest.

Class

DfpHtmlResponseAttachmentsProcessorTest
@coversDefaultClass \Drupal\dfp\DfpHtmlResponseAttachmentsProcessor @group dfp

Namespace

Drupal\Tests\dfp\Unit

Code

protected function setUp() {
  parent::setUp();

  // Mock core attachment processor.
  $this->attachmentProcessor = $this
    ->getMockBuilder(AttachmentsResponseProcessorInterface::class)
    ->disableOriginalConstructor()
    ->getMock();
  $this->attachmentProcessor
    ->method('processAttachments')
    ->willReturnArgument(0);
  $this->token = $this
    ->prophesize(TokenInterface::class);
  $this->assetResolver = $this
    ->prophesize(AssetResolverInterface::class);
  $this->cssCollectionRenderer = $this
    ->prophesize(AssetCollectionRendererInterface::class);
  $this->jsCollectionRenderer = $this
    ->prophesize(AssetCollectionRendererInterface::class);
  $this->requestStack = $this
    ->prophesize(RequestStack::class);
  $this->renderer = $this
    ->prophesize(RendererInterface::class);
  $this->moduleHandler = $this
    ->prophesize(ModuleHandlerInterface::class);
}