<?php
namespace Pharaonic\Laravel\Executor\Tests;
use Illuminate\Support\Facades\File;
use Orchestra\Testbench\TestCase as OrchestraTestCase;
use Pharaonic\Laravel\Executor\ExecutorServiceProvider;
class TestCase extends OrchestraTestCase
{
public function setUp(): void
{
parent::setUp();
File::deleteDirectory(base_path('executors'));
}
/**
* add the package provider
*
* @param $app
* @return array
*/
protected function getPackageProviders($app)
{
return [ExecutorServiceProvider::class];
}
/**
* Define environment setup.
*
* @param \Illuminate\Foundation\Application $app
* @return void
*/
protected function getEnvironmentSetUp($app)
{
$app['config']->set('database.default', 'testbench');
$app['config']->set('database.connections.testbench', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
}
}
|