Code Duplication    Length = 27-27 lines in 2 locations

eZ/Publish/Core/Repository/Tests/Service/Integration/TrashBase.php 2 locations

@@ 117-143 (lines=27) @@
114
     *
115
     * @covers \eZ\Publish\API\Repository\TrashService::loadTrashItem
116
     */
117
    public function testLoadTrashItem()
118
    {
119
        $locationService = $this->repository->getLocationService();
120
        $trashService = $this->repository->getTrashService();
121
122
        $trashItem = $location = $trashService->trash($locationService->loadLocation(44));
123
        $loadedTrashItem = $trashService->loadTrashItem($location->id);
124
125
        self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\Content\\TrashItem', $trashItem);
126
127
        self::assertSameClassPropertiesCorrect(
128
            array(
129
                'id',
130
                'priority',
131
                'hidden',
132
                'invisible',
133
                'remoteId',
134
                'parentLocationId',
135
                'pathString',
136
                'depth',
137
                'sortField',
138
                'sortOrder',
139
            ),
140
            $trashItem,
141
            $loadedTrashItem
142
        );
143
    }
144
145
    /**
146
     * Test loading a trash item throwing NotFoundException.
@@ 162-188 (lines=27) @@
159
     *
160
     * @covers \eZ\Publish\API\Repository\TrashService::trash
161
     */
162
    public function testTrash()
163
    {
164
        $locationService = $this->repository->getLocationService();
165
        $trashService = $this->repository->getTrashService();
166
167
        $location = $locationService->loadLocation(44);
168
        $trashItem = $trashService->trash($location);
169
170
        self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\Content\\TrashItem', $trashItem);
171
172
        self::assertSameClassPropertiesCorrect(
173
            array(
174
                'id',
175
                'priority',
176
                'hidden',
177
                'invisible',
178
                'remoteId',
179
                'parentLocationId',
180
                'pathString',
181
                'depth',
182
                'sortField',
183
                'sortOrder',
184
            ),
185
            $location,
186
            $trashItem
187
        );
188
    }
189
190
    /**
191
     * Test sending a location to trash.