Bristol SU Support Package
TestCase.php
Go to the documentation of this file.
1 <?php
2 
4 
13 use Orchestra\Testbench\TestCase as BaseTestCase;
14 
20 class TestCase extends BaseTestCase
21 {
23 
29  public function setUp(): void
30  {
31  parent::setUp();
32  $this->loadMigrationsFrom(realpath(__DIR__.'/../database/migrations'));
33  $this->withFactories(__DIR__.'/../../database/factories');
34  }
35 
44  public function getEnvironmentSetUp($app)
45  {
46  $app['config']->set('database.default', 'testing');
47  $app['config']->set('database.connections.testing', [
48  'driver' => 'sqlite',
49  'database' => ':memory:',
50  'prefix' => '',
51  ]);
52  $app['config']->set('app.key', 'base64:UTyp33UhGolgzCK5CJmT+hNHcA+dJyp3+oINtX+VoPI=');
53  $this->createSdkEnvironment($app);
54  $app->bind(Authentication::class, SessionAuthentication::class);
55  $app->bind(ActivityInstanceResolver::class, LaravelAuthActivityInstanceResolver::class);
56  }
57 
64  protected function getPackageProviders($app)
65  {
66  return [
67  SupportServiceProvider::class,
68  JavaScriptServiceProvider::class,
69  ControlDBServiceProvider::class
70  ];
71  }
72 
73 }