Yaffs site version 1.1
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Fixtures / filters / replace_invalid_arg.test
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test
new file mode 100644 (file)
index 0000000..2143a86
--- /dev/null
@@ -0,0 +1,8 @@
+--TEST--
+Exception for invalid argument type in replace call
+--TEMPLATE--
+{{ 'test %foo%'|replace(stdClass) }}
+--DATA--
+return array('stdClass' => new stdClass())
+--EXCEPTION--
+Twig_Error_Runtime: The "replace" filter expects an array or "Traversable" as replace values, got "stdClass" in "index.twig" at line 2.