Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Dec 15, 2023
1 parent 0acbdb0 commit 5fcff3f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/Concerns/Seeders.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function fillTables(): void
}

if ($this->hasUuid()) {
$this->fillUlidTable($this->table_uuid);
$this->fillUuidTable($this->table_uuid);
}
}

Expand All @@ -31,21 +31,21 @@ protected function fillTable(string $table): void
]);
}

protected function fillUuidTable(string $table): void
protected function fillUlidTable(string $table): void
{
DB::connection($this->source_connection)->table($table)->insert([
['value' => $table . '_1', 'uuid' => Str::uuid()->toString()],
['value' => $table . '_2', 'uuid' => Str::uuid()->toString()],
['value' => $table . '_3', 'uuid' => Str::uuid()->toString()],
['value' => $table . '_1', 'ulid' => (string) Str::ulid()],
['value' => $table . '_2', 'ulid' => (string) Str::ulid()],
['value' => $table . '_3', 'ulid' => (string) Str::ulid()],
]);
}

protected function fillUlidTable(string $table): void
protected function fillUuidTable(string $table): void
{
DB::connection($this->source_connection)->table($table)->insert([
['value' => $table . '_1', 'ulid' => (string) Str::ulid()],
['value' => $table . '_2', 'ulid' => (string) Str::ulid()],
['value' => $table . '_3', 'ulid' => (string) Str::ulid()],
['value' => $table . '_1', 'uuid' => Str::uuid()->toString()],
['value' => $table . '_2', 'uuid' => Str::uuid()->toString()],
['value' => $table . '_3', 'uuid' => Str::uuid()->toString()],
]);
}
}

0 comments on commit 5fcff3f

Please sign in to comment.