From 9316775ccb655620023d75e5c04dc8faddea2014 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Tue, 1 May 2012 10:19:03 -0700 Subject: [PATCH] Fix test failures in PHP 5.2.x --- test/Mustache/Test/CompilerTest.php | 2 +- test/Mustache/Test/Functional/HigherOrderSectionsTest.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/Mustache/Test/CompilerTest.php b/test/Mustache/Test/CompilerTest.php index bd04a1e..b508b02 100644 --- a/test/Mustache/Test/CompilerTest.php +++ b/test/Mustache/Test/CompilerTest.php @@ -12,7 +12,7 @@ /** * @group unit */ -class Mustache_Test_CompilerTest extends \PHPUnit_Framework_TestCase { +class Mustache_Test_CompilerTest extends PHPUnit_Framework_TestCase { /** * @dataProvider getCompileValues diff --git a/test/Mustache/Test/Functional/HigherOrderSectionsTest.php b/test/Mustache/Test/Functional/HigherOrderSectionsTest.php index 8743551..eef60fd 100644 --- a/test/Mustache/Test/Functional/HigherOrderSectionsTest.php +++ b/test/Mustache/Test/Functional/HigherOrderSectionsTest.php @@ -22,6 +22,11 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends PHPUnit_Framework } public function testAnonymousFunctionSectionCallback() { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + $this->markTestSkipped('Unable to test anonymous function section callbacks in PHP < 5.3'); + return; + } + $tpl = $this->mustache->loadTemplate('{{#wrapper}}{{name}}{{/wrapper}}'); $foo = new Mustache_Test_Functional_Foo;