| @@ 780-802 (lines=23) @@ | ||
| 777 | /** |
|
| 778 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::setSectionForSubtree |
|
| 779 | */ |
|
| 780 | public function testSetSectionForSubtree() |
|
| 781 | { |
|
| 782 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 783 | $this->cacheMock |
|
| 784 | ->expects($this->once()) |
|
| 785 | ->method('clear') |
|
| 786 | ->with('content'); |
|
| 787 | ||
| 788 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Location\\Handler'); |
|
| 789 | $this->persistenceHandlerMock |
|
| 790 | ->expects($this->once()) |
|
| 791 | ->method('locationHandler') |
|
| 792 | ->will($this->returnValue($innerHandler)); |
|
| 793 | ||
| 794 | $innerHandler |
|
| 795 | ->expects($this->once()) |
|
| 796 | ->method('setSectionForSubtree') |
|
| 797 | ->with(33, 2) |
|
| 798 | ->will($this->returnValue(null)); |
|
| 799 | ||
| 800 | $handler = $this->persistenceCacheHandler->locationHandler(); |
|
| 801 | $handler->setSectionForSubtree(33, 2); |
|
| 802 | } |
|
| 803 | ||
| 804 | /** |
|
| 805 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::changeMainLocation |
|
| @@ 849-872 (lines=24) @@ | ||
| 846 | /** |
|
| 847 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationMoved |
|
| 848 | */ |
|
| 849 | public function testLocationMoved() |
|
| 850 | { |
|
| 851 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 852 | ||
| 853 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias\\Handler'); |
|
| 854 | $this->persistenceHandlerMock |
|
| 855 | ->expects($this->once()) |
|
| 856 | ->method('urlAliasHandler') |
|
| 857 | ->will($this->returnValue($innerHandler)); |
|
| 858 | ||
| 859 | $innerHandler |
|
| 860 | ->expects($this->once()) |
|
| 861 | ->method('locationMoved') |
|
| 862 | ->with(44, 2, 45); |
|
| 863 | ||
| 864 | $this->cacheMock |
|
| 865 | ->expects($this->once()) |
|
| 866 | ->method('clear') |
|
| 867 | ->with('urlAlias') |
|
| 868 | ->will($this->returnValue(null)); |
|
| 869 | ||
| 870 | $handler = $this->persistenceCacheHandler->urlAliasHandler(); |
|
| 871 | $handler->locationMoved(44, 2, 45); |
|
| 872 | } |
|
| 873 | ||
| 874 | /** |
|
| 875 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationDeleted |
|