Code Duplication    Length = 24-25 lines in 2 locations

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

@@ 1183-1207 (lines=25) @@
1180
     *
1181
     * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct
1182
     */
1183
    public function testNewLocationUpdateStruct()
1184
    {
1185
        $repository = $this->getRepository();
1186
1187
        /* BEGIN: Use Case */
1188
        $locationService = $repository->getLocationService();
1189
1190
        $updateStruct = $locationService->newLocationUpdateStruct();
1191
        /* END: Use Case */
1192
1193
        $this->assertInstanceOf(
1194
            LocationUpdateStruct::class,
1195
            $updateStruct
1196
        );
1197
1198
        $this->assertPropertiesCorrect(
1199
            [
1200
                'priority' => null,
1201
                'remoteId' => null,
1202
                'sortField' => null,
1203
                'sortOrder' => null,
1204
            ],
1205
            $updateStruct
1206
        );
1207
    }
1208
1209
    /**
1210
     * Test for the updateLocation() method.

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.