File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -279,4 +279,64 @@ public function testWhitespace()
279
279
'<token_html> </token_html> '
280
280
);
281
281
}
282
+
283
+ public function testFunctionCall ()
284
+ {
285
+ $ this ->compare (
286
+ <<<'EOL'
287
+ <?php
288
+ echo functionName();
289
+ EOL
290
+ ,
291
+ <<<'EOL'
292
+ <token_default><?php</token_default>
293
+ <token_keyword>echo </token_keyword><token_default>functionName</token_default><token_keyword>();</token_keyword>
294
+ EOL
295
+ );
296
+ }
297
+
298
+ public function testFQNFunctionCall ()
299
+ {
300
+ $ this ->compare (
301
+ <<<'EOL'
302
+ <?php
303
+ echo \My\Package\functionName();
304
+ EOL
305
+ ,
306
+ <<<'EOL'
307
+ <token_default><?php</token_default>
308
+ <token_keyword>echo \</token_keyword><token_default>My</token_default><token_keyword>\</token_keyword><token_default>Package</token_default><token_keyword>\</token_keyword><token_default>functionName</token_default><token_keyword>();</token_keyword>
309
+ EOL
310
+ );
311
+ }
312
+
313
+ public function testNamespaceRelativeFunctionCall ()
314
+ {
315
+ $ this ->compare (
316
+ <<<'EOL'
317
+ <?php
318
+ echo namespace\functionName();
319
+ EOL
320
+ ,
321
+ <<<'EOL'
322
+ <token_default><?php</token_default>
323
+ <token_keyword>echo namespace\</token_keyword><token_default>functionName</token_default><token_keyword>();</token_keyword>
324
+ EOL
325
+ );
326
+ }
327
+
328
+ public function testQualifiedFunctionCall ()
329
+ {
330
+ $ this ->compare (
331
+ <<<'EOL'
332
+ <?php
333
+ echo Package\functionName();
334
+ EOL
335
+ ,
336
+ <<<'EOL'
337
+ <token_default><?php</token_default>
338
+ <token_keyword>echo </token_keyword><token_default>Package</token_default><token_keyword>\</token_keyword><token_default>functionName</token_default><token_keyword>();</token_keyword>
339
+ EOL
340
+ );
341
+ }
282
342
}
You can’t perform that action at this time.
0 commit comments