-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestCase.php
More file actions
63 lines (54 loc) · 1.5 KB
/
Copy pathTestCase.php
File metadata and controls
63 lines (54 loc) · 1.5 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace Digitlimit\Githook\Tests;
use Digitlimit\Githook\GithookServiceProvider;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Testing\Concerns\InteractsWithViews;
use Illuminate\Support\Facades\Facade;
use Orchestra\Testbench\TestCase as BaseTestCase;
class TestCase extends BaseTestCase
{
use InteractsWithViews;
/**
* Define environment setup.
*
* @param Application $app
*/
protected function defineEnvironment($app): void
{
// Setup default database to use sqlite :memory:
tap($app['config'], function (Repository $config) {
$config->set('services.slack', [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
],
]);
});
}
protected function getPackageProviders($app): array
{
return [
GithookServiceProvider::class,
];
}
/**
* Override application aliases.
*
* @param Application $app
* @return array<string, class-string<Facade>>
*/
protected function getPackageAliases($app): array
{
return [
];
}
protected function getEnvironmentSetUp($app)
{
// perform environment setup
}
public function packagePath(string $path = ''): string
{
return __DIR__.'/../'.$path;
}
}