Code Duplication    Length = 17-17 lines in 2 locations

eZ/Publish/API/Repository/Tests/TrashServiceTest.php 2 locations

@@ 207-223 (lines=17) @@
204
     *
205
     * @covers \eZ\Publish\API\Repository\TrashService::trash
206
     */
207
    public function testTrashReturnsNull()
208
    {
209
        $repository = $this->getRepository();
210
        $contentService = $repository->getContentService();
211
        $locationService = $repository->getLocationService();
212
        $trashService = $repository->getTrashService();
213
214
        // Create additional location to trash
215
        $location = $locationService->createLocation(
216
            $contentService->loadContentInfo(42),
217
            new LocationCreateStruct(['parentLocationId' => 2])
218
        );
219
220
        $trashItem = $trashService->trash($location);
221
222
        self::assertNull($trashItem);
223
    }
224
225
    /**
226
     * Test for the loadTrashItem() method.
@@ 603-619 (lines=17) @@
600
     * @covers \eZ\Publish\API\Repository\TrashService::recover
601
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
602
     */
603
    public function testRecoverToNonExistingLocation()
604
    {
605
        $repository = $this->getRepository();
606
        $trashService = $repository->getTrashService();
607
        $locationService = $repository->getLocationService();
608
609
        $location = $locationService->loadLocation(44);
610
        $trashItem = $trashService->trash($location);
611
612
        $newParentLocation = new Location(
613
            array(
614
                'id' => 123456,
615
                'parentLocationId' => 123455,
616
            )
617
        );
618
        $trashService->recover($trashItem, $newParentLocation);
619
    }
620
621
    /**
622
     * Test for the findTrashItems() method.