Fix unstable time
based PHPUnit tests
#8488
Labels
P1
Medium priority
PHP
QA: Eng
Requires specialized QA by an engineer
Squad 1 (Team S)
Issues for Squad 1
Type: Infrastructure
Engineering infrastructure & tooling
Bug Description
Despite #6758 and this comment a couple of time based tests were missed and remain in the codebase causing instability:
https://github.com/google/site-kit-wp/blob/4f1d3fb446329ff3022fe3085633763cdd02cc94/tests/phpunit/integration/Core/Prompts/REST_Prompts_ControllerTest.php#L79-L91
https://github.com/google/site-kit-wp/blob/4f1d3fb446329ff3022fe3085633763cdd02cc94/tests/phpunit/integration/Core/Prompts/REST_Prompts_ControllerTest.php#L134-L142
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
assertEqualsWithDelta
assertion for time related keys to ensure better test stability when run on CI.Implementation Brief
assertEqualSets
in the tests above to separate uses ofassertEquals
andassertEqualsWithDelta
.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: