Code Duplication    Length = 15-17 lines in 3 locations

src/OroCRM/Bundle/MagentoBundle/Tests/Functional/Fixture/CopyCustomerAddressToContact/LoadMagentoChannel.php 1 location

@@ 126-140 (lines=15) @@
123
    /**
124
     * @return $this
125
     */
126
    protected function createIntegration()
127
    {
128
        $integration = new Integration();
129
        $integration->setName('Demo Web store');
130
        $integration->setType('magento');
131
        $integration->setConnectors(['customer', 'order', 'cart']);
132
        $integration->setTransport($this->transport);
133
        $integration->setOrganization($this->organization);
134
        $synchronizationSettings = ConfigObject::create(['isTwoWaySyncEnabled' => true]);
135
        $integration->setSynchronizationSettings($synchronizationSettings);
136
        $this->em->persist($integration);
137
        $this->integration = $integration;
138
139
        return $this;
140
    }
141
    /**
142
     * @return $this
143
     */

src/OroCRM/Bundle/MagentoBundle/Tests/Functional/Fixture/LoadMagentoChannel.php 1 location

@@ 251-267 (lines=17) @@
248
    /**
249
     * @return $this
250
     */
251
    protected function createIntegration()
252
    {
253
        $integration = new Integration();
254
        $integration->setName('Demo Web store');
255
        $integration->setType('magento');
256
        $integration->setConnectors(['customer', 'order', 'cart']);
257
        $integration->setTransport($this->transport);
258
        $integration->setOrganization($this->organization);
259
260
        $synchronizationSettings = ConfigObject::create(['isTwoWaySyncEnabled' => true]);
261
        $integration->setSynchronizationSettings($synchronizationSettings);
262
263
        $this->em->persist($integration);
264
        $this->integration = $integration;
265
266
        return $this;
267
    }
268
269
    /**
270
     * @return $this

src/OroCRM/Bundle/MagentoBundle/Tests/Functional/Fixture/ResyncMagentoCustomerAddresses/LoadMagentoChannel.php 1 location

@@ 172-186 (lines=15) @@
169
    /**
170
     * @return $this
171
     */
172
    protected function createIntegration()
173
    {
174
        $integration = new Integration();
175
        $integration->setName('Demo Web store');
176
        $integration->setType('magento');
177
        $integration->setConnectors(['customer', 'order', 'cart']);
178
        $integration->setTransport($this->transport);
179
        $integration->setOrganization($this->organization);
180
        $synchronizationSettings = ConfigObject::create(['isTwoWaySyncEnabled' => true]);
181
        $integration->setSynchronizationSettings($synchronizationSettings);
182
        $this->em->persist($integration);
183
        $this->integration = $integration;
184
185
        return $this;
186
    }
187
188
    /**
189
     * @return $this