public function __construct(RouteRepositoryInterface $routeRepository, ManagerRegistry $managerRegistry, CandidatesInterface $candidatesStrategy, $className) { $this->routeRepository = $routeRepository; $this->internalRoutesCache = []; $this->candidatesStrategy = $candidatesStrategy; parent::__construct($managerRegistry, $candidatesStrategy, $className); }
public function testGetAllRoutes() { $this->objectRepositoryMock->expects($this->once())->method('findBy')->with(array(), null, 42)->will($this->returnValue(array($this->routeMock))); $routeProvider = new RouteProvider($this->managerRegistryMock, $this->candidatesMock, 'Route'); $routeProvider->setManagerName('default'); $routeProvider->setRouteCollectionLimit(42); $routes = $routeProvider->getRoutesByNames(null); $this->assertCount(1, $routes); }
public function __construct(ManagerRegistry $managerRegistry, CandidatesInterface $candidatesStrategy, $className) { parent::__construct($managerRegistry, $candidatesStrategy, $className); $this->candidatesStrategy = $candidatesStrategy; }