You are here

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

File

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

Class

ServerBagTest
ServerBagTest.

Namespace

Symfony\Component\HttpFoundation\Tests

Code

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