fixed tests

This commit is contained in:
Fabien Potencier
2017-05-11 13:24:58 -07:00
parent 537db199c2
commit f4adaef9f1
2 changed files with 9 additions and 16 deletions
@@ -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