Code Duplication    Length = 15-21 lines in 2 locations

Test/Unit/Helper/ShopTest.php 1 location

@@ 47-61 (lines=15) @@
44
     */
45
    protected $shop;
46
47
    protected function setUp()
48
    {
49
        $this->objectManager = new ObjectManager($this);
50
51
        $productMetadata = $this->getMockBuilder(ProductMetadata::class)->disableOriginalConstructor()->getMock();
52
        $productMetadata->method('getEdition')->willReturn('Community');
53
        $productMetadata->method('getVersion')->willReturn('2.0.0');
54
55
        $store = $this->getMockBuilder(StoreInterface::class)->disableOriginalConstructor()->getMock();
56
        $store->method('getId')->willReturn(1);
57
58
        $storeManager = $this->getMockBuilder(StoreManagerInterface::class)->disableOriginalConstructor()->getMock();
59
        $storeManager->method('getStore')->willReturn($store);
60
        $this->shop = $this->objectManager->getObject(Shop::class, ['storeManager' => $storeManager, 'productMetadata' => $productMetadata]);
61
    }
62
63
    public function testGetMagentoEdition()
64
    {

Test/Unit/Model/TransactionStatusRepositoryTest.php 1 location

@@ 47-67 (lines=21) @@
44
     */
45
    private $objectManager;
46
47
    protected function setUp()
48
    {
49
        $this->objectManager = new ObjectManager($this);
50
51
        $resourceModel = $this->getMockBuilder(ResourceModel::class)->disableOriginalConstructor()->getMock();
52
        $resourceModel->method('getAppointedIdByTxid')->willReturn('12345');
53
54
        $transactionStatus = $this->getMockBuilder(TransactionStatus::class)->disableOriginalConstructor()->getMock();
55
        $transactionStatus->method('load')->willReturn($transactionStatus);
56
57
        $transactionStatusFactory = $this->getMockBuilder(TransactionStatusFactory::class)
58
            ->disableOriginalConstructor()
59
            ->setMethods(['create'])
60
            ->getMock();
61
        $transactionStatusFactory->method('create')->willReturn($transactionStatus);
62
63
        $this->classToTest = $this->objectManager->getObject(ClassToTest::class, [
64
            'resourceModel' => $resourceModel,
65
            'transactionStatusFactory' => $transactionStatusFactory
66
        ]);
67
    }
68
69
    public function testGetAppointedByTxid()
70
    {