@@ -37,8 +37,8 @@ public function testSupportNormalization()
37
37
38
38
public function testNormalize ()
39
39
{
40
- $ this ->assertEquals ('2016-01-01T00:00:00+00:00 ' , $ this ->normalizer ->normalize (new \DateTime ('2016/01/01 ' )));
41
- $ this ->assertEquals ('2016-01-01T00:00:00+00:00 ' , $ this ->normalizer ->normalize (new \DateTimeImmutable ('2016/01/01 ' )));
40
+ $ this ->assertEquals ('2016-01-01T00:00:00+00:00 ' , $ this ->normalizer ->normalize (new \DateTime ('2016/01/01 ' , new \ DateTimeZone ( ' UTC ' ) )));
41
+ $ this ->assertEquals ('2016-01-01T00:00:00+00:00 ' , $ this ->normalizer ->normalize (new \DateTimeImmutable ('2016/01/01 ' , new \ DateTimeZone ( ' UTC ' ) )));
42
42
}
43
43
44
44
public function testContextFormat ()
@@ -48,7 +48,7 @@ public function testContextFormat()
48
48
49
49
public function testConstructorFormat ()
50
50
{
51
- $ this ->assertEquals ('16 ' , (new DateTimeNormalizer ('y ' ))->normalize (new \DateTime ('2016/01/01 ' )));
51
+ $ this ->assertEquals ('16 ' , (new DateTimeNormalizer ('y ' ))->normalize (new \DateTime ('2016/01/01 ' , new \ DateTimeZone ( ' UTC ' ) )));
52
52
}
53
53
54
54
/**
@@ -70,9 +70,9 @@ public function testSupportDenormalization()
70
70
71
71
public function testDenormalize ()
72
72
{
73
- $ this ->assertEquals (new \DateTimeImmutable ('2016/01/01 ' ), $ this ->normalizer ->denormalize ('2016-01-01T00:00:00+00:00 ' , \DateTimeInterface::class));
74
- $ this ->assertEquals (new \DateTimeImmutable ('2016/01/01 ' ), $ this ->normalizer ->denormalize ('2016-01-01T00:00:00+00:00 ' , \DateTimeImmutable::class));
75
- $ this ->assertEquals (new \DateTime ('2016/01/01 ' ), $ this ->normalizer ->denormalize ('2016-01-01T00:00:00+00:00 ' , \DateTime::class));
73
+ $ this ->assertEquals (new \DateTimeImmutable ('2016/01/01 ' , new \ DateTimeZone ( ' UTC ' ) ), $ this ->normalizer ->denormalize ('2016-01-01T00:00:00+00:00 ' , \DateTimeInterface::class));
74
+ $ this ->assertEquals (new \DateTimeImmutable ('2016/01/01 ' , new \ DateTimeZone ( ' UTC ' ) ), $ this ->normalizer ->denormalize ('2016-01-01T00:00:00+00:00 ' , \DateTimeImmutable::class));
75
+ $ this ->assertEquals (new \DateTime ('2016/01/01 ' , new \ DateTimeZone ( ' UTC ' ) ), $ this ->normalizer ->denormalize ('2016-01-01T00:00:00+00:00 ' , \DateTime::class));
76
76
}
77
77
78
78
/**
0 commit comments