Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't set testNow on all the things.
  • Loading branch information
markstory committed Jun 22, 2018
1 parent 07457ed commit 78ab885
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions tests/TestCase/I18n/TimeTest.php
Expand Up @@ -33,7 +33,6 @@ public function setUp()
{
parent::setUp();
$this->now = Time::getTestNow();
$this->frozenNow = FrozenTime::getTestNow();
$this->locale = Time::getDefaultLocale();
Time::setDefaultLocale('en_US');
FrozenTime::setDefaultLocale('en_US');
Expand All @@ -52,7 +51,6 @@ public function tearDown()
Time::resetToStringFormat();
Time::setJsonEncodeFormat("yyyy-MM-dd'T'HH:mm:ssxxx");

FrozenTime::setTestNow($this->frozenNow);
FrozenTime::setDefaultLocale($this->locale);
FrozenTime::resetToStringFormat();
FrozenTime::setJsonEncodeFormat("yyyy-MM-dd'T'HH:mm:ssxxx");
Expand Down Expand Up @@ -682,7 +680,7 @@ public function testDiffForHumans($class)
*/
public function testDiffForHumansAbsolute($class)
{
$class::setTestNow(new $class('2015-12-12 10:10:10'));
Time::setTestNow(new $class('2015-12-12 10:10:10'));
$time = new $class('2014-04-20 10:10:10');
$this->assertEquals('1 year', $time->diffForHumans(null, ['absolute' => true]));

Expand All @@ -701,7 +699,7 @@ public function testDiffForHumansAbsolute($class)
*/
public function testDiffForHumansNow($class)
{
$class::setTestNow(new $class('2015-12-12 10:10:10'));
Time::setTestNow(new $class('2015-12-12 10:10:10'));
$time = new $class('2014-04-20 10:10:10');
$this->assertEquals('1 year ago', $time->diffForHumans());

Expand Down
3 changes: 0 additions & 3 deletions tests/bootstrap.php
Expand Up @@ -126,9 +126,6 @@
]);

Chronos::setTestNow(Chronos::now());
MutableDateTime::setTestNow(MutableDateTime::now());
Date::setTestNow(Date::now());
MutableDate::setTestNow(MutableDate::now());

ini_set('intl.default_locale', 'en_US');
ini_set('session.gc_divisor', '1');
Expand Down

0 comments on commit 78ab885

Please sign in to comment.