You are here

public function ServerBagTest::testHttpBasicAuthWithPhpCgiEmptyPassword in Zircon Profile 8.0

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

File

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

Class

ServerBagTest
ServerBagTest.

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testHttpBasicAuthWithPhpCgiEmptyPassword() {
  $bag = new ServerBag(array(
    'HTTP_AUTHORIZATION' => 'Basic ' . base64_encode('foo:'),
  ));
  $this
    ->assertEquals(array(
    'AUTHORIZATION' => 'Basic ' . base64_encode('foo:'),
    'PHP_AUTH_USER' => 'foo',
    'PHP_AUTH_PW' => '',
  ), $bag
    ->getHeaders());
}