You are here

public function ServerBagTest::testHttpBasicAuthWithPhpCgiRedirect 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::testHttpBasicAuthWithPhpCgiRedirect()

File

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

Class

ServerBagTest
ServerBagTest.

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testHttpBasicAuthWithPhpCgiRedirect() {
  $bag = new ServerBag(array(
    'REDIRECT_HTTP_AUTHORIZATION' => 'Basic ' . base64_encode('username:pass:word'),
  ));
  $this
    ->assertEquals(array(
    'AUTHORIZATION' => 'Basic ' . base64_encode('username:pass:word'),
    'PHP_AUTH_USER' => 'username',
    'PHP_AUTH_PW' => 'pass:word',
  ), $bag
    ->getHeaders());
}