TestCaseBase.php 676 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of the Carbon package.
  5. *
  6. * (c) Brian Nesbitt <brian@nesbot.com>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Tests\Jenssegers;
  12. use Carbon\Carbon;
  13. use PHPUnit\Framework\TestCase;
  14. abstract class TestCaseBase extends TestCase
  15. {
  16. public const LOCALE = 'en';
  17. protected function setUp(): void
  18. {
  19. parent::setUp();
  20. date_default_timezone_set('UTC');
  21. Carbon::setLocale(static::LOCALE);
  22. // Freeze the time for the test duration
  23. Carbon::setTestNow(Carbon::now());
  24. }
  25. }