Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 623-636 (lines=14) @@
620
     *
621
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
622
     */
623
    public function testLoadLocationList(): void
624
    {
625
        $repository = $this->getRepository();
626
627
        // 5 is the ID of an existing location, 442 is a non-existing id
628
        $locationService = $repository->getLocationService();
629
        $locations = $locationService->loadLocationList([5, 442]);
630
631
        self::assertIsIterable($locations);
632
        self::assertCount(1, $locations);
633
        self::assertEquals([5], array_keys($locations));
634
        self::assertInstanceOf(Location::class, $locations[5]);
635
        self::assertEquals(5, $locations[5]->id);
636
    }
637
638
    /**
639
     * Test for the loadLocationList() method.
@@ 686-699 (lines=14) @@
683
     *
684
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
685
     */
686
    public function testLoadLocationListWithRootLocationId()
687
    {
688
        $repository = $this->getRepository();
689
690
        // 1 is the ID of an root location
691
        $locationService = $repository->getLocationService();
692
        $locations = $locationService->loadLocationList([1]);
693
694
        self::assertIsIterable($locations);
695
        self::assertCount(1, $locations);
696
        self::assertEquals([1], array_keys($locations));
697
        self::assertInstanceOf(Location::class, $locations[1]);
698
        self::assertEquals(1, $locations[1]->id);
699
    }
700
701
    /**
702
     * Test for the loadLocationList() method.