Skip to content

Commit 471176e

Browse files
committed
test: remove tests for Time::__toString()
1 parent e856118 commit 471176e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/system/I18n/TimeTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testNewTimeNow()
5656
);
5757

5858
$time = new Time('', 'America/Chicago');
59-
$this->assertSame($formatter->format($time), (string) $time);
59+
$this->assertSame($formatter->format($time), $time->toDateTimeString());
6060
}
6161

6262
public function testTimeWithTimezone()
@@ -72,7 +72,7 @@ public function testTimeWithTimezone()
7272

7373
$time = new Time('now', 'Europe/London');
7474

75-
$this->assertSame($formatter->format($time), (string) $time);
75+
$this->assertSame($formatter->format($time), $time->toDateTimeString());
7676
}
7777

7878
public function testTimeWithTimezoneAndLocale()
@@ -88,7 +88,7 @@ public function testTimeWithTimezoneAndLocale()
8888

8989
$time = new Time('now', 'Europe/London', 'fr_FR');
9090

91-
$this->assertSame($formatter->format($time), (string) $time);
91+
$this->assertSame($formatter->format($time), $time->toDateTimeString());
9292
}
9393

9494
public function testTimeWithDateTimeZone()
@@ -104,7 +104,7 @@ public function testTimeWithDateTimeZone()
104104

105105
$time = new Time('now', new DateTimeZone('Europe/London'), 'fr_FR');
106106

107-
$this->assertSame($formatter->format($time), (string) $time);
107+
$this->assertSame($formatter->format($time), $time->toDateTimeString());
108108
}
109109

110110
public function testToDateTime()
@@ -138,7 +138,6 @@ public function testToDateTimeString()
138138
{
139139
$time = Time::parse('2017-01-12 00:00', 'America/Chicago');
140140

141-
$this->assertSame('2017-01-12 00:00:00', (string) $time);
142141
$this->assertSame('2017-01-12 00:00:00', $time->toDateTimeString());
143142
}
144143

0 commit comments

Comments
 (0)