@@ -24,10 +24,10 @@ public function testJsFunctionsExtractor()
24
24
$ this ->assertSame (4 , $ function ->getLine ());
25
25
$ this ->assertSame (4 , $ function ->getLastLine ());
26
26
$ this ->assertSame ($ file , $ function ->getFilename ());
27
- // $this->assertCount(1, $function->getComments());
27
+ $ this ->assertCount (1 , $ function ->getComments ());
28
28
29
- // $comments = $function->getComments();
30
- // $this->assertSame('This comment is related with the first function', array_shift($comments));
29
+ $ comments = $ function ->getComments ();
30
+ $ this ->assertSame ('This comment is related with the first function ' , array_shift ($ comments ));
31
31
32
32
//fn2
33
33
$ function = array_shift ($ functions );
@@ -96,11 +96,11 @@ public function testJsFunctionsExtractor()
96
96
$ this ->assertSame (11 , $ function ->getLine ());
97
97
$ this ->assertSame (11 , $ function ->getLastLine ());
98
98
$ this ->assertSame ($ file , $ function ->getFilename ());
99
- // $this->assertCount(2, $function->getComments());
99
+ $ this ->assertCount (2 , $ function ->getComments ());
100
100
101
- // $comments = $function->getComments();
102
- // $this->assertSame('fn_8();', array_shift($comments));
103
- // $this->assertSame('ALLOW: This is a comment to fn9', array_shift($comments));
101
+ $ comments = $ function ->getComments ();
102
+ $ this ->assertSame ('fn_8(); ' , array_shift ($ comments ));
103
+ $ this ->assertSame ('ALLOW: This is a comment to fn9 ' , array_shift ($ comments ));
104
104
105
105
//fn10
106
106
$ function = array_shift ($ functions );
@@ -110,24 +110,24 @@ public function testJsFunctionsExtractor()
110
110
$ this ->assertSame (13 , $ function ->getLine ());
111
111
$ this ->assertSame (13 , $ function ->getLastLine ());
112
112
$ this ->assertSame ($ file , $ function ->getFilename ());
113
- // $this->assertCount(1, $function->getComments());
113
+ $ this ->assertCount (1 , $ function ->getComments ());
114
114
115
- // $comments = $function->getComments();
116
- // $this->assertSame('Comment to fn10', array_shift($comments));
115
+ $ comments = $ function ->getComments ();
116
+ $ this ->assertSame ('Comment to fn10 ' , array_shift ($ comments ));
117
117
118
118
//fn11
119
119
$ function = array_shift ($ functions );
120
120
$ this ->assertSame ('fn11 ' , $ function ->getName ());
121
- $ this ->assertSame (2 , $ function ->countArguments ());
122
- $ this ->assertSame ([null , 'arg10 ' ], $ function ->getArguments ());
121
+ $ this ->assertSame (3 , $ function ->countArguments ());
122
+ $ this ->assertSame ([' arg9 ' , 'arg10 ' , null ], $ function ->getArguments ());
123
123
$ this ->assertSame (16 , $ function ->getLine ());
124
124
$ this ->assertSame (16 , $ function ->getLastLine ());
125
125
$ this ->assertSame ($ file , $ function ->getFilename ());
126
- // $this->assertCount(2, $function->getComments());
126
+ $ this ->assertCount (2 , $ function ->getComments ());
127
127
128
- // $comments = $function->getComments();
129
- // $this->assertSame('Related comment 1', array_shift($comments));
130
- // $this->assertSame('ALLOW: Related comment 2', array_shift($comments));
128
+ $ comments = $ function ->getComments ();
129
+ $ this ->assertSame ('Related comment 1 ' , array_shift ($ comments ));
130
+ $ this ->assertSame ('ALLOW: Related comment 2 ' , array_shift ($ comments ));
131
131
132
132
//fn12
133
133
$ function = array_shift ($ functions );
@@ -137,12 +137,12 @@ public function testJsFunctionsExtractor()
137
137
$ this ->assertSame (22 , $ function ->getLine ());
138
138
$ this ->assertSame (28 , $ function ->getLastLine ());
139
139
$ this ->assertSame ($ file , $ function ->getFilename ());
140
- // $this->assertCount(3, $function->getComments());
140
+ $ this ->assertCount (3 , $ function ->getComments ());
141
141
142
- // $comments = $function->getComments();
143
- // $this->assertSame("Related comment\nnumber one", array_shift($comments));
144
- // $this->assertSame('Related comment 2', array_shift($comments));
145
- // $this->assertSame('ALLOW: Related comment 3', array_shift($comments));
142
+ $ comments = $ function ->getComments ();
143
+ $ this ->assertSame ("Related comment \nnumber one " , array_shift ($ comments ));
144
+ $ this ->assertSame ('Related comment 2 ' , array_shift ($ comments ));
145
+ $ this ->assertSame ('ALLOW: Related comment 3 ' , array_shift ($ comments ));
146
146
147
147
//fn13
148
148
$ function = array_shift ($ functions );
0 commit comments