Code Duplication    Length = 24-25 lines in 2 locations

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.

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

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