@@ -25,6 +25,8 @@ public function testGetFunctionType(): void
25
25
$ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader (), ErrorType::FALSY );
26
26
$ type = $ method ->getSignatureReturnType ();
27
27
$ this ->assertEquals ('int ' , $ type );
28
+ $ errorType = $ method ->getErrorType ();
29
+ $ this ->assertEquals (ErrorType::FALSY , $ errorType );
28
30
}
29
31
30
32
public function testGetFunctionParam (): void
@@ -117,6 +119,27 @@ public function testGetReturnDocBlock(): void
117
119
$ this ->assertEquals ('?bool ' , $ method ->getSignatureReturnType ());
118
120
}
119
121
122
+ public function testGetPhpDoc (): void
123
+ {
124
+ $ docPage = new DocPage (DocPage::findReferenceDir () . '/array/functions/array-replace.xml ' );
125
+ $ xmlObject = $ docPage ->getMethodSynopsis ();
126
+ $ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader (), ErrorType::NULLSY );
127
+ $ this ->assertStringContainsString ('@param array $array ' , $ method ->getPhpDoc ());
128
+ }
129
+
130
+ public function testIsOverloaded (): void
131
+ {
132
+ $ docPage = new DocPage (DocPage::findReferenceDir () . '/array/functions/array-all.xml ' );
133
+ $ xmlObject = $ docPage ->getMethodSynopsis ();
134
+ $ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader (), ErrorType::NULLSY );
135
+ $ this ->assertFalse ($ method ->isOverloaded ());
136
+
137
+ $ docPage = new DocPage (DocPage::findReferenceDir () . '/filesystem/functions/file-get-contents.xml ' );
138
+ $ xmlObject = $ docPage ->getMethodSynopsis ();
139
+ $ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader (), ErrorType::NULLSY );
140
+ $ this ->assertTrue ($ method ->isOverloaded ());
141
+ }
142
+
120
143
public function testOpensslCipherKeyLengthUnionTypeReturnDocBlocks (): void
121
144
{
122
145
$ docPage = new DocPage (DocPage::findReferenceDir () . '/openssl/functions/openssl-cipher-key-length.xml ' );
0 commit comments