You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: browser-testing.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,35 @@ $page = visit('/')
205
205
->geolocation(39.399872, -8.224454);
206
206
```
207
207
208
+
### Configuring Locale
209
+
210
+
You can set the locale for your test requests using the `withLocale` method. This is particularly useful for testing multilingual applications.
211
+
212
+
```php
213
+
$page = visit('/')->withLocale('fr-FR');
214
+
215
+
$page->assertSee('Bienvenue');
216
+
```
217
+
### Configuring Timezone
218
+
219
+
You can set the timezone for your test requests using the `withTimezone` method. This is useful for testing date and time displays in different time zones.
You can set the User-Agent header for your test requests using the `withUserAgent` method. This is useful for testing how your application responds to different types of clients, such as mobile browsers or bots.
0 commit comments