| @@ 808-830 (lines=23) @@ | ||
| 805 | /** |
|
| 806 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::setSectionForSubtree |
|
| 807 | */ |
|
| 808 | public function testSetSectionForSubtree() |
|
| 809 | { |
|
| 810 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 811 | $this->cacheMock |
|
| 812 | ->expects($this->once()) |
|
| 813 | ->method('clear') |
|
| 814 | ->with('content'); |
|
| 815 | ||
| 816 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Location\\Handler'); |
|
| 817 | $this->persistenceHandlerMock |
|
| 818 | ->expects($this->once()) |
|
| 819 | ->method('locationHandler') |
|
| 820 | ->will($this->returnValue($innerHandler)); |
|
| 821 | ||
| 822 | $innerHandler |
|
| 823 | ->expects($this->once()) |
|
| 824 | ->method('setSectionForSubtree') |
|
| 825 | ->with(33, 2) |
|
| 826 | ->will($this->returnValue(null)); |
|
| 827 | ||
| 828 | $handler = $this->persistenceCacheHandler->locationHandler(); |
|
| 829 | $handler->setSectionForSubtree(33, 2); |
|
| 830 | } |
|
| 831 | ||
| 832 | /** |
|
| 833 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::changeMainLocation |
|
| @@ 1052-1075 (lines=24) @@ | ||
| 1049 | /** |
|
| 1050 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationMoved |
|
| 1051 | */ |
|
| 1052 | public function testLocationMoved() |
|
| 1053 | { |
|
| 1054 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 1055 | ||
| 1056 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias\\Handler'); |
|
| 1057 | $this->persistenceHandlerMock |
|
| 1058 | ->expects($this->once()) |
|
| 1059 | ->method('urlAliasHandler') |
|
| 1060 | ->will($this->returnValue($innerHandler)); |
|
| 1061 | ||
| 1062 | $innerHandler |
|
| 1063 | ->expects($this->once()) |
|
| 1064 | ->method('locationMoved') |
|
| 1065 | ->with(44, 2, 45); |
|
| 1066 | ||
| 1067 | $this->cacheMock |
|
| 1068 | ->expects($this->once()) |
|
| 1069 | ->method('clear') |
|
| 1070 | ->with('urlAlias') |
|
| 1071 | ->will($this->returnValue(null)); |
|
| 1072 | ||
| 1073 | $handler = $this->persistenceCacheHandler->urlAliasHandler(); |
|
| 1074 | $handler->locationMoved(44, 2, 45); |
|
| 1075 | } |
|
| 1076 | ||
| 1077 | /** |
|
| 1078 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationDeleted |
|