File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2323 <file >tests/options.php</file >
2424 </testsuite >
2525 <testsuite name =" helpers" >
26- <file >tests/dotHelper .php</file >
26+ <file >tests/helpers .php</file >
2727 </testsuite >
2828 <testsuite name =" badSyntaxes" >
2929 <file >tests/badSyntaxes.php</file >
Original file line number Diff line number Diff line change 11function ($base ) {
22 foreach (array_slice (func_get_args (), 1 ) as $value ) {
3- $base = $base * $value ;
3+ $base = $base - $value ;
44 }
55
66 return $base ;
Original file line number Diff line number Diff line change @@ -215,4 +215,16 @@ public function testDotObjectHelper()
215215 'a ' => new MagicGetterWithNoIsset (),
216216 )));
217217 }
218+
219+ public function testHelperFile ()
220+ {
221+ $ jsPhpize = new JsPhpize (array (
222+ 'helpers ' => array (
223+ 'plus ' => __DIR__ . '/Plus.h ' ,
224+ ),
225+ 'returnLastStatement ' => true ,
226+ ));
227+
228+ $ this ->assertEquals (6 , $ jsPhpize ->render ('13 + 7 ' ));
229+ }
218230}
You can’t perform that action at this time.
0 commit comments