* 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()
{
$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());
+ }
}