Code Duplication    Length = 24-25 lines in 2 locations

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

@@ 1238-1262 (lines=25) @@
1235
     *
1236
     * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct
1237
     */
1238
    public function testNewLocationUpdateStruct()
1239
    {
1240
        $repository = $this->getRepository();
1241
1242
        /* BEGIN: Use Case */
1243
        $locationService = $repository->getLocationService();
1244
1245
        $updateStruct = $locationService->newLocationUpdateStruct();
1246
        /* END: Use Case */
1247
1248
        $this->assertInstanceOf(
1249
            LocationUpdateStruct::class,
1250
            $updateStruct
1251
        );
1252
1253
        $this->assertPropertiesCorrect(
1254
            [
1255
                'priority' => null,
1256
                'remoteId' => null,
1257
                'sortField' => null,
1258
                'sortOrder' => null,
1259
            ],
1260
            $updateStruct
1261
        );
1262
    }
1263
1264
    /**
1265
     * Test for the updateLocation() method.

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

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