You are here

public function RequestContextTest::testFluentInterface 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::testFluentInterface()

File

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

Class

RequestContextTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testFluentInterface() {
  $requestContext = new RequestContext();
  $this
    ->assertSame($requestContext, $requestContext
    ->setBaseUrl('/app.php'));
  $this
    ->assertSame($requestContext, $requestContext
    ->setPathInfo('/index'));
  $this
    ->assertSame($requestContext, $requestContext
    ->setMethod('POST'));
  $this
    ->assertSame($requestContext, $requestContext
    ->setScheme('https'));
  $this
    ->assertSame($requestContext, $requestContext
    ->setHost('example.com'));
  $this
    ->assertSame($requestContext, $requestContext
    ->setQueryString('foo=bar'));
  $this
    ->assertSame($requestContext, $requestContext
    ->setHttpPort(80));
  $this
    ->assertSame($requestContext, $requestContext
    ->setHttpsPort(443));
  $this
    ->assertSame($requestContext, $requestContext
    ->setParameters(array()));
  $this
    ->assertSame($requestContext, $requestContext
    ->setParameter('foo', 'bar'));
}