PHPUnit's Text_Template support for PHPTransformers.
Via Composer
$ composer require phptransformers/text-template
$engine = new TextTemplateTransformer();
echo $engine->render('Hello, {name}!', array('name' => 'phptransformers'));
$engine = new TextTemplateTransformer(array(
'open-delimiter' => '{', // Default to '{' (Text_Template default)
'close-delimiter' => '}' // Default to '}' (Text_Template default)
));
// ...
$textTemplate = new \Text_Template();
$engine = new TextTemplateTransformer(array(
'text-template' => $textTemplate // All others options are ignored
));
$ composer test
The MIT License (MIT). Please see License File for more information.