function BigPipeResponseAttachmentsProcessorTest::testNonHtmlResponse

Same name and namespace in other branches
  1. 11.x core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php \Drupal\Tests\big_pipe\Unit\Render\BigPipeResponseAttachmentsProcessorTest::testNonHtmlResponse()
  2. 10 core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php \Drupal\Tests\big_pipe\Unit\Render\BigPipeResponseAttachmentsProcessorTest::testNonHtmlResponse()
  3. 9 core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php \Drupal\Tests\big_pipe\Unit\Render\BigPipeResponseAttachmentsProcessorTest::testNonHtmlResponse()
  4. 8.9.x core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php \Drupal\Tests\big_pipe\Unit\Render\BigPipeResponseAttachmentsProcessorTest::testNonHtmlResponse()

Tests non html response.

@legacy-covers ::processAttachments

Attributes

#[DataProvider('nonHtmlResponseProvider')]

File

core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php, line 41

Class

BigPipeResponseAttachmentsProcessorTest
Tests Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor.

Namespace

Drupal\Tests\big_pipe\Unit\Render

Code

public function testNonHtmlResponse($response_class) : void {
  $big_pipe_response_attachments_processor = $this->createBigPipeResponseAttachmentsProcessor($this->prophesize(AttachmentsResponseProcessorInterface::class));
  $non_html_response = new $response_class();
  $this->expectException(\AssertionError::class);
  $big_pipe_response_attachments_processor->processAttachments($non_html_response);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.