You are here

public function RequestContextTest::testConstruct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Tests/RequestContextTest.php \Symfony\Component\Routing\Tests\RequestContextTest::testConstruct()

File

vendor/symfony/routing/Tests/RequestContextTest.php, line 19

Class

RequestContextTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testConstruct() {
  $requestContext = new RequestContext('foo', 'post', 'foo.bar', 'HTTPS', 8080, 444, '/baz', 'bar=foobar');
  $this
    ->assertEquals('foo', $requestContext
    ->getBaseUrl());
  $this
    ->assertEquals('POST', $requestContext
    ->getMethod());
  $this
    ->assertEquals('foo.bar', $requestContext
    ->getHost());
  $this
    ->assertEquals('https', $requestContext
    ->getScheme());
  $this
    ->assertSame(8080, $requestContext
    ->getHttpPort());
  $this
    ->assertSame(444, $requestContext
    ->getHttpsPort());
  $this
    ->assertEquals('/baz', $requestContext
    ->getPathInfo());
  $this
    ->assertEquals('bar=foobar', $requestContext
    ->getQueryString());
}