Code Duplication    Length = 26-26 lines in 3 locations

bridge/doctrine-phpcr-odm/tests/Functional/GeneralTest.php 2 locations

@@ 48-73 (lines=26) @@
45
        $this->initPhpcr($this->documentManager);
46
    }
47
48
    public function initCollectionArticle()
49
    {
50
        $container = $this->getContainer([
51
            'mapping' => [
52
                Article::class => [
53
                    'fields' => [
54
                        'slideshow' => [
55
                            'type' => 'collection',
56
                            'options' => [
57
                                'field_type' => 'image',
58
                            ],
59
                        ],
60
                        'objectReferences' => [
61
                            'type' => 'collection',
62
                            'options' => [
63
                                'field_type' => 'object_reference',
64
                            ],
65
                        ],
66
                    ],
67
                ],
68
            ],
69
        ]);
70
        $this->documentManager = $container->get('doctrine_phpcr.document_manager');
71
        $this->initPhpcr($this->documentManager);
72
        $this->updater = $container->get('psi_content_type.storage.doctrine.phpcr_odm.collection_updater');
73
    }
74
75
    public function initScalarCollectionArticle()
76
    {
@@ 75-100 (lines=26) @@
72
        $this->updater = $container->get('psi_content_type.storage.doctrine.phpcr_odm.collection_updater');
73
    }
74
75
    public function initScalarCollectionArticle()
76
    {
77
        $container = $this->getContainer([
78
            'mapping' => [
79
                Article::class => [
80
                    'fields' => [
81
                        'paragraphs' => [
82
                            'type' => 'collection',
83
                            'options' => [
84
                                'field_type' => 'text',
85
                                'field_options' => [],
86
                            ],
87
                        ],
88
                        'numbers' => [
89
                            'type' => 'collection',
90
                            'options' => [
91
                                'field_type' => 'integer',
92
                            ],
93
                        ],
94
                    ],
95
                ],
96
            ],
97
        ]);
98
        $this->documentManager = $container->get('doctrine_phpcr.document_manager');
99
        $this->initPhpcr($this->documentManager);
100
    }
101
102
    public function testString()
103
    {

bridge/doctrine-phpcr-odm/tests/Functional/CollectionType/ObjectTest.php 1 location

@@ 15-40 (lines=26) @@
12
    private $documentManager;
13
    private $updater;
14
15
    public function setUp()
16
    {
17
        $container = $this->getContainer([
18
            'mapping' => [
19
                Article::class => [
20
                    'fields' => [
21
                        'slideshow' => [
22
                            'type' => 'collection',
23
                            'options' => [
24
                                'field_type' => 'image',
25
                            ],
26
                        ],
27
                        'objectReferences' => [
28
                            'type' => 'collection',
29
                            'options' => [
30
                                'field_type' => 'object_reference',
31
                            ],
32
                        ],
33
                    ],
34
                ],
35
            ],
36
        ]);
37
        $this->documentManager = $container->get('doctrine_phpcr.document_manager');
38
        $this->initPhpcr($this->documentManager);
39
        $this->updater = $container->get('psi_content_type.storage.doctrine.phpcr_odm.collection_updater');
40
    }
41
42
    /**
43
     * It should update an object collection.