Skip to content

Commit 27c2db6

Browse files
author
Given Ncube
committed
fix: ci issues
1 parent 264fd20 commit 27c2db6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/TestCase.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
use FlixtechsLabs\LaravelAuthorizer\LaravelAuthorizerServiceProvider;
66
use Illuminate\Database\Eloquent\Factories\Factory;
7+
use Illuminate\Foundation\Testing\RefreshDatabase;
78
use Illuminate\Support\Facades\File;
89
use Orchestra\Testbench\TestCase as Orchestra;
910
use Spatie\Permission\PermissionServiceProvider;
1011

1112
class TestCase extends Orchestra
1213
{
14+
use RefreshDatabase;
1315
protected function setUp(): void
1416
{
1517
parent::setUp();
@@ -18,6 +20,8 @@ protected function setUp(): void
1820
File::cleanDirectory(app_path('Models'));
1921
File::cleanDirectory(app_path('Policies'));
2022
File::deleteDirectory(app_path('Policies'));
23+
File::cleanDirectory(database_path('migrations'));
24+
File::delete(config_path('permission.php'));
2125
});
2226

2327
Factory::guessFactoryNamesUsing(
@@ -55,9 +59,11 @@ public function defineDatabaseMigrations()
5559
'--provider' => PermissionServiceProvider::class,
5660
])->run();
5761

58-
$this->loadLaravelMigrations();
62+
// $this->loadLaravelMigrations();
5963

60-
$this->artisan('migrate:fresh')->run();
64+
//$this->loadMigrationsFrom(database_path('migrations'));
65+
66+
// $this->artisan('migrate:fresh')->run();
6167

6268
$this->beforeApplicationDestroyed(function () {
6369
$this->artisan('migrate:rollback')->run();

0 commit comments

Comments
 (0)