Code Duplication    Length = 22-22 lines in 2 locations

eZ/Publish/Core/Repository/Tests/Helper/NameSchemaTest.php 1 location

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

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

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