Skip to content

Commit fb0f6c7

Browse files
Try to fix with Laravel 12 compatibility
1 parent d96f5cc commit fb0f6c7

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

tests/Concerns/Database.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ protected function runMigrations(): void
101101

102102
protected function getTables(SchemaBuilder $builder): array
103103
{
104+
if (method_exists($builder, 'getTableListing')) {
105+
return $builder->getTableListing();
106+
}
107+
104108
return method_exists($builder, 'getAllTables')
105109
? $builder->getAllTables()
106110
: $builder->getTables();

tests/Concerns/Seeders.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,10 @@ protected function fillTable(string $table): void
3434

3535
protected function fillUlidTable(string $table): void
3636
{
37-
$ulids = [];
38-
39-
for ($i = 0; $i < 3; $i++) {
40-
$ulids[$i] = (string) Str::ulid();
41-
42-
if (Str::startsWith(Application::VERSION, '12.')) {
43-
usleep(1100);
44-
}
45-
}
46-
4737
DB::connection($this->source_connection)->table($table)->insert([
48-
['value' => $table . '_1', 'ulid' => $ulids[0]],
49-
['value' => $table . '_2', 'ulid' => $ulids[1]],
50-
['value' => $table . '_3', 'ulid' => $ulids[2]],
38+
['value' => $table . '_1', 'ulid' => (string) Str::ulid()],
39+
['value' => $table . '_2', 'ulid' => (string) Str::ulid()],
40+
['value' => $table . '_3', 'ulid' => (string) Str::ulid()],
5141
]);
5242
}
5343

0 commit comments

Comments
 (0)