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()); }
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()); }