You are here

public function RequestTest::testGetUserInfo in Zircon Profile 8

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

@covers Symfony\Component\HttpFoundation\Request::getUserInfo

File

vendor/symfony/http-foundation/Tests/RequestTest.php, line 616

Class

RequestTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGetUserInfo() {
  $request = new Request();
  $server['PHP_AUTH_USER'] = 'fabien';
  $request
    ->initialize(array(), array(), array(), array(), array(), $server);
  $this
    ->assertEquals('fabien', $request
    ->getUserInfo());
  $server['PHP_AUTH_USER'] = '0';
  $request
    ->initialize(array(), array(), array(), array(), array(), $server);
  $this
    ->assertEquals('0', $request
    ->getUserInfo());
  $server['PHP_AUTH_PW'] = '0';
  $request
    ->initialize(array(), array(), array(), array(), array(), $server);
  $this
    ->assertEquals('0:0', $request
    ->getUserInfo());
}