Fix test
This commit is contained in:
parent
2ed36df9f1
commit
7b3b49e563
@ -11,8 +11,7 @@ class DaemonCollectorTest extends \PHPUnit\Framework\TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
|
$context = $this->createMock(\Magento\Framework\View\Element\Template\Context::class);
|
||||||
$context = $objectManager->getObject(\Magento\Framework\View\Element\Template\Context::class);
|
|
||||||
$customerSession = $this->createMock(\Magento\Customer\Model\Session::class);
|
$customerSession = $this->createMock(\Magento\Customer\Model\Session::class);
|
||||||
$storeManager = $this->createMock(\Magento\Store\Model\StoreManager::class);
|
$storeManager = $this->createMock(\Magento\Store\Model\StoreManager::class);
|
||||||
$storeResolver = $this->createMock(\Magento\Store\Model\StoreResolver::class);
|
$storeResolver = $this->createMock(\Magento\Store\Model\StoreResolver::class);
|
||||||
@ -36,10 +35,13 @@ class DaemonCollectorTest extends \PHPUnit\Framework\TestCase
|
|||||||
->method('getSiteKey')
|
->method('getSiteKey')
|
||||||
->willReturn(self::SITE_KEY);
|
->willReturn(self::SITE_KEY);
|
||||||
|
|
||||||
|
$context->expects($this->any())
|
||||||
|
->method('getStoreManager')
|
||||||
|
->willReturn($storeManager);
|
||||||
|
|
||||||
$this->unit = new \Retailcrm\Retailcrm\Block\Frontend\DaemonCollector(
|
$this->unit = new \Retailcrm\Retailcrm\Block\Frontend\DaemonCollector(
|
||||||
$context,
|
$context,
|
||||||
$customerSession,
|
$customerSession,
|
||||||
$storeManager,
|
|
||||||
$storeResolver,
|
$storeResolver,
|
||||||
$helper
|
$helper
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user