You are here

public function ClientTest::testSetServerParameter in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\ClientTest::testSetServerParameter()

File

vendor/symfony/browser-kit/Tests/ClientTest.php, line 592

Class

ClientTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testSetServerParameter() {
  $client = new TestClient();
  $this
    ->assertEquals('localhost', $client
    ->getServerParameter('HTTP_HOST'));
  $this
    ->assertEquals('Symfony2 BrowserKit', $client
    ->getServerParameter('HTTP_USER_AGENT'));
  $client
    ->setServerParameter('HTTP_HOST', 'testhost');
  $this
    ->assertEquals('testhost', $client
    ->getServerParameter('HTTP_HOST'));
  $client
    ->setServerParameter('HTTP_USER_AGENT', 'testua');
  $this
    ->assertEquals('testua', $client
    ->getServerParameter('HTTP_USER_AGENT'));
}