public function testPrintDump() { $this->stubVarDumper(); $list = range(1, 10); // First safe test $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, true); $this->assertNull($twig->printDump($list)); // Now test with debug off $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, false); $app['debug'] = false; $this->assertNull($twig->printDump($list)); // Now test with debug enabled $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, false); $this->assertEquals($list, $twig->printDump($list)); }
public function testPrintDump() { $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $handlers['utils'] = $this->getMockHandler('UtilsHandler', 'printDump'); $twig = new TwigExtension($app, $handlers, true); $twig->printDump(null, null); }
public function testPrintDump() { $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, true); $twig->printDump(null, null); }