public function testPrintBacktrace()
{
$this->stubVarDumper();
// First test with debug off
$app = $this->getApp();
$handlers = $this->getTwigHandlers($app);
$twig = new TwigExtension($app, $handlers, false);
$app['debug'] = false;
$this->assertNull($twig->printBacktrace());
// Safe mode test
$app = $this->getApp();
$handlers = $this->getTwigHandlers($app);
$twig = new TwigExtension($app, $handlers, true);
$this->assertNull($twig->printBacktrace());
// Debug mode
$app = $this->getApp();
$handlers = $this->getTwigHandlers($app);
$twig = new TwigExtension($app, $handlers, false);
$this->assertNotEmpty($twig->printBacktrace());
}