コード例 #1
0
 public function test_can_set_datetime_attribute_from_string()
 {
     $tz = new DateTimeZone('UTC');
     $object = new PodioObject();
     $object->property('datetime_property', 'datetime');
     $object->datetime_property = '2014-01-03 14:00:00';
     $this->assertInstanceOf('DateTime', $object->datetime_property);
     $this->assertEquals('2014-01-03 14:00:00', $object->datetime_property->format('Y-m-d H:i:s'));
 }