Code Duplication    Length = 25-25 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/TreeHandlerTest.php 1 location

@@ 258-282 (lines=25) @@
255
        $treeHandler->removeSubtree(42);
256
    }
257
258
    public function testSetSectionForSubtree()
259
    {
260
        $treeHandler = $this->getTreeHandler();
261
262
        $this->getLocationGatewayMock()
263
            ->expects($this->at(0))
264
            ->method('getBasicNodeData')
265
            ->with(69)
266
            ->will(
267
                $this->returnValue(
268
                    array(
269
                        'node_id' => 69,
270
                        'path_string' => '/1/2/69/',
271
                        'contentobject_id' => 67,
272
                    )
273
                )
274
            );
275
276
        $this->getLocationGatewayMock()
277
            ->expects($this->once())
278
            ->method('setSectionForSubtree')
279
            ->with('/1/2/69/', 3);
280
281
        $treeHandler->setSectionForSubtree(69, 3);
282
    }
283
284
    public function testChangeMainLocation()
285
    {

eZ/Publish/Core/Persistence/Legacy/Tests/Content/LocationHandlerTest.php 1 location

@@ 400-424 (lines=25) @@
397
        $handler->setSectionForSubtree(69, 3);
398
    }
399
400
    public function testMarkSubtreeModified()
401
    {
402
        $handler = $this->getLocationHandler();
403
404
        $this->locationGateway
405
            ->expects($this->at(0))
406
            ->method('getBasicNodeData')
407
            ->with(69)
408
            ->will(
409
                $this->returnValue(
410
                    array(
411
                        'node_id' => 69,
412
                        'path_string' => '/1/2/69/',
413
                        'contentobject_id' => 67,
414
                    )
415
                )
416
            );
417
418
        $this->locationGateway
419
            ->expects($this->at(1))
420
            ->method('updateSubtreeModificationTime')
421
            ->with('/1/2/69/');
422
423
        $handler->markSubtreeModified(69);
424
    }
425
426
    /**
427
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Location\Handler::changeMainLocation