| @@ 909-932 (lines=24) @@ | ||
| 906 | /** |
|
| 907 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationMoved |
|
| 908 | */ |
|
| 909 | public function testLocationMoved() |
|
| 910 | { |
|
| 911 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 912 | ||
| 913 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias\\Handler'); |
|
| 914 | $this->persistenceHandlerMock |
|
| 915 | ->expects($this->once()) |
|
| 916 | ->method('urlAliasHandler') |
|
| 917 | ->will($this->returnValue($innerHandler)); |
|
| 918 | ||
| 919 | $innerHandler |
|
| 920 | ->expects($this->once()) |
|
| 921 | ->method('locationMoved') |
|
| 922 | ->with(44, 2, 45); |
|
| 923 | ||
| 924 | $this->cacheMock |
|
| 925 | ->expects($this->once()) |
|
| 926 | ->method('clear') |
|
| 927 | ->with('urlAlias') |
|
| 928 | ->will($this->returnValue(null)); |
|
| 929 | ||
| 930 | $handler = $this->persistenceCacheHandler->urlAliasHandler(); |
|
| 931 | $handler->locationMoved(44, 2, 45); |
|
| 932 | } |
|
| 933 | ||
| 934 | /** |
|
| 935 | * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationDeleted |
|
| @@ 846-868 (lines=23) @@ | ||
| 843 | /** |
|
| 844 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::setSectionForSubtree |
|
| 845 | */ |
|
| 846 | public function testSetSectionForSubtree() |
|
| 847 | { |
|
| 848 | $this->loggerMock->expects($this->once())->method('logCall'); |
|
| 849 | $this->cacheMock |
|
| 850 | ->expects($this->once()) |
|
| 851 | ->method('clear') |
|
| 852 | ->with('content'); |
|
| 853 | ||
| 854 | $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Location\\Handler'); |
|
| 855 | $this->persistenceHandlerMock |
|
| 856 | ->expects($this->once()) |
|
| 857 | ->method('locationHandler') |
|
| 858 | ->will($this->returnValue($innerHandler)); |
|
| 859 | ||
| 860 | $innerHandler |
|
| 861 | ->expects($this->once()) |
|
| 862 | ->method('setSectionForSubtree') |
|
| 863 | ->with(33, 2) |
|
| 864 | ->will($this->returnValue(null)); |
|
| 865 | ||
| 866 | $handler = $this->persistenceCacheHandler->locationHandler(); |
|
| 867 | $handler->setSectionForSubtree(33, 2); |
|
| 868 | } |
|
| 869 | ||
| 870 | /** |
|
| 871 | * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::changeMainLocation |
|