zf-fr / zfr-oauth2-server

PHP library for creating an OAuth 2 server (currently proof of concept)
BSD 3-Clause "New" or "Revised" License
36 stars 13 forks source link

test randomly fails due to time() calculations #49

Closed basz closed 7 years ago

basz commented 8 years ago
There was 1 failure:
1) ZfrOAuth2Test\Server\Grant\PasswordGrantTest::testCanCreateTokenResponse with data set #0 (true)
Failed asserting that 3599 matches expected 3600.
/home/travis/build/zf-fr/zfr-oauth2-server/tests/src/Grant/PasswordGrantTest.php:150

http://www.schmengler-se.de/en/2011/03/php-mocking-built-in-functions-like-time-in-unit-tests/

bakura10 commented 8 years ago

Yeah it sometimes happen. I didn't spend some time to fix that. If that occured, I simply relaunched the tests and it was fixed :p.