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

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