Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 659-672 (lines=14) @@
656
     *
657
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
658
     */
659
    public function testLoadLocationList(): void
660
    {
661
        $repository = $this->getRepository();
662
663
        // 5 is the ID of an existing location, 442 is a non-existing id
664
        $locationService = $repository->getLocationService();
665
        $locations = $locationService->loadLocationList([5, 442]);
666
667
        self::assertInternalType('iterable', $locations);
668
        self::assertCount(1, $locations);
669
        self::assertEquals([5], array_keys($locations));
670
        self::assertInstanceOf(Location::class, $locations[5]);
671
        self::assertEquals(5, $locations[5]->id);
672
    }
673
674
    /**
675
     * Test for the loadLocationList() method.
@@ 722-735 (lines=14) @@
719
     *
720
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
721
     */
722
    public function testLoadLocationListWithRootLocationId()
723
    {
724
        $repository = $this->getRepository();
725
726
        // 1 is the ID of an root location
727
        $locationService = $repository->getLocationService();
728
        $locations = $locationService->loadLocationList([1]);
729
730
        self::assertInternalType('iterable', $locations);
731
        self::assertCount(1, $locations);
732
        self::assertEquals([1], array_keys($locations));
733
        self::assertInstanceOf(Location::class, $locations[1]);
734
        self::assertEquals(1, $locations[1]->id);
735
    }
736
737
    /**
738
     * Test for the loadLocationList() method.