TenantAtlas/tests/Feature/System/Spec113/SystemSessionIsolationTest.php

18 lines
420 B
PHP

<?php
declare(strict_types=1);
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Str;
uses(RefreshDatabase::class);
it('sets a dedicated session cookie name for /system', function () {
$expectedCookieName = Str::slug((string) config('app.name', 'laravel')).'-system-session';
$this->get('/system/login')
->assertSuccessful()
->assertCookie($expectedCookieName);
});