Segregate 5.3+ tests, exclude them from phpunit config.

This commit is contained in:
Justin Hileman
2012-05-01 14:03:11 -07:00
parent 9316775ccb
commit d1912038f3
8 changed files with 215 additions and 96 deletions
@@ -110,9 +110,7 @@ class Mustache_Test_Functional_MustacheInjectionTest extends PHPUnit_Framework_T
$tpl = $this->mustache->loadTemplate('{{ a }}');
$data = array(
'a' => function() {
return '{{ b }}';
},
'a' => array($this, 'lambdaInterpolationCallback'),
'b' => '{{ c }}',
'c' => 'FAIL'
);
@@ -120,17 +118,23 @@ class Mustache_Test_Functional_MustacheInjectionTest extends PHPUnit_Framework_T
$this->assertEquals('{{ c }}', $tpl->render($data));
}
public static function lambdaInterpolationCallback() {
return '{{ b }}';
}
public function testLambdaSectionInjection() {
$tpl = $this->mustache->loadTemplate('{{# a }}b{{/ a }}');
$data = array(
'a' => function ($text) {
return '{{ ' . $text . ' }}';
},
'a' => array($this, 'lambdaSectionCallback'),
'b' => '{{ c }}',
'c' => 'FAIL'
);
$this->assertEquals('{{ c }}', $tpl->render($data));
}
public static function lambdaSectionCallback($text) {
return '{{ ' . $text . ' }}';
}
}