@@ 63-84 (lines=22) @@ | ||
60 | */ |
|
61 | private $databaseHelper; |
|
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 | $store->method('getId')->willReturn(5); |
|
73 | ||
74 | $storeManager = $this->getMockBuilder(StoreManagerInterface::class)->disableOriginalConstructor()->getMock(); |
|
75 | $storeManager->method('getStore')->willReturn($store); |
|
76 | ||
77 | $this->databaseHelper = $this->getMockBuilder(Database::class)->disableOriginalConstructor()->getMock(); |
|
78 | ||
79 | $this->consumerscore = $this->objectManager->getObject(Consumerscore::class, [ |
|
80 | 'context' => $context, |
|
81 | 'storeManager' => $storeManager, |
|
82 | 'databaseHelper' => $this->databaseHelper |
|
83 | ]); |
|
84 | } |
|
85 | ||
86 | public function testGetConsumerscoreSampleCounterFilled() |
|
87 | { |
@@ 62-83 (lines=22) @@ | ||
59 | */ |
|
60 | private $coreCountry; |
|
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->coreCountry = $this->getMockBuilder(CoreCountry::class)->disableOriginalConstructor()->getMock(); |
|
76 | $this->coreCountry->method('getName')->willReturn('Deutschland'); |
|
77 | ||
78 | $this->country = $this->objectManager->getObject(Country::class, [ |
|
79 | 'context' => $context, |
|
80 | 'storeManager' => $storeManager, |
|
81 | 'country' => $this->coreCountry |
|
82 | ]); |
|
83 | } |
|
84 | ||
85 | public function testGetCountryNameByIso2() |
|
86 | { |