eZ\Publish\Core\Persistence\Cache\Tests\UrlAliasHandlerTest::testLocationDeletedWithCachedLocation PHP Method

testLocationDeletedWithCachedLocation() public method

    public function testLocationDeletedWithCachedLocation()
    {
        $locationCacheItem = $this->getMock('Stash\\Interfaces\\ItemInterface');
        $locationCacheItem->expects($this->once())->method('isMiss')->willReturn(false);
        $locationCacheItem->expects($this->once())->method('get')->willReturn(['44']);
        $locationCacheItem->expects($this->once())->method('clear')->will($this->returnValue(null));
        $this->prepareDeleteMocks($locationCacheItem);
        $this->cacheMock->expects($this->at(1))->method('clear')->with('urlAlias', 44);
        $this->cacheMock->expects($this->at(2))->method('clear')->with('urlAlias', 'url');
        $handler = $this->persistenceCacheHandler->urlAliasHandler();
        $handler->locationDeleted(44);
    }