Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 619-632 (lines=14) @@
616
     *
617
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
618
     */
619
    public function testLoadLocationList(): void
620
    {
621
        $repository = $this->getRepository();
622
623
        // 5 is the ID of an existing location, 442 is a non-existing id
624
        $locationService = $repository->getLocationService();
625
        $locations = $locationService->loadLocationList([5, 442]);
626
627
        self::assertInternalType('iterable', $locations);
628
        self::assertCount(1, $locations);
629
        self::assertEquals([5], array_keys($locations));
630
        self::assertInstanceOf(Location::class, $locations[5]);
631
        self::assertEquals(5, $locations[5]->id);
632
    }
633
634
    /**
635
     * Test for the loadLocationList() method.
@@ 682-695 (lines=14) @@
679
     *
680
     * @covers \eZ\Publish\API\Repository\LocationService::loadLocationList
681
     */
682
    public function testLoadLocationListWithRootLocationId()
683
    {
684
        $repository = $this->getRepository();
685
686
        // 1 is the ID of an root location
687
        $locationService = $repository->getLocationService();
688
        $locations = $locationService->loadLocationList([1]);
689
690
        self::assertInternalType('iterable', $locations);
691
        self::assertCount(1, $locations);
692
        self::assertEquals([1], array_keys($locations));
693
        self::assertInstanceOf(Location::class, $locations[1]);
694
        self::assertEquals(1, $locations[1]->id);
695
    }
696
697
    /**
698
     * Test for the loadLocationList() method.