Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 585-598 (lines=14) @@
582
     *
583
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
584
     */
585
    public function testLoadLocationList(): void
586
    {
587
        $repository = $this->getRepository();
588
589
        // 5 is the ID of an existing location, 442 is a non-existing id
590
        $locationService = $repository->getLocationService();
591
        $locations = $locationService->loadLocationList([5, 442]);
592
593
        self::assertIsIterable($locations);
594
        self::assertCount(1, $locations);
595
        self::assertEquals([5], array_keys($locations));
596
        self::assertInstanceOf(Location::class, $locations[5]);
597
        self::assertEquals(5, $locations[5]->id);
598
    }
599
600
    /**
601
     * Test for the loadLocationList() method.
@@ 648-661 (lines=14) @@
645
     *
646
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
647
     */
648
    public function testLoadLocationListWithRootLocationId()
649
    {
650
        $repository = $this->getRepository();
651
652
        // 1 is the ID of an root location
653
        $locationService = $repository->getLocationService();
654
        $locations = $locationService->loadLocationList([1]);
655
656
        self::assertIsIterable($locations);
657
        self::assertCount(1, $locations);
658
        self::assertEquals([1], array_keys($locations));
659
        self::assertInstanceOf(Location::class, $locations[1]);
660
        self::assertEquals(1, $locations[1]->id);
661
    }
662
663
    /**
664
     * Test for the loadLocationList() method.