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

resolveDoesNotStoreResolvedUriPathInCacheIfItsNull() public method

    public function resolveDoesNotStoreResolvedUriPathInCacheIfItsNull()
    {
        $router = $this->getAccessibleMock(Router::class, ['createRoutesFromConfiguration']);
        $this->inject($router, 'routerCachingService', $this->mockRouterCachingService);
        $this->inject($router, 'systemLogger', $this->mockSystemLogger);
        $routeValues = ['some' => 'route values'];
        $resolvedUriPath = null;
        $mockRoute1 = $this->getMockBuilder(Route::class)->getMock();
        $mockRoute1->expects($this->once())->method('resolves')->with($routeValues)->will($this->returnValue(false));
        $mockRoute2 = $this->getMockBuilder(Route::class)->getMock();
        $mockRoute2->expects($this->once())->method('resolves')->with($routeValues)->will($this->returnValue(true));
        $mockRoute2->expects($this->atLeastOnce())->method('getResolvedUriPath')->will($this->returnValue($resolvedUriPath));
        $router->_set('routes', [$mockRoute1, $mockRoute2]);
        $this->mockRouterCachingService->expects($this->never())->method('storeResolvedUriPath');
        $this->assertSame($resolvedUriPath, $router->resolve($routeValues));
    }