File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 */
2020final class TimeDifferenceTest extends CIUnitTestCase
2121{
22+ private string $ currentLocale ;
23+
2224 protected function setUp (): void
2325 {
2426 parent ::setUp ();
2527
2628 helper ('date ' );
27- Locale::setDefault ('America/Chicago ' );
29+
30+ $ this ->currentLocale = Locale::getDefault ();
31+ Locale::setDefault ('en-US ' );
32+ }
33+
34+ protected function tearDown (): void
35+ {
36+ parent ::tearDown ();
37+
38+ Locale::setDefault ($ this ->currentLocale );
2839 }
2940
3041 public function testDifferenceBasics ()
Original file line number Diff line number Diff line change 2525 */
2626final class TimeTest extends CIUnitTestCase
2727{
28+ private string $ currentLocale ;
29+
2830 protected function setUp (): void
2931 {
3032 parent ::setUp ();
3133
3234 helper ('date ' );
35+
36+ $ this ->currentLocale = Locale::getDefault ();
3337 Locale::setDefault ('en_US ' );
3438 }
3539
40+ protected function tearDown (): void
41+ {
42+ parent ::tearDown ();
43+
44+ Locale::setDefault ($ this ->currentLocale );
45+ }
46+
3647 public function testNewTimeNow ()
3748 {
3849 $ formatter = new IntlDateFormatter (
You can’t perform that action at this time.
0 commit comments