You are here

public function RouteTest::testSerialize 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::testSerialize()

File

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

Class

RouteTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testSerialize() {
  $route = new Route('/prefix/{foo}', array(
    'foo' => 'default',
  ), array(
    'foo' => '\\d+',
  ));
  $serialized = serialize($route);
  $unserialized = unserialize($serialized);
  $this
    ->assertEquals($route, $unserialized);
  $this
    ->assertNotSame($route, $unserialized);
}