Code Duplication    Length = 17-17 lines in 2 locations

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

@@ 209-225 (lines=17) @@
206
     *
207
     * @covers \eZ\Publish\API\Repository\TrashService::trash
208
     */
209
    public function testTrashReturnsNull()
210
    {
211
        $repository = $this->getRepository();
212
        $contentService = $repository->getContentService();
213
        $locationService = $repository->getLocationService();
214
        $trashService = $repository->getTrashService();
215
216
        // Create additional location to trash
217
        $location = $locationService->createLocation(
218
            $contentService->loadContentInfo(42),
219
            new LocationCreateStruct(['parentLocationId' => 2])
220
        );
221
222
        $trashItem = $trashService->trash($location);
223
224
        self::assertNull($trashItem);
225
    }
226
227
    /**
228
     * Test for the loadTrashItem() method.
@@ 616-632 (lines=17) @@
613
     * @covers \eZ\Publish\API\Repository\TrashService::recover
614
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
615
     */
616
    public function testRecoverToNonExistingLocation()
617
    {
618
        $repository = $this->getRepository();
619
        $trashService = $repository->getTrashService();
620
        $locationService = $repository->getLocationService();
621
622
        $location = $locationService->loadLocation(44);
623
        $trashItem = $trashService->trash($location);
624
625
        $newParentLocation = new Location(
626
            array(
627
                'id' => 123456,
628
                'parentLocationId' => 123455,
629
            )
630
        );
631
        $trashService->recover($trashItem, $newParentLocation);
632
    }
633
634
    /**
635
     * Test for the findTrashItems() method.