Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
028921b42a
commit
a043071e3c
211 changed files with 4394 additions and 2933 deletions
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Tests;
|
||||
namespace Pterodactyl\Tests;
|
||||
|
||||
use Cake\Chronos\Chronos;
|
||||
use Carbon\Carbon;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
|
@ -16,9 +17,12 @@ abstract class TestCase extends BaseTestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
Carbon::setTestNow(Carbon::now());
|
||||
CarbonImmutable::setTestNow(Carbon::now());
|
||||
|
||||
// Why, you ask? If we don't force this to false it is possible for certain exceptions
|
||||
// to show their error message properly in the integration test output, but not actually
|
||||
// be setup correctly to display thier message in production.
|
||||
// be setup correctly to display their message in production.
|
||||
//
|
||||
// If we expect a message in a test, and it isn't showing up (rather, showing the generic
|
||||
// "an error occurred" message), we can probably assume that the exception isn't one that
|
||||
|
@ -35,7 +39,8 @@ abstract class TestCase extends BaseTestCase
|
|||
{
|
||||
parent::tearDown();
|
||||
|
||||
Chronos::setTestNow();
|
||||
Carbon::setTestNow();
|
||||
CarbonImmutable::setTestNow();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue