/** * @test */ public function resolveDoesNotStoreResolvedUriPathInCacheIfItsNull() { $routeValues = array('some' => 'route values'); $resolvedUriPath = NULL; $mockRoute1 = $this->getMockBuilder('TYPO3\\Flow\\Mvc\\Routing\\Route')->getMock(); $mockRoute1->expects($this->once())->method('resolves')->with($routeValues)->will($this->returnValue(FALSE)); $mockRoute2 = $this->getMockBuilder('TYPO3\\Flow\\Mvc\\Routing\\Route')->getMock(); $mockRoute2->expects($this->once())->method('resolves')->with($routeValues)->will($this->returnValue(TRUE)); $mockRoute2->expects($this->atLeastOnce())->method('getResolvedUriPath')->will($this->returnValue($resolvedUriPath)); $this->router->_set('routes', array($mockRoute1, $mockRoute2)); $this->mockRouterCachingService->expects($this->never())->method('storeResolvedUriPath'); $this->assertSame($resolvedUriPath, $this->router->resolve($routeValues)); }