Code Duplication    Length = 14-14 lines in 2 locations

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

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