Fix Event & EventType resource issues and apply formatting

- Fix EventType deletion error handling (constraint violations)
- Fix Event update error (package_id column missing)
- Fix Event Type dropdown options (JSON display issue)
- Fix EventPackagesRelationManager query error
- Add missing translations for deletion errors
- Apply Pint formatting
This commit is contained in:
Codex Agent
2026-01-21 10:34:06 +01:00
parent 198fbf6751
commit fa33e7cbcf
112 changed files with 334 additions and 280 deletions

View File

@@ -2,11 +2,11 @@
namespace Tests\Feature\Api;
use App\Mail\GiftVoucherIssued;
use App\Models\GiftVoucher;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Mail;
use Tests\TestCase;
use App\Mail\GiftVoucherIssued;
class GiftVoucherResendTest extends TestCase
{

View File

@@ -142,5 +142,4 @@ class CheckEventPackagesCommandTest extends TestCase
Carbon::setTestNow();
}
}
}

View File

@@ -24,7 +24,8 @@ class ProcessPhotoSecurityScanTest extends TestCase
{
[$photo, $asset] = $this->seedPhotoWithAsset();
$scanner = new class extends PhotoSecurityScanner {
$scanner = new class extends PhotoSecurityScanner
{
public function scan(string $disk, ?string $relativePath): array
{
return ['status' => 'clean', 'message' => 'ok'];
@@ -49,7 +50,8 @@ class ProcessPhotoSecurityScanTest extends TestCase
{
[$photo] = $this->seedPhotoWithAsset();
$scanner = new class extends PhotoSecurityScanner {
$scanner = new class extends PhotoSecurityScanner
{
public function scan(string $disk, ?string $relativePath): array
{
return ['status' => 'skipped', 'message' => 'disabled'];
@@ -73,7 +75,8 @@ class ProcessPhotoSecurityScanTest extends TestCase
{
[$photo, $asset] = $this->seedPhotoWithAsset();
$scanner = new class extends PhotoSecurityScanner {
$scanner = new class extends PhotoSecurityScanner
{
public function scan(string $disk, ?string $relativePath): array
{
return ['status' => 'infected', 'message' => 'bad'];

View File

@@ -2,13 +2,14 @@
namespace Tests\Feature\Marketing;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Inertia\Testing\AssertableInertia as Assert;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class MarketingLocaleRoutingTest extends TestCase
{
use RefreshDatabase;
public function test_home_route_accepts_german_locale_prefix(): void
{
$response = $this->get('/de');

View File

@@ -11,7 +11,7 @@ class PackageSeederTest extends TestCase
{
use RefreshDatabase;
public function testStarterPackageHasSingleEventQuota(): void
public function test_starter_package_has_single_event_quota(): void
{
$this->seed(PackageSeeder::class);

View File

@@ -17,7 +17,7 @@ class MockTenantMiddleware
$request->attributes->set('tenant_id', $tenant->id);
$request->merge(['tenant_id' => $tenant->id]);
}
return $next($request);
}
}
}

View File

@@ -64,15 +64,14 @@ KEY;
mkdir($storagePath, 0755, true);
}
$publicKeyPath = $storagePath . DIRECTORY_SEPARATOR . 'public.key';
$publicKeyPath = $storagePath.DIRECTORY_SEPARATOR.'public.key';
if (! file_exists($publicKeyPath)) {
file_put_contents($publicKeyPath, self::JWT_PUBLIC_KEY);
}
$privateKeyPath = $storagePath . DIRECTORY_SEPARATOR . 'private.key';
$privateKeyPath = $storagePath.DIRECTORY_SEPARATOR.'private.key';
if (! file_exists($privateKeyPath)) {
file_put_contents($privateKeyPath, self::JWT_PRIVATE_KEY);
}
}
}

View File

@@ -50,7 +50,7 @@ class AdminDashboardWidgetsTest extends TestCase
'created_at' => now()->subMonth(),
]);
$widget = new RevenueTrendWidget();
$widget = new RevenueTrendWidget;
$data = $this->invokeProtectedMethod($widget, 'getData');
$this->assertArrayHasKey('datasets', $data);
@@ -68,8 +68,6 @@ class AdminDashboardWidgetsTest extends TestCase
/**
* @template T
*
* @param object $object
* @param string $method
* @return mixed
*/
private function invokeProtectedMethod(object $object, string $method)