function TimeTest::testGetCurrentMicroTime

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Datetime/TimeTest.php \Drupal\Tests\Component\Datetime\TimeTest::testGetCurrentMicroTime()
  2. 8.9.x core/tests/Drupal/Tests/Component/Datetime/TimeTest.php \Drupal\Tests\Component\Datetime\TimeTest::testGetCurrentMicroTime()
  3. 11.x core/tests/Drupal/Tests/Component/Datetime/TimeTest.php \Drupal\Tests\Component\Datetime\TimeTest::testGetCurrentMicroTime()

Tests the getCurrentMicroTime method.

@covers ::getCurrentMicroTime

File

core/tests/Drupal/Tests/Component/Datetime/TimeTest.php, line 123

Class

TimeTest
@coversDefaultClass \Drupal\Component\Datetime\Time @group Datetime

Namespace

Drupal\Tests\Component\Datetime

Code

public function testGetCurrentMicroTime() : void {
    $expected = 1234567.89;
    $this->assertEquals($expected, $this->time
        ->getCurrentMicroTime());
}

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