@@ -23,7 +23,7 @@ public function testPhpFunctionsExtractor()
2323 $ code = file_get_contents ($ file );
2424 $ functions = $ scanner ->scan ($ code , $ file );
2525
26- $ this ->assertCount (11 , $ functions );
26+ $ this ->assertCount (12 , $ functions );
2727
2828 //fn1
2929 $ function = array_shift ($ functions );
@@ -81,7 +81,7 @@ public function testPhpFunctionsExtractor()
8181 $ function = array_shift ($ functions );
8282 $ this ->assertSame ('fn6 ' , $ function ->getName ());
8383 $ this ->assertSame (1 , $ function ->countArguments ());
84- $ this ->assertSame ([null ], $ function ->getArguments ());
84+ $ this ->assertSame ([[ ' arr ' ] ], $ function ->getArguments ());
8585 $ this ->assertSame (7 , $ function ->getLine ());
8686 $ this ->assertSame (7 , $ function ->getLastLine ());
8787 $ this ->assertSame ($ file , $ function ->getFilename ());
@@ -151,6 +151,20 @@ public function testPhpFunctionsExtractor()
151151 $ this ->assertSame ("Related comment \nnumber one " , array_shift ($ comments ));
152152 $ this ->assertSame ('Related comment 2 ' , array_shift ($ comments ));
153153 $ this ->assertSame ('ALLOW: Related comment 3 ' , array_shift ($ comments ));
154+
155+ //fn13
156+ $ function = array_shift ($ functions );
157+ $ this ->assertSame ('fn13 ' , $ function ->getName ());
158+ $ this ->assertSame (3 , $ function ->countArguments ());
159+ $ this ->assertSame ([
160+ 'Translatable string ' ,
161+ '' ,
162+ ['context ' => 'Context string ' , 'foo ' ],
163+ ], $ function ->getArguments ());
164+ $ this ->assertSame (30 , $ function ->getLine ());
165+ $ this ->assertSame (30 , $ function ->getLastLine ());
166+ $ this ->assertSame ($ file , $ function ->getFilename ());
167+ $ this ->assertCount (0 , $ function ->getComments ());
154168 }
155169
156170 public function _testPhpFunctionsScannerWithDisabledComments ()
0 commit comments