Fixing failing test in Twig_Tests_Node_Expression_FilterTest when mb extension is...
authorMark Story <mark@mark-story.com>
Sat, 24 Jul 2010 16:23:33 +0000 (12:23 -0400)
committerFabien Potencier <fabien.potencier@gmail.com>
Mon, 26 Jul 2010 08:53:19 +0000 (10:53 +0200)
test/Twig/Tests/Node/Expression/FilterTest.php

index 24b21bb..0cdd199 100644 (file)
@@ -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;
     }