Code Duplication    Length = 22-22 lines in 2 locations

Test/Unit/Helper/ConsumerscoreTest.php 1 location

@@ 61-82 (lines=22) @@
58
     */
59
    private $databaseHelper;
60
61
    protected function setUp()
62
    {
63
        $this->objectManager = new ObjectManager($this);
64
65
        $this->scopeConfig = $this->getMockBuilder(ScopeConfigInterface::class)->disableOriginalConstructor()->getMock();
66
        $context = $this->objectManager->getObject(Context::class, ['scopeConfig' => $this->scopeConfig]);
67
68
        $store = $this->getMockBuilder(StoreInterface::class)->disableOriginalConstructor()->getMock();
69
        $store->method('getCode')->willReturn(null);
70
        $store->method('getId')->willReturn(5);
71
72
        $storeManager = $this->getMockBuilder(StoreManagerInterface::class)->disableOriginalConstructor()->getMock();
73
        $storeManager->method('getStore')->willReturn($store);
74
75
        $this->databaseHelper = $this->getMockBuilder(Database::class)->disableOriginalConstructor()->getMock();
76
77
        $this->consumerscore = $this->objectManager->getObject(Consumerscore::class, [
78
            'context' => $context,
79
            'storeManager' => $storeManager,
80
            'databaseHelper' => $this->databaseHelper
81
        ]);
82
    }
83
84
    public function testGetConsumerscoreSampleCounterFilled()
85
    {

Test/Unit/Helper/CountryTest.php 1 location

@@ 60-81 (lines=22) @@
57
     */
58
    private $coreCountry;
59
60
    protected function setUp()
61
    {
62
        $this->objectManager = new ObjectManager($this);
63
64
        $this->scopeConfig = $this->getMockBuilder(ScopeConfigInterface::class)->disableOriginalConstructor()->getMock();
65
        $context = $this->objectManager->getObject(Context::class, ['scopeConfig' => $this->scopeConfig]);
66
67
        $store = $this->getMockBuilder(StoreInterface::class)->disableOriginalConstructor()->getMock();
68
        $store->method('getCode')->willReturn(null);
69
70
        $storeManager = $this->getMockBuilder(StoreManagerInterface::class)->disableOriginalConstructor()->getMock();
71
        $storeManager->method('getStore')->willReturn($store);
72
73
        $this->coreCountry = $this->getMockBuilder(CoreCountry::class)->disableOriginalConstructor()->getMock();
74
        $this->coreCountry->method('getName')->willReturn('Deutschland');
75
76
        $this->country = $this->objectManager->getObject(Country::class, [
77
            'context' => $context,
78
            'storeManager' => $storeManager,
79
            'country' => $this->coreCountry
80
        ]);
81
    }
82
83
    public function testGetCountryNameByIso2()
84
    {