Example #1
0
 public function testConditionOption()
 {
     if (!property_exists('Symfony\\Component\\Routing\\Route', 'condition')) {
         $this->markTestSkipped('This version of symfony does not have the condition property on the Route.');
     }
     $route = new Route();
     $root = $this->getDm()->find(null, self::ROUTE_ROOT);
     $route->setPosition($root, 'conditionroute');
     $route->setCondition('foobar');
     $this->getDm()->persist($route);
     $this->getDm()->flush();
     $this->getDm()->clear();
     $route = $this->getDm()->find(null, self::ROUTE_ROOT . '/conditionroute');
     $this->assertEquals('foobar', $route->getCondition());
 }