MDL-63097 phpunit: decouple user lastping and session start in tests
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 10 Aug 2018 00:20:10 +0000 (02:20 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 10 Aug 2018 00:32:37 +0000 (02:32 +0200)
commit2bf974e7efc752f93fa87d8ee9e20b555c21a911
tree25f660214f5df0f77bcff1f296b560ab3002f2e6
parent6e020b161a1049f459b5861525af46c8a3dcc112
MDL-63097 phpunit: decouple user lastping and session start in tests

Previously the test was assuming that the user last ping, when
accessing to a chat should match the first (enter) system message
sent to the chat. And that's ok 99% of times but, if seconds advance
between the creation of the chat_users record and the chat_messages
one, then they don't match.

So now, the assumption is not used anymore and the expectation
is the timestamp of that first (enter) system message, explicitly.
mod/chat/tests/lib_test.php