X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FTest%2FApi3DocTrait.php;h=27440f70fa799ffda93ff0363053f0b1773d546e;hb=efeadc2a74a1658e3e9e84368d055b22d796d0da;hp=6b3ad189a2b80f8877ef1241f94b2c85a2256c69;hpb=d7da8786d2929837ce85f3ef945fcb86518d53f5;p=civicrm-core.git diff --git a/Civi/Test/Api3DocTrait.php b/Civi/Test/Api3DocTrait.php index 6b3ad189a2..27440f70fa 100644 --- a/Civi/Test/Api3DocTrait.php +++ b/Civi/Test/Api3DocTrait.php @@ -123,8 +123,10 @@ trait Api3DocTrait { if (!is_dir($civicrm_root . "/api/v3/examples/$entity")) { mkdir($civicrm_root . "/api/v3/examples/$entity"); } - $f = fopen($civicrm_root . "/api/v3/examples/$entity/$exampleName.php", "w+b"); - fwrite($f, $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl')); + $f = fopen($civicrm_root . "/api/v3/examples/$entity/$exampleName.ex.php", "w+b"); + $contents = $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl'); + $contents = \CRM_Core_CodeGen_Util_ArraySyntaxConverter::convert($contents); + fwrite($f, $contents); fclose($f); } }