Code Duplication    Length = 14-14 lines in 2 locations

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

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