Code Duplication    Length = 17-17 lines in 2 locations

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

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