diff --git a/test/Twig/Tests/Fixtures/functions/dump.test b/test/Twig/Tests/Fixtures/functions/dump.test index cf6acf8d5..371a58775 100644 --- a/test/Twig/Tests/Fixtures/functions/dump.test +++ b/test/Twig/Tests/Fixtures/functions/dump.test @@ -1,7 +1,6 @@ --TEST-- "dump" function --TEMPLATE-- -{{ dump() }} {{ dump('foo') }} {{ dump('foo', 'bar') }} --DATA-- @@ -9,15 +8,6 @@ return array('foo' => 'foo', 'bar' => 'bar') --CONFIG-- return array('debug' => true, 'autoescape' => false); --EXPECT-- -array(3) { - ["foo"]=> - string(3) "foo" - ["bar"]=> - string(3) "bar" - ["global"]=> - string(6) "global" -} - string(3) "foo" string(3) "foo" diff --git a/test/Twig/Tests/Fixtures/functions/dump_array.test b/test/Twig/Tests/Fixtures/functions/dump_array.test new file mode 100644 index 000000000..889b7a922 --- /dev/null +++ b/test/Twig/Tests/Fixtures/functions/dump_array.test @@ -0,0 +1,19 @@ +--TEST-- +"dump" function, xdebug is not loaded or xdebug <2.2-dev is loaded +--CONDITION-- +!extension_loaded('xdebug') || (($r = new ReflectionExtension('xdebug')) && version_compare($r->getVersion(), '2.2-dev', '<')) +--TEMPLATE-- +{{ dump() }} +--DATA-- +return array('foo' => 'foo', 'bar' => 'bar') +--CONFIG-- +return array('debug' => true, 'autoescape' => false); +--EXPECT-- +array(3) { + ["foo"]=> + string(3) "foo" + ["bar"]=> + string(3) "bar" + ["global"]=> + string(6) "global" +}