File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 19
19
*/
20
20
final class TimeDifferenceTest extends CIUnitTestCase
21
21
{
22
+ private string $ currentLocale ;
23
+
22
24
protected function setUp (): void
23
25
{
24
26
parent ::setUp ();
25
27
26
28
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 );
28
39
}
29
40
30
41
public function testDifferenceBasics ()
Original file line number Diff line number Diff line change 25
25
*/
26
26
final class TimeTest extends CIUnitTestCase
27
27
{
28
+ private string $ currentLocale ;
29
+
28
30
protected function setUp (): void
29
31
{
30
32
parent ::setUp ();
31
33
32
34
helper ('date ' );
35
+
36
+ $ this ->currentLocale = Locale::getDefault ();
33
37
Locale::setDefault ('en_US ' );
34
38
}
35
39
40
+ protected function tearDown (): void
41
+ {
42
+ parent ::tearDown ();
43
+
44
+ Locale::setDefault ($ this ->currentLocale );
45
+ }
46
+
36
47
public function testNewTimeNow ()
37
48
{
38
49
$ formatter = new IntlDateFormatter (
You can’t perform that action at this time.
0 commit comments