Code Duplication    Length = 22-22 lines in 2 locations

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

@@ 264-285 (lines=22) @@
261
     *
262
     * @return \eZ\Publish\API\Repository\Values\Content\Content
263
     */
264
    protected function buildTestObjects($nameSchema = '<name_schema>', $urlAliasSchema = '<urlalias_schema>')
265
    {
266
        $contentType = new ContentType(
267
            array(
268
                'nameSchema' => $nameSchema,
269
                'urlAliasSchema' => $urlAliasSchema,
270
                'fieldDefinitions' => $this->getFieldDefinitions(),
271
            )
272
        );
273
        $content = new Content(
274
            array(
275
                'internalFields' => $this->getFields(),
276
                'versionInfo' => new VersionInfo(
277
                    array(
278
                        'languageCodes' => array('eng-GB', 'cro-HR'),
279
                    )
280
                ),
281
            )
282
        );
283
284
        return array($content, $contentType);
285
    }
286
287
    /**
288
     * @param object $service

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

@@ 239-260 (lines=22) @@
236
     *
237
     * @return \eZ\Publish\API\Repository\Values\Content\Content
238
     */
239
    protected function buildTestObjects($nameSchema = '<name_schema>', $urlAliasSchema = '<urlalias_schema>')
240
    {
241
        $content = new Content(
242
            array(
243
                'internalFields' => $this->getFields(),
244
                'versionInfo' => new VersionInfo(
245
                    array(
246
                        'languageCodes' => array('eng-GB', 'cro-HR'),
247
                    )
248
                ),
249
            )
250
        );
251
        $contentType = new ContentType(
252
            array(
253
                'nameSchema' => $nameSchema,
254
                'urlAliasSchema' => $urlAliasSchema,
255
                'fieldDefinitions' => $this->getFieldDefinitions(),
256
            )
257
        );
258
259
        return array($content, $contentType);
260
    }
261
262
    /**
263
     * Returns the content service to test with $methods mocked.