Last active
October 9, 2021 04:01
-
-
Save jsdecena/d8885d9722ea6c1e359b668206e8167d to your computer and use it in GitHub Desktop.
Simple TDD Base Testcase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Jsdecena\Simpletdd\Tests; | |
use Illuminate\Foundation\Testing\DatabaseMigrations; | |
use Illuminate\Foundation\Application; | |
abstract class TestCase extends \Orchestra\Testbench\TestCase | |
{ | |
use DatabaseMigrations; | |
/** | |
* Set up | |
*/ | |
protected function setUp(): void | |
{ | |
parent::setUp(); | |
} | |
/** | |
* Define environment setup. | |
* | |
* @param Application $app | |
* @return void | |
*/ | |
protected function getEnvironmentSetUp($app) | |
{ | |
// Alter the testing timezone to America/Los_Angeles | |
$app['config']->set('simpletdd.timezone', 'America/Los_Angeles'); | |
} | |
/** | |
* @param Application $app | |
* @return array | |
*/ | |
protected function getPackageProviders($app) | |
{ | |
return ['Jsdecena\SimpleTdd\ServiceProvider']; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment