You are here

public function Twig_Tests_Profiler_ProfileTest::testGetDuration in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php \Twig_Tests_Profiler_ProfileTest::testGetDuration()

File

vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php, line 69

Class

Twig_Tests_Profiler_ProfileTest

Code

public function testGetDuration() {
  $profile = new Twig_Profiler_Profile();
  usleep(1);
  $profile
    ->leave();
  $this
    ->assertTrue($profile
    ->getDuration() > 0, sprintf('Expected duration > 0, got: %f', $profile
    ->getDuration()));
}