Пример #1
0
 /**
  * @param RouterContext $context
  */
 public function setContext(RouterContext $context)
 {
     $this->pubSubRouter->setContext($context);
 }
Пример #2
0
 public function testGetContext()
 {
     $routeCollection = $this->prophesize(RouteCollection::CLASS);
     $matcher = $this->prophesize(Matcher::CLASS);
     $generator = $this->prophesize(Generator::CLASS);
     $routeLoader = $this->prophesize(RouteLoader::CLASS);
     $router = new Router($routeCollection->reveal(), $matcher->reveal(), $generator->reveal(), $routeLoader->reveal());
     $router->setContext(new RouterContext());
     $this->assertInstanceOf(RouterContext::class, $router->getContext());
 }