From: Martin HasoĊˆ Date: Thu, 16 Feb 2012 09:55:45 +0000 (+0100) Subject: Fixed test for "dump" function if xdebug>2.2 is loaded X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=623fac04bebaaa02c672def35dad6ae90280e6cb;p=web%2Fkonrad%2Ftwig.git Fixed test for "dump" function if xdebug>2.2 is loaded --- diff --git a/test/Twig/Tests/Fixtures/functions/dump.test b/test/Twig/Tests/Fixtures/functions/dump.test index cf6acf8..371a587 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 0000000..889b7a9 --- /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" +}