/**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  */
 public function testGetStoreCreateDate()
 {
     $customer = $this->_loadCustomer();
     $date = $this->_context->getLocaleDate()->scopeDate($customer->getStoreId(), $this->dateTime->toTimestamp($customer->getCreatedAt()), true);
     $storeCreateDate = $this->_block->formatDate($date, \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true);
     $this->assertEquals($storeCreateDate, $this->_block->getStoreCreateDate());
 }
 /**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  */
 public function testGetStoreCreateDate()
 {
     $customer = $this->_loadCustomer();
     $date = $this->_context->getLocaleDate()->scopeDate($customer->getStoreId(), $customer->getCreatedAt(), true);
     $storeCreateDate = $this->_block->formatDate($date, \IntlDateFormatter::MEDIUM, true);
     $this->assertEquals($storeCreateDate, $this->_block->getStoreCreateDate());
 }
 /**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  */
 public function testGetStoreCreateDate()
 {
     $customer = $this->_loadCustomer();
     $localeDate = $this->_context->getLocaleDate();
     $timezone = $localeDate->getConfigTimezone(\Magento\Store\Model\ScopeInterface::SCOPE_STORE, $customer->getStoreId());
     $storeCreateDate = $this->_block->formatDate($customer->getCreatedAt(), \IntlDateFormatter::MEDIUM, true, null, $timezone);
     $this->assertEquals($storeCreateDate, $this->_block->getStoreCreateDate());
 }
Example #4
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, array $data = array())
 {
     $this->_localeDate = $context->getLocaleDate();
     $this->_authorization = $context->getAuthorization();
     $this->mathRandom = $context->getMathRandom();
     $this->_backendSession = $context->getBackendSession();
     $this->formKey = $context->getFormKey();
     $this->nameBuilder = $context->getNameBuilder();
     parent::__construct($context, $data);
 }
Example #5
0
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, \Celebros\Celexport\Model\ResourceModel\Cronlog\Collection $collection, array $data = [])
 {
     $this->_collection = $collection;
     $this->_timezone = $context->getLocaleDate();
     parent::__construct($context, $backendHelper, $data);
 }
Example #6
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Framework\Data\FormFactory $formFactory
  * @param \Celebros\Celexport\Helper\Export $helper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Data\FormFactory $formFactory, \Celebros\Celexport\Helper\Export $helper, array $data = [])
 {
     $this->helper = $helper;
     $this->timezone = $context->getLocaleDate();
     parent::__construct($context, $registry, $formFactory, $data);
 }