$contents = $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl');
$contents = \CRM_Core_CodeGen_Util_ArraySyntaxConverter::convert($contents);
fwrite($f, $contents);
$contents = $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl');
$contents = \CRM_Core_CodeGen_Util_ArraySyntaxConverter::convert($contents);
fwrite($f, $contents);