Code Duplication    Length = 14-14 lines in 2 locations

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

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