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.
@@ 608-624 (lines=17) @@
605
     * @covers \eZ\Publish\API\Repository\TrashService::recover
606
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
607
     */
608
    public function testRecoverToNonExistingLocation()
609
    {
610
        $repository = $this->getRepository();
611
        $trashService = $repository->getTrashService();
612
        $locationService = $repository->getLocationService();
613
614
        $location = $locationService->loadLocation(44);
615
        $trashItem = $trashService->trash($location);
616
617
        $newParentLocation = new Location(
618
            array(
619
                'id' => 123456,
620
                'parentLocationId' => 123455,
621
            )
622
        );
623
        $trashService->recover($trashItem, $newParentLocation);
624
    }
625
626
    /**
627
     * Test for the findTrashItems() method.