$pragmas, 'helpers' => $helpers, )); $this->assertEquals($expect, $mustache->render($tpl, $data)); } public function pragmaData() { $helpers = array( 'longdate' => function (\DateTime $value) { return $value->format('Y-m-d h:m:s'); } ); $data = array( 'date' => new DateTime('1/1/2000', new DateTimeZone('UTC')), ); $tpl = '{{ date | longdate }}'; return array( array(array(Mustache_Engine::PRAGMA_FILTERS), $helpers, $data, $tpl, '2000-01-01 12:01:00'), array(array(), $helpers, $data, $tpl, '' ), ); } }