You are here

public function DfpHtmlResponseAttachmentsProcessorTest::testProcessAttachmentsNoSlots in Doubleclick for Publishers (DFP) 8

@covers ::processAttachments

File

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

Class

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

Namespace

Drupal\Tests\dfp\Unit

Code

public function testProcessAttachmentsNoSlots() {

  // Ensure that if there are no slots nothing is added to the attachments.
  $response = new HtmlResponse();
  $config_factory = $this
    ->getConfigFactoryStub();
  $response = $this
    ->getDfpAttachmentProcessor($config_factory)
    ->processAttachments($response);
  $this
    ->assertEmpty($response
    ->getAttachments());
}