Example #1
0
 /**
  * {@inheritdoc}
  */
 public function generate($name, $parameters = [], $absolute = false)
 {
     if ($this->isSyliusClassInstance($name)) {
         return parent::generate($this->getRouteByName($name, $parameters), $parameters, $absolute);
     }
     return parent::generate($name, $parameters, $absolute);
 }
 /**
  * Generate from a content that returns something that is not a route as route.
  *
  * @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
  */
 public function testGenerateInvalidRoute()
 {
     $this->contentDocument->expects($this->once())->method('getRoutes')->will($this->returnValue(array($this)));
     $this->generator->generate($this->contentDocument);
 }