Code Duplication    Length = 14-14 lines in 2 locations

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

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