Handle broken pipes
This commit is contained in:
@@ -50,4 +50,26 @@ class Mustache_Test_FiveThree_Functional_FiltersTest extends PHPUnit_Framework_T
|
||||
|
||||
$this->assertEquals('[[2000-01-01 12:01:00]]', $tpl->render($foo));
|
||||
}
|
||||
|
||||
public function testBrokenPipe() {
|
||||
$tpl = $this->mustache->loadTemplate('{{% FILTERS }}{{ foo | bar | baz }}');
|
||||
$this->assertEquals('', $tpl->render(array(
|
||||
'foo' => 'FOO',
|
||||
)));
|
||||
|
||||
$this->assertEquals('', $tpl->render(array(
|
||||
'foo' => 'FOO',
|
||||
'bar' => function($value) { return 'BAR'; },
|
||||
)));
|
||||
|
||||
$this->assertEquals('', $tpl->render(array(
|
||||
'foo' => 'FOO',
|
||||
'baz' => function($value) { return 'BAZ'; },
|
||||
)));
|
||||
|
||||
$this->assertEquals('', $tpl->render(array(
|
||||
'bar' => function($value) { return 'BAR'; },
|
||||
'baz' => function($value) { return 'BAZ'; },
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user