Code Duplication    Length = 25-26 lines in 3 locations

eZ/Publish/Core/Repository/Tests/Service/Integration/NameSchemaBase.php 1 location

@@ 232-257 (lines=26) @@
229
    /**
230
     * @return \eZ\Publish\Core\Repository\Values\ContentType\FieldDefinition[]
231
     */
232
    protected function getFieldDefinitions()
233
    {
234
        return array(
235
            new FieldDefinition(
236
                array(
237
                    'id' => '1',
238
                    'identifier' => 'text1',
239
                    'fieldTypeIdentifier' => 'ezstring',
240
                )
241
            ),
242
            new FieldDefinition(
243
                array(
244
                    'id' => '2',
245
                    'identifier' => 'text2',
246
                    'fieldTypeIdentifier' => 'ezstring',
247
                )
248
            ),
249
            new FieldDefinition(
250
                array(
251
                    'id' => '3',
252
                    'identifier' => 'text3',
253
                    'fieldTypeIdentifier' => 'ezstring',
254
                )
255
            ),
256
        );
257
    }
258
259
    /**
260
     * Builds stubbed content for testing purpose.

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

@@ 207-232 (lines=26) @@
204
    /**
205
     * @return \eZ\Publish\Core\Repository\Values\ContentType\FieldDefinition[]
206
     */
207
    protected function getFieldDefinitions()
208
    {
209
        return array(
210
            new FieldDefinition(
211
                array(
212
                    'id' => '1',
213
                    'identifier' => 'text1',
214
                    'fieldTypeIdentifier' => 'ezstring',
215
                )
216
            ),
217
            new FieldDefinition(
218
                array(
219
                    'id' => '2',
220
                    'identifier' => 'text2',
221
                    'fieldTypeIdentifier' => 'ezstring',
222
                )
223
            ),
224
            new FieldDefinition(
225
                array(
226
                    'id' => '3',
227
                    'identifier' => 'text3',
228
                    'fieldTypeIdentifier' => 'ezstring',
229
                )
230
            ),
231
        );
232
    }
233
234
    /**
235
     * Builds stubbed content for testing purpose.

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

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