mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 01:46:37 +00:00
fixed tests
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
"length" filter
|
||||
--TEMPLATE--
|
||||
{{ null|length }}
|
||||
{{ magic|length }}
|
||||
{{ non_countable|length }}
|
||||
--DATA--
|
||||
return array(
|
||||
'null' => null, /* triggers deprecation error */
|
||||
'magic' => new MagicCallStub(), /* used to assert we do *not* call __call, also triggers deprecation */
|
||||
'non_countable' => new \StdClass(), /* triggers deprecation error */
|
||||
);
|
||||
--EXPECT--
|
||||
0
|
||||
1
|
||||
1
|
||||
@@ -6,6 +6,9 @@
|
||||
{{ number|length }}
|
||||
{{ to_string_able|length }}
|
||||
{{ countable|length }}
|
||||
{{ null|length }}
|
||||
{{ magic|length }}
|
||||
{{ non_countable|length }}
|
||||
--DATA--
|
||||
return array(
|
||||
'array' => array(1, 4),
|
||||
@@ -13,6 +16,9 @@ return array(
|
||||
'number' => 1000,
|
||||
'to_string_able' => new ToStringStub('foobar'),
|
||||
'countable' => new CountableStub(42), /* also asserts we do *not* call __toString() */
|
||||
'null' => null,
|
||||
'magic' => new MagicCallStub(), /* used to assert we do *not* call __call */
|
||||
'non_countable' => new \StdClass(),
|
||||
);
|
||||
--EXPECT--
|
||||
2
|
||||
@@ -20,3 +26,6 @@ return array(
|
||||
4
|
||||
6
|
||||
42
|
||||
0
|
||||
1
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user