Code Duplication    Length = 14-14 lines in 2 locations

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

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