Code Duplication    Length = 18-18 lines in 2 locations

eZ/Publish/Core/REST/Server/Tests/Input/Parser/UserGroupUpdateTest.php 1 location

@@ 296-313 (lines=18) @@
293
     *
294
     * @return \eZ\Publish\API\Repository\ContentService
295
     */
296
    protected function getContentServiceMock()
297
    {
298
        $contentServiceMock = $this->createMock(ContentService::class);
299
300
        $contentServiceMock->expects($this->any())
301
            ->method('newContentUpdateStruct')
302
            ->will(
303
                $this->returnValue(new ContentUpdateStruct())
304
            );
305
306
        $contentServiceMock->expects($this->any())
307
            ->method('newContentMetadataUpdateStruct')
308
            ->will(
309
                $this->returnValue(new ContentMetadataUpdateStruct())
310
            );
311
312
        return $contentServiceMock;
313
    }
314
315
    public function getParseHrefExpectationsMap()
316
    {

eZ/Publish/Core/REST/Server/Tests/Input/Parser/UserUpdateTest.php 1 location

@@ 297-314 (lines=18) @@
294
     *
295
     * @return \eZ\Publish\API\Repository\ContentService
296
     */
297
    protected function getContentServiceMock()
298
    {
299
        $contentServiceMock = $this->createMock(ContentService::class);
300
301
        $contentServiceMock->expects($this->any())
302
            ->method('newContentUpdateStruct')
303
            ->will(
304
                $this->returnValue(new ContentUpdateStruct())
305
            );
306
307
        $contentServiceMock->expects($this->any())
308
            ->method('newContentMetadataUpdateStruct')
309
            ->will(
310
                $this->returnValue(new ContentMetadataUpdateStruct())
311
            );
312
313
        return $contentServiceMock;
314
    }
315
316
    public function getParseHrefExpectationsMap()
317
    {