-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
TestCase.php
45 lines (38 loc) · 1.2 KB
/
TestCase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace JustSteveKing\CompaniesHouseLaravel\Tests;
use JustSteveKing\CompaniesHouseLaravel\CompaniesHouseLaravelServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;
class TestCase extends Orchestra
{
public function setUp(): void
{
parent::setUp();
try {
$env = parse_ini_file(__DIR__ . '/../.env.ci');
if (isset($env['COMPANIES_HOUSE_KEY'])) {
$this->app['config']->set('companies-house-laravel.api.key', $env['COMPANIES_HOUSE_KEY']);
}
if (isset($env['COMPANIES_HOUSE_URL'])) {
$this->app['config']->set('companies-house-laravel.api.url', $env['COMPANIES_HOUSE_URL']);
}
} catch (\Exception $e) {
//
}
}
protected function getPackageProviders($app)
{
return [
CompaniesHouseLaravelServiceProvider::class,
];
}
public function getEnvironmentSetUp($app)
{
// $app['config']->set('database.default', 'sqlite');
// $app['config']->set('database.connections.sqlite', [
// 'driver' => 'sqlite',
// 'database' => ':memory:',
// 'prefix' => '',
// ]);
//
}
}