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

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