MVP 1.0 (ohne Shop) #1

Merged
Lars merged 149 commits from develop into main 2026-11-20 21:58:42 +01:00
2 changed files with 22 additions and 3 deletions
Showing only changes of commit 8d0a0b8cc6 - Show all commits

No files matched your search

+21 -3
View File
@@ -10,9 +10,12 @@
use App\Domain\Catalog\Offer;
use App\Domain\Catalog\OfferService;
use App\Domain\Entitlement\GrantIssuer;
use App\Domain\Identity\AccountStatus;
use App\Domain\Identity\Party;
use App\Domain\Identity\PartyType;
use App\Domain\Identity\Profile;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
class SeedLibraryReview extends Command
{
@@ -105,11 +108,26 @@ private function ensureTrainer(): void
$trainer = User::query()->where('email', 'trainer-pruefung@example.test')->first();
if ($trainer === null) {
$trainer = User::factory()->create([
$party = Party::query()->create([
'type' => PartyType::Person,
'display_name' => 'Trainer Prüfung',
]);
Profile::query()->create([
'party_id' => $party->id,
'display_name' => 'Trainer Prüfung',
'visibility' => ['display_name' => 'private'],
]);
$trainer = new User;
$trainer->forceFill([
'party_id' => $party->id,
'name' => 'Trainer Prüfung',
'email' => 'trainer-pruefung@example.test',
'password' => Hash::make('Kursraum-Pruefung'),
'password' => 'Kursraum-Pruefung',
'status' => AccountStatus::Aktiv,
'confirmed_adult_at' => now(),
'email_verified_at' => now(),
]);
$trainer->save();
}
$offer = Offer::query()->where('name', 'Prüfprogramm Abstand')->first();
+1
View File
@@ -72,5 +72,6 @@ public function test_review_fixture_can_be_repeated(): void
$this->artisan('library:review-fixture', ['--actor' => $actor->id])->assertSuccessful();
$this->assertSame(1, Composition::query()->where('designation', 'Prüfprogramm Abstand')->count());
$this->assertNotNull(User::query()->where('email', 'trainer-pruefung@example.test')->first());
}
}