public function testListURLAliasesForLocationCustomHasCache()
{
$this->loggerMock->expects($this->never())->method('logCall');
$cacheItemMock = $this->getMock('Stash\\Interfaces\\ItemInterface');
$this->cacheMock->expects($this->at(0))->method('getItem')->with('urlAlias', 'location', '44', 'custom')->will($this->returnValue($cacheItemMock));
$cacheItemMock->expects($this->once())->method('get')->will($this->returnValue(array(55, 58, 91)));
$cacheItemMock->expects($this->once())->method('isMiss')->will($this->returnValue(false));
$this->persistenceHandlerMock->expects($this->never())->method($this->anything());
$cacheItemMock->expects($this->never())->method('set');
// inline calls to loadUrlAlias() using the cache
$cacheItemMock2 = $this->getMock('Stash\\Interfaces\\ItemInterface');
$this->cacheMock->expects($this->at(1))->method('getItem')->with('urlAlias', 55)->will($this->returnValue($cacheItemMock2));
$cacheItemMock2->expects($this->at(0))->method('get')->will($this->returnValue(new UrlAlias(array('id' => 55))));
$this->cacheMock->expects($this->at(2))->method('getItem')->with('urlAlias', 58)->will($this->returnValue($cacheItemMock2));
$cacheItemMock2->expects($this->at(1))->method('get')->will($this->returnValue(new UrlAlias(array('id' => 58))));
$this->cacheMock->expects($this->at(3))->method('getItem')->with('urlAlias', 91)->will($this->returnValue($cacheItemMock2));
$cacheItemMock2->expects($this->at(2))->method('get')->will($this->returnValue(new UrlAlias(array('id' => 91))));
$cacheItemMock2->expects($this->exactly(3))->method('isMiss')->will($this->returnValue(false));
$cacheItemMock2->expects($this->never())->method('set');
$handler = $this->persistenceCacheHandler->urlAliasHandler();
$handler->listURLAliasesForLocation(44, true);
}