7
7
8
8
class MethodTest extends TestCase
9
9
{
10
- public function testGetFunctionName () {
10
+ public function testGetFunctionName ()
11
+ {
11
12
$ docPage = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/pcre/functions/preg-match.xml ' );
12
13
$ xmlObject = $ docPage ->getMethodSynopsis ();
13
14
$ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader ());
14
15
$ name = $ method ->getFunctionName ();
15
16
$ this ->assertEquals ('preg_match ' , $ name );
16
17
}
17
18
18
- public function testGetFunctionType () {
19
+ public function testGetFunctionType ()
20
+ {
19
21
$ docPage = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/pcre/functions/preg-match.xml ' );
20
22
$ xmlObject = $ docPage ->getMethodSynopsis ();
21
23
$ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader ());
22
24
$ type = $ method ->getReturnType ();
23
25
$ this ->assertEquals ('int ' , $ type );
24
26
}
25
27
26
- public function testGetFunctionParam () {
28
+ public function testGetFunctionParam ()
29
+ {
27
30
$ docPage = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/pcre/functions/preg-match.xml ' );
28
31
$ xmlObject = $ docPage ->getMethodSynopsis ();
29
32
$ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader ());
@@ -32,13 +35,13 @@ public function testGetFunctionParam() {
32
35
$ this ->assertEquals ('pattern ' , $ params [0 ]->getParameter ());
33
36
}
34
37
35
- public function testGetInitializer () {
38
+ public function testGetInitializer ()
39
+ {
36
40
$ docPage = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/apc/functions/apc-cache-info.xml ' );
37
41
$ xmlObject = $ docPage ->getMethodSynopsis ();
38
42
$ method = new Method ($ xmlObject [0 ], $ docPage ->loadAndResolveFile (), $ docPage ->getModule (), new PhpStanFunctionMapReader ());
39
43
40
44
$ params = $ method ->getParams ();
41
45
$ this ->assertEquals ('' , $ params [0 ]->getDefaultValue ());
42
46
}
43
-
44
47
}
0 commit comments