mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-05 15:07:11 +00:00
Fixed test for "dump" function if xdebug>2.2 is loaded
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user