コード例 #1
0
 /**
  * @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());
 }
コード例 #2
0
 /**
  * @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());
 }
コード例 #3
0
 /**
  * @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());
 }