#!/usr/bin/env php === X.1.2: Gala-Order Happy Path Integration Tests === Database: globalgala_2026_dev Event ID: 1 Mock Order Count: 50 Cleaning up previous test data... Done. ✓ Test 1: Feature flag enables Gala domain reading ✓ Test 2: GalaReadInterface returns Event data ✗ Test 3: GalaReadInterface returns capacity summary → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'seat_reservations.deleted_at' in 'WHERE' (SQL: select count(*) as aggregate from `seat_reservations` where `event_id` = 1 and `status` in (booked, shadow_sold) and `seat_reservations`.`deleted_at` is null) ✗ Test 4: Create 50 mock orders reading Gala pricing → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tax_rate_snapshot' in 'INSERT INTO' (SQL: insert into `orders` (`event_id`, `session_id`, `order_reference`, `customer_name`, `customer_email`, `customer_phone`, `total_amount`, `status`, `payment_status`, `payment_method`, `payment_mode`, `idempotency_key`, `include_booking_fee`, `include_tax`, `tax_rate_snapshot`, `public_id`, `updated_at`, `created_at`) values (1, X12_TEST_6befe3dc-12b6-4cb7-bdd5-54eb6f21c1bf, X12-BZYCIKNJ, John Doe, customer0@test-x12.example.com, +447700900000, 1450, paid, paid, card, immediate, c2295fbc-3d39-4371-a22a-90d4269c2b08, 1, 1, 0.21, cd7ea003-e48b-45e5-b25a-7c50e6ffff4e, 2026-10-16 03:42:43, 2026-10-16 03:42:43)) ✗ Test 5: Availability calculated correctly (1517 - 50 = 1467) → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'seat_reservations.deleted_at' in 'WHERE' (SQL: select count(*) as aggregate from `seat_reservations` where `event_id` = 1 and `status` in (booked, shadow_sold) and `seat_reservations`.`deleted_at` is null) ✗ Test 6: Payment status fields captured correctly → Count: 0, StatusPaid: 1, PaymentPaid: 1 ✗ Test 7: Order status separate from Gala status → No test orders found - Test 4 may have failed ✗ Test 8: GalaAvailabilityService counts sold seats → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'seat_reservations.deleted_at' in 'WHERE' (SQL: select count(*) as aggregate from `seat_reservations` where `event_id` = 1 and `status` in (booked, shadow_sold) and `seat_reservations`.`deleted_at` is null) === Test Cleanup === Test data cleaned up. === Test Summary === Passed: 2 Failed: 6 Total: 8