Skip to content

Instantly share code, notes, and snippets.

@jsdecena
Last active October 9, 2021 04:01
Show Gist options
  • Save jsdecena/d8885d9722ea6c1e359b668206e8167d to your computer and use it in GitHub Desktop.
Save jsdecena/d8885d9722ea6c1e359b668206e8167d to your computer and use it in GitHub Desktop.
Simple TDD Base Testcase
<?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