function TestTime::getRequestTime

Same name in this branch
  1. 11.x core/modules/package_manager/tests/src/Kernel/StageConflictTest.php \Drupal\Tests\package_manager\Kernel\TestTime::getRequestTime()
  2. 11.x core/modules/update/tests/modules/update_test/src/Datetime/TestTime.php \Drupal\update_test\Datetime\TestTime::getRequestTime()
Same name and namespace in other branches
  1. 10 core/modules/update/tests/modules/update_test/src/Datetime/TestTime.php \Drupal\update_test\Datetime\TestTime::getRequestTime()

Overrides Time::getRequestTime

File

core/modules/workspaces/tests/src/Kernel/WorkspacePublisherTest.php, line 179

Class

TestTime
A test-only implementation of the time service.

Namespace

Drupal\Tests\workspaces\Kernel

Code

public function getRequestTime() {
  return parent::getRequestTime() + static::$offset;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.