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

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