Пример #1
0
 public function testUtcDate()
 {
     $this->dateFactory->expects($this->any())->method('create')->with(['date' => 1347260470, 'part' => null, 'locale' => $this->locale])->will($this->returnValue(new \Magento\Framework\Stdlib\DateTime\Date(1347260470, null, $this->locale)));
     $date = $this->timezone->utcDate(\Magento\Core\Helper\Data::XML_PATH_DEFAULT_TIMEZONE, 1347260470);
     $this->assertSame('UTC', $date->getTimezone());
 }
Пример #2
0
 public function testUtcDate()
 {
     $this->dateFactory->expects($this->any())->method('create')->with(['date' => 1347260470, 'part' => null, 'locale' => $this->locale])->will($this->returnValue(new \Magento\Framework\Stdlib\DateTime\Date(1347260470, null, $this->locale)));
     $date = $this->timezone->utcDate('general/locale/timezone', 1347260470);
     $this->assertSame('UTC', $date->getTimezone());
 }