mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
fixed a warning and added some unit tests
This commit is contained in:
@@ -4,9 +4,13 @@
|
||||
{{ foo is defined ? 'ok' : 'ko' }}
|
||||
{{ bar is defined ? 'ok' : 'ko' }}
|
||||
{{ foobar is not defined ? 'ok' : 'ko' }}
|
||||
{{ nested.foo is defined ? 'ok' : 'ko' }}
|
||||
{{ nested.bar is not defined ? 'ok' : 'ko' }}
|
||||
--DATA--
|
||||
return array('foo' => 'bar', 'bar' => null);
|
||||
return array('foo' => 'bar', 'bar' => null, 'nested' => array('foo' => 'foo'));
|
||||
--EXPECT--
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
ok
|
||||
|
||||
@@ -73,7 +73,7 @@ class Twig_TemplateTest extends Twig_Template
|
||||
{
|
||||
}
|
||||
|
||||
public function getAttribute($object, $item, array $arguments = array(), $type = Twig_Node_Expression_GetAttr::TYPE_ANY)
|
||||
public function getAttribute($object, $item, array $arguments = array(), $type = Twig_Node_Expression_GetAttr::TYPE_ANY, $noStrictCheck = false)
|
||||
{
|
||||
return parent::getAttribute($object, $item, $arguments, $type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user