From: Mark Story Date: Sat, 24 Jul 2010 16:23:33 +0000 (-0400) Subject: Fixing failing test in Twig_Tests_Node_Expression_FilterTest when mb extension is... X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c83bdefcb6053a7d0c078ff358cc9944b87010a8;p=web%2Fkonrad%2Ftwig.git Fixing failing test in Twig_Tests_Node_Expression_FilterTest when mb extension is not installed. Fixes #93 --- diff --git a/test/Twig/Tests/Node/Expression/FilterTest.php b/test/Twig/Tests/Node/Expression/FilterTest.php index 24b21bb..0cdd199 100644 --- a/test/Twig/Tests/Node/Expression/FilterTest.php +++ b/test/Twig/Tests/Node/Expression/FilterTest.php @@ -163,7 +163,11 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Tests_Node_TestCase ), array(), 0); $node = new Twig_Node_Expression_Filter($expr, $filters, 0); - $tests[] = array($node, 'twig_lower_filter($this->env, twig_upper_filter($this->env, "foo"), "bar", "foobar")'); + if (function_exists('mb_get_info')) { + $tests[] = array($node, 'twig_lower_filter($this->env, twig_upper_filter($this->env, "foo"), "bar", "foobar")'); + } else { + $tests[] = array($node, 'strtolower(strtoupper("foo"), "bar", "foobar")'); + } return $tests; }