function NegotiationMiddlewareTest::testAjaxIframeUpload

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::testAjaxIframeUpload()
  2. 8.9.x core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::testAjaxIframeUpload()
  3. 11.x 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 45

Class

NegotiationMiddlewareTest
@coversDefaultClass \Drupal\Core\StackMiddleware\NegotiationMiddleware[[api-linebreak]] @group NegotiationMiddleware

Namespace

Drupal\Tests\Core\StackMiddleware

Code

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

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