<?php

declare(strict_types=1);

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
    protected function setUp(): void
    {
        parent::setUp();

        // Sanctum's EnsureFrontendRequestsAreStateful only starts a session for
        // requests whose Referer/Origin matches sanctum.stateful — real browsers
        // always send one of these from the SPA, the test client sends neither.
        $this->withHeader('Referer', config('app.url'));
    }
}
