From: Fabien Potencier Date: Sun, 16 Oct 2011 23:16:34 +0000 (+0200) Subject: added more unit tests X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=a41c6e21d2da5cbd16697af12fcfbc7208e321bd;p=web%2Fkonrad%2Ftwig.git added more unit tests --- diff --git a/test/Twig/Tests/Fixtures/filters/convert_encoding.test b/test/Twig/Tests/Fixtures/filters/convert_encoding.test new file mode 100644 index 0000000..b386d4e --- /dev/null +++ b/test/Twig/Tests/Fixtures/filters/convert_encoding.test @@ -0,0 +1,8 @@ +--TEST-- +"convert_encoding" filter +--TEMPLATE-- +{{ "愛していますか?"|convert_encoding('ISO-2022-JP', 'UTF-8')|convert_encoding('UTF-8', 'ISO-2022-JP') }} +--DATA-- +return array() +--EXPECT-- +愛していますか? diff --git a/test/Twig/Tests/Fixtures/filters/escape.test b/test/Twig/Tests/Fixtures/filters/escape.test new file mode 100644 index 0000000..a606c10 --- /dev/null +++ b/test/Twig/Tests/Fixtures/filters/escape.test @@ -0,0 +1,8 @@ +--TEST-- +"escape" filter +--TEMPLATE-- +{{ "foo
"|e }} +--DATA-- +return array() +--EXPECT-- +foo <br /> diff --git a/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test b/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test new file mode 100644 index 0000000..bba26a0 --- /dev/null +++ b/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test @@ -0,0 +1,8 @@ +--TEST-- +"escape" filter +--TEMPLATE-- +{{ "愛していますか?
"|e }} +--DATA-- +return array() +--EXPECT-- +愛していますか? <br />