/** * Returns a new TimeZone object. * * @param StringLiteral $name * * @throws InvalidTimeZoneException */ public function __construct(StringLiteral $name) { if (!in_array($name->toNative(), timezone_identifiers_list())) { throw new InvalidTimeZoneException($name); } $this->name = $name; }
public function testToNative() { $string = new StringLiteral('foo'); $this->assertEquals('foo', $string->toNative()); }