Code Duplication    Length = 17-17 lines in 2 locations

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

@@ 210-226 (lines=17) @@
207
     *
208
     * @covers \eZ\Publish\API\Repository\TrashService::trash
209
     */
210
    public function testTrashReturnsNull()
211
    {
212
        $repository = $this->getRepository();
213
        $contentService = $repository->getContentService();
214
        $locationService = $repository->getLocationService();
215
        $trashService = $repository->getTrashService();
216
217
        // Create additional location to trash
218
        $location = $locationService->createLocation(
219
            $contentService->loadContentInfo(42),
220
            new LocationCreateStruct(['parentLocationId' => 2])
221
        );
222
223
        $trashItem = $trashService->trash($location);
224
225
        self::assertNull($trashItem);
226
    }
227
228
    /**
229
     * Test for the loadTrashItem() method.
@@ 632-648 (lines=17) @@
629
     * @covers \eZ\Publish\API\Repository\TrashService::recover
630
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
631
     */
632
    public function testRecoverToNonExistingLocation()
633
    {
634
        $repository = $this->getRepository();
635
        $trashService = $repository->getTrashService();
636
        $locationService = $repository->getLocationService();
637
638
        $location = $locationService->loadLocation(44);
639
        $trashItem = $trashService->trash($location);
640
641
        $newParentLocation = new Location(
642
            [
643
                'id' => 123456,
644
                'parentLocationId' => 123455,
645
            ]
646
        );
647
        $trashService->recover($trashItem, $newParentLocation);
648
    }
649
650
    /**
651
     * Test for the findTrashItems() method.