Code Duplication    Length = 19-22 lines in 3 locations

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

@@ 378-396 (lines=19) @@
375
    /**
376
     * @return LoadMagentoChannel
377
     */
378
    protected function createChannel()
379
    {
380
        $channel = $this
381
            ->factory
382
            ->createBuilder()
383
            ->setName(self::CHANNEL_NAME)
384
            ->setChannelType(self::CHANNEL_TYPE)
385
            ->setStatus(Channel::STATUS_ACTIVE)
386
            ->setDataSource($this->integration)
387
            ->setOwner($this->organization)
388
            ->setEntities()
389
            ->getChannel();
390
        $this->em->persist($channel);
391
        $this->em->flush();
392
        $this->setReference('default_channel', $channel);
393
        $this->channel = $channel;
394
395
        return $this;
396
    }
397
}
398

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

@@ 678-699 (lines=22) @@
675
    /**
676
     * @return LoadMagentoChannel
677
     */
678
    protected function createChannel()
679
    {
680
        $channel = $this
681
            ->factory
682
            ->createBuilder()
683
            ->setName(self::CHANNEL_NAME)
684
            ->setChannelType(self::CHANNEL_TYPE)
685
            ->setStatus(Channel::STATUS_ACTIVE)
686
            ->setDataSource($this->integration)
687
            ->setOwner($this->organization)
688
            ->setEntities()
689
            ->getChannel();
690
691
        $this->em->persist($channel);
692
        $this->em->flush();
693
694
        $this->setReference('default_channel', $channel);
695
696
        $this->channel = $channel;
697
698
        return $this;
699
    }
700
}
701

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

@@ 444-462 (lines=19) @@
441
    /**
442
     * @return LoadMagentoChannel
443
     */
444
    protected function createChannel()
445
    {
446
        $channel = $this
447
            ->factory
448
            ->createBuilder()
449
            ->setName(self::CHANNEL_NAME)
450
            ->setChannelType(self::CHANNEL_TYPE)
451
            ->setStatus(Channel::STATUS_ACTIVE)
452
            ->setDataSource($this->integration)
453
            ->setOwner($this->organization)
454
            ->setEntities()
455
            ->getChannel();
456
        $this->em->persist($channel);
457
        $this->em->flush();
458
        $this->setReference('default_channel', $channel);
459
        $this->channel = $channel;
460
461
        return $this;
462
    }
463
}
464