You are here

public function RouteTest::testOption in Zircon Profile 8

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

File

vendor/symfony/routing/Tests/RouteTest.php, line 66

Class

RouteTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testOption() {
  $route = new Route('/{foo}');
  $this
    ->assertFalse($route
    ->hasOption('foo'), '->hasOption() return false if option is not set');
  $this
    ->assertEquals($route, $route
    ->setOption('foo', 'bar'), '->setOption() implements a fluent interface');
  $this
    ->assertEquals('bar', $route
    ->getOption('foo'), '->setOption() sets the option');
  $this
    ->assertTrue($route
    ->hasOption('foo'), '->hasOption() return true if option is set');
}