You are here

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

File

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

Class

ServerBagTest
ServerBagTest.

Namespace

Symfony\Component\HttpFoundation\Tests

Code

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