Code Duplication    Length = 24-25 lines in 2 locations

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

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

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

@@ 1208-1232 (lines=25) @@
1205
     *
1206
     * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct
1207
     */
1208
    public function testNewLocationUpdateStruct()
1209
    {
1210
        $repository = $this->getRepository();
1211
1212
        /* BEGIN: Use Case */
1213
        $locationService = $repository->getLocationService();
1214
1215
        $updateStruct = $locationService->newLocationUpdateStruct();
1216
        /* END: Use Case */
1217
1218
        $this->assertInstanceOf(
1219
            LocationUpdateStruct::class,
1220
            $updateStruct
1221
        );
1222
1223
        $this->assertPropertiesCorrect(
1224
            [
1225
                'priority' => null,
1226
                'remoteId' => null,
1227
                'sortField' => null,
1228
                'sortOrder' => null,
1229
            ],
1230
            $updateStruct
1231
        );
1232
    }
1233
1234
    /**
1235
     * Test for the updateLocation() method.