|
4 | 4 |
|
5 | 5 | use Illuminate\Support\Facades\Route; |
6 | 6 |
|
7 | | -it('can visit subdomain routes with browser testing', function (): void { |
| 7 | +it('can visit non-subdomain routes with subdomain host browser testing', function (): void { |
8 | 8 | Route::get('/app-test', fn (): string => ' |
9 | 9 | <html> |
10 | | - <head><title>App Subdomain</title></head> |
| 10 | + <head><title>Non Subdomain</title></head> |
11 | 11 | <body> |
12 | | - <h1>Welcome to App Subdomain</h1> |
13 | | - <div id="content">This is the app subdomain content</div> |
| 12 | + <h1>Welcome to NON Subdomain</h1> |
| 13 | + <div id="content">This is the non subdomain content</div> |
14 | 14 | </body> |
15 | 15 | </html> |
16 | 16 | '); |
17 | 17 |
|
18 | 18 | pest()->browser()->withHost('app.localhost'); |
19 | 19 |
|
20 | 20 | visit('/app-test') |
21 | | - ->assertSee('Welcome to App Subdomain') |
22 | | - ->assertSeeIn('#content', 'This is the app subdomain content') |
23 | | - ->assertTitle('App Subdomain'); |
| 21 | + ->assertSee('Welcome to NON Subdomain') |
| 22 | + ->assertSeeIn('#content', 'This is the non subdomain content') |
| 23 | + ->assertTitle('Non Subdomain'); |
24 | 24 | }); |
25 | 25 |
|
26 | | -it('works with Laravel Sail style subdomains', function (): void { |
| 26 | +it('works with Laravel subdomain style', function (): void { |
27 | 27 | // Simulate Laravel Sail subdomain routing pattern |
28 | 28 | Route::domain('{subdomain}.localhost')->group(function (): void { |
29 | 29 | Route::get('/api/health', fn (): array => [ |
|
0 commit comments