Skip to content

Commit 54c905d

Browse files
committed
WIP
1 parent 7364277 commit 54c905d

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

tests/Pest.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@
33
use CodebarAg\Zendesk\Tests\TestCase;
44
use Illuminate\Support\Facades\Event;
55

6-
uses(TestCase::class)->in(__DIR__);
7-
8-
uses()->beforeEach(function () {
9-
Event::fake();
10-
})->in(__DIR__);
11-
12-
uses()->beforeAll(function () {
13-
if (is_dir('Fixtures/Saloon') && count(scandir('Fixtures/Saloon')) > 0) {
14-
config()->set('zendesk.subdomain', 'codebar-zendesk');
15-
config()->set('zendesk.auth.email_address', 'fake-email');
16-
config()->set('zendesk.auth.api_token', 'fake-token');
17-
}
18-
})->in(__DIR__);
6+
uses(TestCase::class)
7+
->beforeEach(function () {
8+
Event::fake();
9+
})
10+
->in(__DIR__);

tests/TestCase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,11 @@ public function getEnvironmentSetUp($app): void
3838
'database' => ':memory:',
3939
'prefix' => '',
4040
]);
41+
42+
if (is_dir(__DIR__ . '/Fixtures/Saloon/') && count(scandir(__DIR__ . '/Fixtures/Saloon')) > 0) {
43+
$app['config']->set('zendesk.subdomain', 'codebar-zendesk');
44+
$app['config']->set('zendesk.auth.email_address', 'fake-email');
45+
$app['config']->set('zendesk.auth.api_token', 'fake-token');
46+
}
4147
}
4248
}

0 commit comments

Comments
 (0)