/** * @magentoDataFixture Magento/Customer/_files/customer.php */ public function testGetStoreCreateDateTimezone() { /** * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface $defaultTimeZonePath */ $defaultTimeZonePath = $this->_objectManager->get('Magento\\Framework\\Stdlib\\DateTime\\TimezoneInterface')->getDefaultTimezonePath(); $timezone = $this->_context->getScopeConfig()->getValue($defaultTimeZonePath, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $this->_loadCustomer()->getStoreId()); $this->assertEquals($timezone, $this->_block->getStoreCreateDateTimezone()); }
public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, StoreManager $storeManager) { $this->storeManager = $storeManager; $this->_configResource = $context->getScopeConfig(); parent::__construct($context); }