You are here

protected function FormassemblyHtmlResponseAttachmentsProcessorTest::setUp in FormAssembly 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/FormassemblyHtmlResponseAttachmentsProcessorTest.php, line 85

Class

FormassemblyHtmlResponseAttachmentsProcessorTest
Unit test calls for FormassemblyHtmlResponseAttachmentsProcessor.

Namespace

Drupal\Tests\formassembly\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->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);
}