Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Fix random failure in OgMembershipTest::testGetSetCreatedTime(). #503

Merged
merged 1 commit into from
May 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/src/Kernel/Entity/OgMembershipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ public function testGetGroupIdOnNewMembership() {
public function testGetSetCreatedTime() {
// When creating a brand new membership the request time should be set as
// the creation time.
$expected_time = $this->container->get('datetime.time')->getRequestTime();
// @todo Replace this with \Drupal::time()->getRequestTime() in Drupal 9.
$expected_time = (int) $_SERVER['REQUEST_TIME'];
$membership = OgMembership::create();
$this->assertEquals($expected_time, $membership->getCreatedTime());

Expand Down