public function setUp()
{
$this->matcher = $this->buildMock('Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface');
$this->matcher->expects($this->once())->method('match')->with('/foo')->will($this->returnValue(array('foo' => 'bar', RouteObjectInterface::CONTENT_OBJECT => 'bla', RouteObjectInterface::TEMPLATE_NAME => 'template')));
$this->generator = $this->buildMock('Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface');
$this->request = Request::create('/foo');
$this->context = $this->buildMock('Symfony\\Component\\Routing\\RequestContext');
$this->eventDispatcher = $this->buildMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$this->router = new DynamicRouter($this->context, $this->matcher, $this->generator, '', $this->eventDispatcher);
$this->router->setRequest($this->request);
}