Code Duplication    Length = 25-26 lines in 2 locations

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

@@ 644-668 (lines=25) @@
641
     *
642
     * @return \eZ\Publish\API\Repository\Values\ContentType\ContentType
643
     */
644
    protected function getContentType()
645
    {
646
        return new ContentType(
647
            array(
648
                'id' => 13,
649
                'identifier' => 'some_class',
650
                'fieldDefinitions' => array(
651
                    new FieldDefinition(
652
                        array(
653
                            'id' => 42,
654
                            'identifier' => 'subject',
655
                            'fieldTypeIdentifier' => 'ezstring',
656
                        )
657
                    ),
658
                    new FieldDefinition(
659
                        array(
660
                            'id' => 43,
661
                            'identifier' => 'author',
662
                            'fieldTypeIdentifier' => 'ezstring',
663
                        )
664
                    ),
665
                ),
666
            )
667
        );
668
    }
669
}
670

eZ/Publish/Core/Repository/Tests/Service/Mock/NameSchemaTest.php 1 location

@@ 307-332 (lines=26) @@
304
    /**
305
     * @return \eZ\Publish\Core\Repository\Values\ContentType\FieldDefinition[]
306
     */
307
    protected function getFieldDefinitions()
308
    {
309
        return array(
310
            new FieldDefinition(
311
                array(
312
                    'id' => '1',
313
                    'identifier' => 'text1',
314
                    'fieldTypeIdentifier' => 'ezstring',
315
                )
316
            ),
317
            new FieldDefinition(
318
                array(
319
                    'id' => '2',
320
                    'identifier' => 'text2',
321
                    'fieldTypeIdentifier' => 'ezstring',
322
                )
323
            ),
324
            new FieldDefinition(
325
                array(
326
                    'id' => '3',
327
                    'identifier' => 'text3',
328
                    'fieldTypeIdentifier' => 'ezstring',
329
                )
330
            ),
331
        );
332
    }
333
334
    /**
335
     * Build Content Object stub for testing purpose.