Skip to content

Commit 7920911

Browse files
committed
fix: attempt to fix flickering tests when using postgres
1 parent 4729714 commit 7920911

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/TestCase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Orion\Tests;
44

55
use Illuminate\Contracts\Console\Kernel;
6+
use Illuminate\Database\Eloquent\Builder;
7+
use Illuminate\Database\Eloquent\Model;
68
use Illuminate\Foundation\Testing\RefreshDatabase;
79
use Illuminate\Foundation\Testing\RefreshDatabaseState;
810

@@ -15,6 +17,10 @@ protected function setUp(): void
1517
parent::setUp();
1618

1719
$this->withFactories(__DIR__.'/Fixtures/database/factories');
20+
21+
Model::addGlobalScope(function (Builder $builder) {
22+
$builder->orderBy('id', 'asc');
23+
});
1824
}
1925

2026
/**

0 commit comments

Comments
 (0)