You are here

public function NegotiationMiddlewareTest::testAjaxIframeUpload in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::testAjaxIframeUpload()
  2. 9 core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::testAjaxIframeUpload()

Tests the getContentType() method with AJAX iframe upload.

@covers ::getContentType

File

core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php, line 48
Contains \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest.

Class

NegotiationMiddlewareTest
@coversDefaultClass \Drupal\Core\StackMiddleware\NegotiationMiddleware @group NegotiationMiddleware

Namespace

Drupal\Tests\Core\StackMiddleware

Code

public function testAjaxIframeUpload() {
  $request = new Request();
  $request->request
    ->set('ajax_iframe_upload', '1');
  $this
    ->assertSame('iframeupload', $this->contentNegotiation
    ->getContentType($request));
}