You are here

public function ServerBagTest::testHttpDigestAuthWithPhpCgiRedirect in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/ServerBagTest.php \Symfony\Component\HttpFoundation\Tests\ServerBagTest::testHttpDigestAuthWithPhpCgiRedirect()

File

vendor/symfony/http-foundation/Tests/ServerBagTest.php, line 124

Class

ServerBagTest
ServerBagTest.

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testHttpDigestAuthWithPhpCgiRedirect() {
  $digest = 'Digest username="foo", realm="acme", nonce="' . md5('secret') . '", uri="/protected, qop="auth"';
  $bag = new ServerBag(array(
    'REDIRECT_HTTP_AUTHORIZATION' => $digest,
  ));
  $this
    ->assertEquals(array(
    'AUTHORIZATION' => $digest,
    'PHP_AUTH_DIGEST' => $digest,
  ), $bag
    ->getHeaders());
}