@@ -56,7 +56,7 @@ public function testNewTimeNow()
56
56
);
57
57
58
58
$ time = new Time ('' , 'America/Chicago ' );
59
- $ this ->assertSame ($ formatter ->format ($ time ), ( string ) $ time );
59
+ $ this ->assertSame ($ formatter ->format ($ time ), $ time-> toDateTimeString () );
60
60
}
61
61
62
62
public function testTimeWithTimezone ()
@@ -72,7 +72,7 @@ public function testTimeWithTimezone()
72
72
73
73
$ time = new Time ('now ' , 'Europe/London ' );
74
74
75
- $ this ->assertSame ($ formatter ->format ($ time ), ( string ) $ time );
75
+ $ this ->assertSame ($ formatter ->format ($ time ), $ time-> toDateTimeString () );
76
76
}
77
77
78
78
public function testTimeWithTimezoneAndLocale ()
@@ -88,7 +88,7 @@ public function testTimeWithTimezoneAndLocale()
88
88
89
89
$ time = new Time ('now ' , 'Europe/London ' , 'fr_FR ' );
90
90
91
- $ this ->assertSame ($ formatter ->format ($ time ), ( string ) $ time );
91
+ $ this ->assertSame ($ formatter ->format ($ time ), $ time-> toDateTimeString () );
92
92
}
93
93
94
94
public function testTimeWithDateTimeZone ()
@@ -104,7 +104,7 @@ public function testTimeWithDateTimeZone()
104
104
105
105
$ time = new Time ('now ' , new DateTimeZone ('Europe/London ' ), 'fr_FR ' );
106
106
107
- $ this ->assertSame ($ formatter ->format ($ time ), ( string ) $ time );
107
+ $ this ->assertSame ($ formatter ->format ($ time ), $ time-> toDateTimeString () );
108
108
}
109
109
110
110
public function testToDateTime ()
@@ -138,7 +138,6 @@ public function testToDateTimeString()
138
138
{
139
139
$ time = Time::parse ('2017-01-12 00:00 ' , 'America/Chicago ' );
140
140
141
- $ this ->assertSame ('2017-01-12 00:00:00 ' , (string ) $ time );
142
141
$ this ->assertSame ('2017-01-12 00:00:00 ' , $ time ->toDateTimeString ());
143
142
}
144
143
0 commit comments