File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
typo3-cms/src/test/java/com/cedricziel/idea/typo3/util Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .cedricziel .idea .typo3 .util ;
2+
3+ import com .cedricziel .idea .typo3 .AbstractTestCase ;
4+ import com .jetbrains .php .lang .psi .PhpPsiElementFactory ;
5+ import com .jetbrains .php .lang .psi .elements .MethodReference ;
6+
7+ public class PhpTypeProviderUtilTest extends AbstractTestCase {
8+ public void testSignaturesAreProvided () {
9+ MethodReference methodReference = PhpPsiElementFactory .createMethodReference (
10+ getProject (),
11+ "<?php\n " +
12+ "use App\\ Foo\\ Bar\\ Foo;\n " +
13+ "GeneralUtility::makeInstance(Foo::class);"
14+ );
15+ String referenceSignatureByFirstParameter = PhpTypeProviderUtil .getReferenceSignatureByFirstParameter (methodReference , '%' );
16+
17+ assertEquals ("#M#C\\ GeneralUtility.makeInstance%#K#C\\ App\\ Foo\\ Bar\\ Foo.class" , referenceSignatureByFirstParameter );
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments