<?php12namespace Pterodactyl\Tests;34use Carbon\Carbon;5use Carbon\CarbonImmutable;6use Illuminate\Foundation\Testing\TestCase as BaseTestCase;78abstract class TestCase extends BaseTestCase9{10/**11* Setup tests.12*/13public function setUp(): void14{15parent::setUp();1617$now = Carbon::now()->startOfSecond();1819Carbon::setTestNow($now);20CarbonImmutable::setTestNow($now);2122// Why, you ask? If we don't force this to false it is possible for certain exceptions23// to show their error message properly in the integration test output, but not actually24// be setup correctly to display their message in production.25//26// If we expect a message in a test, and it isn't showing up (rather, showing the generic27// "an error occurred" message), we can probably assume that the exception isn't one that28// is recognized as being user viewable.29config()->set('app.debug', false);3031$this->setKnownUuidFactory();32}3334/**35* Tear down tests.36*/37protected function tearDown(): void38{39parent::tearDown();4041Carbon::setTestNow();42CarbonImmutable::setTestNow();43}4445/**46* Handles the known UUID handling in certain unit tests. Use the "KnownUuid" trait47* in order to enable this ability.48*/49public function setKnownUuidFactory()50{51// do nothing52}53}545556