Code Duplication    Length = 24-25 lines in 2 locations

eZ/Publish/API/Repository/Tests/LanguageServiceTest.php 1 location

@@ 30-53 (lines=24) @@
27
     *
28
     * @covers \eZ\Publish\API\Repository\LanguageService::newLanguageCreateStruct
29
     */
30
    public function testNewLanguageCreateStruct()
31
    {
32
        $repository = $this->getRepository();
33
34
        /* BEGIN: Use Case */
35
        $languageService = $repository->getContentLanguageService();
36
37
        $languageCreate = $languageService->newLanguageCreateStruct();
38
        /* END: Use Case */
39
40
        $this->assertInstanceOf(
41
            LanguageCreateStruct::class,
42
            $languageCreate
43
        );
44
45
        $this->assertPropertiesCorrect(
46
            [
47
                'languageCode' => null,
48
                'name' => null,
49
                'enabled' => true,
50
            ],
51
            $languageCreate
52
        );
53
    }
54
55
    /**
56
     * Test for the createLanguage() method.

eZ/Publish/API/Repository/Tests/LocationServiceTest.php 1 location

@@ 967-991 (lines=25) @@
964
     *
965
     * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct
966
     */
967
    public function testNewLocationUpdateStruct()
968
    {
969
        $repository = $this->getRepository();
970
971
        /* BEGIN: Use Case */
972
        $locationService = $repository->getLocationService();
973
974
        $updateStruct = $locationService->newLocationUpdateStruct();
975
        /* END: Use Case */
976
977
        $this->assertInstanceOf(
978
            LocationUpdateStruct::class,
979
            $updateStruct
980
        );
981
982
        $this->assertPropertiesCorrect(
983
            [
984
                'priority' => null,
985
                'remoteId' => null,
986
                'sortField' => null,
987
                'sortOrder' => null,
988
            ],
989
            $updateStruct
990
        );
991
    }
992
993
    /**
994
     * Test for the updateLocation() method.