| @@ 877-899 (lines=23) @@ | ||
| 874 | /** |
|
| 875 | * @covers \eZ\Publish\Core\Persistence\Cache\LocationHandler::setSectionForSubtree |
|
| 876 | */ |
|
| 877 | public function testSetSectionForSubtree() |
|
| 878 | { |
|
| 879 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 880 | $this->cacheMock |
|
| 881 | ->expects($this->once()) |
|
| 882 | ->method('clear') |
|
| 883 | ->with('content'); |
|
| 884 | ||
| 885 | $innerHandler = $this->getSPILocationHandlerMock(); |
|
| 886 | $this->persistenceHandlerMock |
|
| 887 | ->expects($this->once()) |
|
| 888 | ->method('locationHandler') |
|
| 889 | ->will($this->returnValue($innerHandler)); |
|
| 890 | ||
| 891 | $innerHandler |
|
| 892 | ->expects($this->once()) |
|
| 893 | ->method('setSectionForSubtree') |
|
| 894 | ->with(33, 2) |
|
| 895 | ->will($this->returnValue(null)); |
|
| 896 | ||
| 897 | $handler = $this->persistenceCacheHandler->locationHandler(); |
|
| 898 | $handler->setSectionForSubtree(33, 2); |
|
| 899 | } |
|
| 900 | ||
| 901 | /** |
|
| 902 | * @covers \eZ\Publish\Core\Persistence\Cache\LocationHandler::changeMainLocation |
|
| @@ 1022-1045 (lines=24) @@ | ||
| 1019 | /** |
|
| 1020 | * @covers \eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationMoved |
|
| 1021 | */ |
|
| 1022 | public function testLocationMoved() |
|
| 1023 | { |
|
| 1024 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 1025 | ||
| 1026 | $innerHandler = $this->getSPIUrlAliasHandlerMock(); |
|
| 1027 | $this->persistenceHandlerMock |
|
| 1028 | ->expects($this->once()) |
|
| 1029 | ->method('urlAliasHandler') |
|
| 1030 | ->will($this->returnValue($innerHandler)); |
|
| 1031 | ||
| 1032 | $innerHandler |
|
| 1033 | ->expects($this->once()) |
|
| 1034 | ->method('locationMoved') |
|
| 1035 | ->with(44, 2, 45); |
|
| 1036 | ||
| 1037 | $this->cacheMock |
|
| 1038 | ->expects($this->once()) |
|
| 1039 | ->method('clear') |
|
| 1040 | ->with('urlAlias') |
|
| 1041 | ->will($this->returnValue(null)); |
|
| 1042 | ||
| 1043 | $handler = $this->persistenceCacheHandler->urlAliasHandler(); |
|
| 1044 | $handler->locationMoved(44, 2, 45); |
|
| 1045 | } |
|
| 1046 | ||
| 1047 | /** |
|
| 1048 | * @covers \eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationDeleted |
|