-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Describe the Bug
Since v25.11 and the Introduction of the server arguments APP_TIMEZONE and APP_DISPLAY_TIMEZONE in phpunit.xml, tests fail if you have set the APP_TIMEZONE in the .env file to a different timezone. This occurs due to the seeder using the timezone set in .env and the tests using the timezone set in phpunit.xml. We found this bug when we updated and ran the tests localy, as we use Europe/Zurich as our APP_TIMEZONE.
Steps to Reproduce
- Change the
APP_TIMEZONEin.envto something likeEurope/ZurichorAntarctica/Vostok - Run the database seeder with
composer refresh-test-database - Run the tests
composer test
Expected Behaviour
Expected would be that the test-database seeder uses the APP_TIMEZONE of the phpunit.xml
Failing tests
AuditLogTest
- test_shows_activity
PageDraftTest
- test_alert_message_shows_if_someone_else_editing
- test_draft_save_shows_alert_if_draft_edit_started_by_someone_else
PageTest
- test_recently_updated_pages_view
- test_recently_updated_pages_view_shows_parent_chain
- test_recently_updated_pages_view_does_not_show_parent_if_not_visible
- test_recently_updated_pages_on_home
UserApiTokenTest
- test_create_api_token
- test_user_manage_can_delete_token_without_api_permission_themselves
Screenshots or Additional Context
No response
Browser Details
No response
Exact BookStack Version
v25.11