Code Duplication    Length = 21-21 lines in 2 locations

Test/Unit/Helper/ConfigTest.php 1 location

@@ 62-82 (lines=21) @@
59
     */
60
    private $toolkitHelper;
61
62
    protected function setUp()
63
    {
64
        $this->objectManager = $this->getObjectManager();
65
66
        $this->scopeConfig = $this->getMockBuilder(ScopeConfigInterface::class)->disableOriginalConstructor()->getMock();
67
        $context = $this->objectManager->getObject(Context::class, ['scopeConfig' => $this->scopeConfig]);
68
69
        $store = $this->getMockBuilder(StoreInterface::class)->disableOriginalConstructor()->getMock();
70
        $store->method('getCode')->willReturn(null);
71
72
        $storeManager = $this->getMockBuilder(StoreManagerInterface::class)->disableOriginalConstructor()->getMock();
73
        $storeManager->method('getStore')->willReturn($store);
74
75
        $this->toolkitHelper = $this->objectManager->getObject(Toolkit::class);
76
77
        $this->config = $this->objectManager->getObject(Config::class, [
78
            'context' => $context,
79
            'storeManager' => $storeManager,
80
            'toolkitHelper' => $this->toolkitHelper
81
        ]);
82
    }
83
84
    public function testGetConfigParamEmpty()
85
    {

Test/Unit/Helper/PaymentTest.php 1 location

@@ 63-83 (lines=21) @@
60
     */
61
    private $toolkitHelper;
62
63
    protected function setUp()
64
    {
65
        $this->objectManager = $this->getObjectManager();
66
67
        $this->scopeConfig = $this->getMockBuilder(ScopeConfigInterface::class)->disableOriginalConstructor()->getMock();
68
        $context = $this->objectManager->getObject(Context::class, ['scopeConfig' => $this->scopeConfig]);
69
70
        $store = $this->getMockBuilder(StoreInterface::class)->disableOriginalConstructor()->getMock();
71
        $store->method('getCode')->willReturn(null);
72
73
        $storeManager = $this->getMockBuilder(StoreManagerInterface::class)->disableOriginalConstructor()->getMock();
74
        $storeManager->method('getStore')->willReturn($store);
75
76
        $this->toolkitHelper = $this->objectManager->getObject(Toolkit::class);
77
78
        $this->payment = $this->objectManager->getObject(Payment::class, [
79
            'context' => $context,
80
            'storeManager' => $storeManager,
81
            'toolkitHelper' => $this->toolkitHelper
82
        ]);
83
    }
84
85
    public function testGetAvailablePaymentTypes()
86
    {