orchestral / testbench

Laravel Testing Helper for Packages Development
https://packages.tools/testbench
MIT License
2.11k stars 136 forks source link

`defineEnvironment` fails to define `app.timezone` #414

Closed devajmeireles closed 2 months ago

devajmeireles commented 2 months ago

Description:

I'm working on TallStackUI V2 - rewriting some tests and improving our test suite with new methods.

Today, I started working on the Date component and when I tried to set the timezone to America/São_Paulo using defineEnvironment I'm having problems. It doesn't seem to work. I can only edit the timezone via getApplicationTimezone. Should the timezone only be set using getApplicationTimezone?

I'm questioning this because the docs says: "You can also easily override the application's default timezone" - this makes it seem like there is another way.

CleanShot 2024-08-25 at 22 38 45

Result: CleanShot 2024-08-25 at 22 45 30

Steps To Reproduce:

Try to set the app.timezone via defineEnvironment and check if it will be applied.