/** * @covers DateTimeUtils::ToStringForTimeZone */ public function testToStringForTimeZone() { $this->assertEquals($this->stringDateTime1, DateTimeUtils::ToStringForTimeZone($this->dfpDateTime1, self::TIME_ZONE_ID1)); $this->assertEquals($this->stringDateTime2, DateTimeUtils::ToStringForTimeZone($this->dfpDateTime2, self::TIME_ZONE_ID2)); $this->assertEquals($this->stringDateTime3, DateTimeUtils::ToStringForTimeZone($this->dfpDateTime3, self::TIME_ZONE_ID3)); $this->assertEquals($this->stringDateTime1, DateTimeUtils::ToStringForTimeZone(DateTimeUtils::ToDfpDateTime($this->dateTime1->setTimeZone(new DateTimeZone(self::TIME_ZONE_ID2))), self::TIME_ZONE_ID1)); $this->assertEquals($this->stringDateTime2, DateTimeUtils::ToStringForTimeZone(DateTimeUtils::ToDfpDateTime($this->dateTime2->setTimeZone(new DateTimeZone(self::TIME_ZONE_ID1))), self::TIME_ZONE_ID2)); $this->assertEquals($this->stringDateTime3, DateTimeUtils::ToStringForTimeZone(DateTimeUtils::ToDfpDateTime($this->dateTime3->setTimeZone(new DateTimeZone(self::TIME_ZONE_ID1))), self::TIME_ZONE_ID3)); }