diff options
-rw-r--r-- | apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php b/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php index a035422087b..d979960f7c2 100644 --- a/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php +++ b/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php @@ -42,17 +42,20 @@ class StatusServiceIntegrationTest extends TestCase { } public function testCustomStatusMessageTimestamp(): void { + $before = time(); $this->service->setCustomMessage( 'test123', '🍕', 'Lunch', null, ); + $after = time(); $status = $this->service->findByUserId('test123'); self::assertSame('Lunch', $status->getCustomMessage()); - self::assertGreaterThanOrEqual(time(), $status->getStatusMessageTimestamp()); + self::assertGreaterThanOrEqual($before, $status->getStatusMessageTimestamp()); + self::assertLessThanOrEqual($after, $status->getStatusMessageTimestamp()); } public function testOnlineStatusKeepsMessageTimestamp(): void { |