| @@ 858-880 (lines=23) @@ | ||
| 855 | /** |
|
| 856 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::setSectionForSubtree |
|
| 857 | */ |
|
| 858 | public function testSetSectionForSubtree() |
|
| 859 | { |
|
| 860 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 861 | $this->cacheMock |
|
| 862 | ->expects($this->once()) |
|
| 863 | ->method('clear') |
|
| 864 | ->with('content'); |
|
| 865 | ||
| 866 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Location\\Handler'); |
|
| 867 | $this->persistenceHandlerMock |
|
| 868 | ->expects($this->once()) |
|
| 869 | ->method('locationHandler') |
|
| 870 | ->will($this->returnValue($innerHandler)); |
|
| 871 | ||
| 872 | $innerHandler |
|
| 873 | ->expects($this->once()) |
|
| 874 | ->method('setSectionForSubtree') |
|
| 875 | ->with(33, 2) |
|
| 876 | ->will($this->returnValue(null)); |
|
| 877 | ||
| 878 | $handler = $this->persistenceCacheHandler->locationHandler(); |
|
| 879 | $handler->setSectionForSubtree(33, 2); |
|
| 880 | } |
|
| 881 | ||
| 882 | /** |
|
| 883 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::changeMainLocation |
|
| @@ 1054-1077 (lines=24) @@ | ||
| 1051 | /** |
|
| 1052 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationMoved |
|
| 1053 | */ |
|
| 1054 | public function testLocationMoved() |
|
| 1055 | { |
|
| 1056 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 1057 | ||
| 1058 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias\\Handler'); |
|
| 1059 | $this->persistenceHandlerMock |
|
| 1060 | ->expects($this->once()) |
|
| 1061 | ->method('urlAliasHandler') |
|
| 1062 | ->will($this->returnValue($innerHandler)); |
|
| 1063 | ||
| 1064 | $innerHandler |
|
| 1065 | ->expects($this->once()) |
|
| 1066 | ->method('locationMoved') |
|
| 1067 | ->with(44, 2, 45); |
|
| 1068 | ||
| 1069 | $this->cacheMock |
|
| 1070 | ->expects($this->once()) |
|
| 1071 | ->method('clear') |
|
| 1072 | ->with('urlAlias') |
|
| 1073 | ->will($this->returnValue(null)); |
|
| 1074 | ||
| 1075 | $handler = $this->persistenceCacheHandler->urlAliasHandler(); |
|
| 1076 | $handler->locationMoved(44, 2, 45); |
|
| 1077 | } |
|
| 1078 | ||
| 1079 | /** |
|
| 1080 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationDeleted |
|