| @@ 405-429 (lines=25) @@ | ||
| 402 | $handler->setSectionForSubtree(69, 3); |
|
| 403 | } |
|
| 404 | ||
| 405 | public function testMarkSubtreeModified() |
|
| 406 | { |
|
| 407 | $handler = $this->getLocationHandler(); |
|
| 408 | ||
| 409 | $this->locationGateway |
|
| 410 | ->expects($this->at(0)) |
|
| 411 | ->method('getBasicNodeData') |
|
| 412 | ->with(69) |
|
| 413 | ->will( |
|
| 414 | $this->returnValue( |
|
| 415 | array( |
|
| 416 | 'node_id' => 69, |
|
| 417 | 'path_string' => '/1/2/69/', |
|
| 418 | 'contentobject_id' => 67, |
|
| 419 | ) |
|
| 420 | ) |
|
| 421 | ); |
|
| 422 | ||
| 423 | $this->locationGateway |
|
| 424 | ->expects($this->at(1)) |
|
| 425 | ->method('updateSubtreeModificationTime') |
|
| 426 | ->with('/1/2/69/'); |
|
| 427 | ||
| 428 | $handler->markSubtreeModified(69); |
|
| 429 | } |
|
| 430 | ||
| 431 | /** |
|
| 432 | * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Location\Handler::changeMainLocation |
|
| @@ 263-287 (lines=25) @@ | ||
| 260 | $treeHandler->removeSubtree(42); |
|
| 261 | } |
|
| 262 | ||
| 263 | public function testSetSectionForSubtree() |
|
| 264 | { |
|
| 265 | $treeHandler = $this->getTreeHandler(); |
|
| 266 | ||
| 267 | $this->getLocationGatewayMock() |
|
| 268 | ->expects($this->at(0)) |
|
| 269 | ->method('getBasicNodeData') |
|
| 270 | ->with(69) |
|
| 271 | ->will( |
|
| 272 | $this->returnValue( |
|
| 273 | array( |
|
| 274 | 'node_id' => 69, |
|
| 275 | 'path_string' => '/1/2/69/', |
|
| 276 | 'contentobject_id' => 67, |
|
| 277 | ) |
|
| 278 | ) |
|
| 279 | ); |
|
| 280 | ||
| 281 | $this->getLocationGatewayMock() |
|
| 282 | ->expects($this->once()) |
|
| 283 | ->method('setSectionForSubtree') |
|
| 284 | ->with('/1/2/69/', 3); |
|
| 285 | ||
| 286 | $treeHandler->setSectionForSubtree(69, 3); |
|
| 287 | } |
|
| 288 | ||
| 289 | public function testChangeMainLocation() |
|
| 290 | { |
|