printBacktrace() public method

See also: Bolt\Twig\Handler\UtilsHandler::printBacktrace()
public printBacktrace ( $depth = 15 )
Example #1
0
 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());
 }
Example #2
0
 public function testPrintBacktrace()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $handlers['utils'] = $this->getMockHandler('UtilsHandler', 'printBacktrace');
     $twig = new TwigExtension($app, $handlers, true);
     $twig->printBacktrace(null, null);
 }