You are here

public function InlineFragmentRendererTest::testRenderWithTrustedHeaderDisabled in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php \Symfony\Component\HttpKernel\Tests\Fragment\InlineFragmentRendererTest::testRenderWithTrustedHeaderDisabled()

File

vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php, line 70

Class

InlineFragmentRendererTest

Namespace

Symfony\Component\HttpKernel\Tests\Fragment

Code

public function testRenderWithTrustedHeaderDisabled() {
  $trustedHeaderName = Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP);
  Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, '');
  $strategy = new InlineFragmentRenderer($this
    ->getKernelExpectingRequest(Request::create('/')));
  $strategy
    ->render('/', Request::create('/'));
  Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, $trustedHeaderName);
}