* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Illuminate\Foundation\Testing\DatabaseMigrations; abstract class BaseTest extends Orchestra\Testbench\TestCase { use DatabaseMigrations; protected function getEnvironmentSetUp($app) { // Setup default database to use sqlite :memory: $app['config']->set('database.default', 'testbench'); $app['config']->set('database.connections.testbench', [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ]); } protected function loadMigrationsFrom($app) { $this->artisan('migrate', ['--database' => 'testbench']); } protected function getPackageProviders($app) { return [iBrand\Component\Setting\ServiceProvider::class]; } protected function setUp() { parent::setUp(); // TODO: Change the autogenerated stub $this->loadMigrationsFrom(__DIR__.'/database'); } }