Skip to content

Commit

Permalink
Clear Carbon mock in tear down. (#19934)
Browse files Browse the repository at this point in the history
  • Loading branch information
BertvanHoekelen authored and taylorotwell committed Jul 6, 2017
1 parent 7b5112f commit bdb8561
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Illuminate/Foundation/Testing/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Illuminate\Foundation\Testing;

use Mockery;
use Carbon\Carbon;
use Illuminate\Support\Facades\Facade;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Console\Application as Artisan;
Expand Down Expand Up @@ -149,6 +150,10 @@ protected function tearDown()
Mockery::close();
}

if (class_exists(Carbon::class)) {
Carbon::setTestNow();
}

$this->afterApplicationCreatedCallbacks = [];
$this->beforeApplicationDestroyedCallbacks = [];

Expand Down

0 comments on commit bdb8561

Please sign in to comment.