Security update for Core, with self-updated composer
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Profiler / ProfileTest.php
index f786f06ca05a8252bfb431cbcc2a58bd49c3e943..08db96a90ce538d157f08be8f03f4322c3c837ef 100644 (file)
@@ -9,7 +9,7 @@
  * file that was distributed with this source code.
  */
 
-class Twig_Tests_Profiler_ProfileTest extends PHPUnit_Framework_TestCase
+class Twig_Tests_Profiler_ProfileTest extends \PHPUnit\Framework\TestCase
 {
     public function testConstructor()
     {
@@ -97,4 +97,14 @@ class Twig_Tests_Profiler_ProfileTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($profile1->getType(), $profile3->getType());
         $this->assertEquals($profile1->getName(), $profile3->getName());
     }
+
+    public function testReset()
+    {
+        $profile = new Twig_Profiler_Profile();
+        usleep(1);
+        $profile->leave();
+        $profile->reset();
+
+        $this->assertEquals(0, $profile->getDuration());
+    }
 }