generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTestCase.php
38 lines (30 loc) · 957 Bytes
/
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
<?php
namespace AuroraWebSoftware\AAuth\Tests;
use AuroraWebSoftware\AAuth\AAuthServiceProvider;
use Illuminate\Database\Eloquent\Factories\Factory;
use Orchestra\Testbench\TestCase as Orchestra;
class TestCase extends Orchestra
{
protected function setUp(): void
{
parent::setUp();
Factory::guessFactoryNamesUsing(
fn (string $modelName) => 'AuroraWebSoftware\\AAuth\\Database\\Factories\\'.class_basename($modelName).'Factory'
);
}
protected function getPackageProviders($app)
{
return [
AAuthServiceProvider::class,
];
}
public function getEnvironmentSetUp($app)
{
// for GitHub tests wirh mysql
// config()->set('database.default', 'mysql');
// for local tests with sqlite
config()->set('database.default', 'testing');
// for local tests with mysql
config()->set('database.default', 'mysql');
}
}