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

@@ 1055-1079 (lines=25) @@
1052
     *
1053
     * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct
1054
     */
1055
    public function testNewLocationUpdateStruct()
1056
    {
1057
        $repository = $this->getRepository();
1058
1059
        /* BEGIN: Use Case */
1060
        $locationService = $repository->getLocationService();
1061
1062
        $updateStruct = $locationService->newLocationUpdateStruct();
1063
        /* END: Use Case */
1064
1065
        $this->assertInstanceOf(
1066
            LocationUpdateStruct::class,
1067
            $updateStruct
1068
        );
1069
1070
        $this->assertPropertiesCorrect(
1071
            [
1072
                'priority' => null,
1073
                'remoteId' => null,
1074
                'sortField' => null,
1075
                'sortOrder' => null,
1076
            ],
1077
            $updateStruct
1078
        );
1079
    }
1080
1081
    /**
1082
     * Test for the updateLocation() method.