You are here

public function DynamicRouterTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php \Symfony\Cmf\Component\Routing\Tests\Routing\DynamicRouterTest::setUp()

File

vendor/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php, line 36

Class

DynamicRouterTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

public function setUp() {
  $this->routeDocument = $this
    ->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array(
    'getDefaults',
  ));
  $this->matcher = $this
    ->buildMock('Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface');
  $this->generator = $this
    ->buildMock('Symfony\\Cmf\\Component\\Routing\\VersatileGeneratorInterface', array(
    'supports',
    'generate',
    'setContext',
    'getContext',
    'getRouteDebugMessage',
  ));
  $this->enhancer = $this
    ->buildMock('Symfony\\Cmf\\Component\\Routing\\Enhancer\\RouteEnhancerInterface', array(
    'enhance',
  ));
  $this->context = $this
    ->buildMock('Symfony\\Component\\Routing\\RequestContext');
  $this->request = Request::create($this->url);
  $this->router = new DynamicRouter($this->context, $this->matcher, $this->generator);
  $this->router
    ->addRouteEnhancer($this->enhancer);
}