Neos\Flow\Tests\Unit\Mvc\Routing\RouterTest::resolveReturnsCachedResolvedUriPathIfFoundInCache PHP Method

resolveReturnsCachedResolvedUriPathIfFoundInCache() public method

    public function resolveReturnsCachedResolvedUriPathIfFoundInCache()
    {
        $router = $this->getAccessibleMock(Router::class, ['createRoutesFromConfiguration']);
        $this->inject($router, 'routerCachingService', $this->mockRouterCachingService);
        $this->inject($router, 'systemLogger', $this->mockSystemLogger);
        $routeValues = ['some' => 'route values'];
        $cachedResolvedUriPath = 'some/cached/Request/Path';
        $mockRouterCachingService = $this->getMockBuilder(RouterCachingService::class)->getMock();
        $mockRouterCachingService->expects($this->any())->method('getCachedResolvedUriPath')->with($routeValues)->will($this->returnValue($cachedResolvedUriPath));
        $router->_set('routerCachingService', $mockRouterCachingService);
        $router->expects($this->never())->method('createRoutesFromConfiguration');
        $this->assertSame($cachedResolvedUriPath, $router->resolve($routeValues));
    }