You are here

public function RouteCollectionTest::testSetSchemes in Zircon Profile 8

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

File

vendor/symfony/routing/Tests/RouteCollectionTest.php, line 277

Class

RouteCollectionTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testSetSchemes() {
  $collection = new RouteCollection();
  $routea = new Route('/a', array(), array(), array(), '', 'http');
  $routeb = new Route('/b');
  $collection
    ->add('a', $routea);
  $collection
    ->add('b', $routeb);
  $collection
    ->setSchemes(array(
    'http',
    'https',
  ));
  $this
    ->assertEquals(array(
    'http',
    'https',
  ), $routea
    ->getSchemes());
  $this
    ->assertEquals(array(
    'http',
    'https',
  ), $routeb
    ->getSchemes());
}