use Symfony\Component\Clock\DatePoint;
use Symfony\Component\Clock\Test\ClockSensitiveTrait;
class DatePointTest extends TestCase
{ use ClockSensitiveTrait;
public function testDatePoint() { self::
mockTime('2010-01-28 15:00:00'
);
$date =
new DatePoint();
$this->
assertSame('2010-01-28 15:00:00 UTC',
$date->
format('Y-m-d H:i:s e'
));
$date =
new DatePoint('+1 day Europe/Paris'
);
$this->
assertSame('2010-01-29 16:00:00 Europe/Paris',
$date->
format('Y-m-d H:i:s e'
));
$date =
new DatePoint('2022-01-28 15:00:00 Europe/Paris'
);
$this->
assertSame('2022-01-28 15:00:00 Europe/Paris',
$date->
format('Y-m-d H:i:s e'
));
} public function testCreateFromFormat() {