@@ -24,10 +24,10 @@ public function testJsFunctionsExtractor()
2424 $ this ->assertSame (4 , $ function ->getLine ());
2525 $ this ->assertSame (4 , $ function ->getLastLine ());
2626 $ this ->assertSame ($ file , $ function ->getFilename ());
27- // $this->assertCount(1, $function->getComments());
27+ $ this ->assertCount (1 , $ function ->getComments ());
2828
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 ));
3131
3232 //fn2
3333 $ function = array_shift ($ functions );
@@ -96,11 +96,11 @@ public function testJsFunctionsExtractor()
9696 $ this ->assertSame (11 , $ function ->getLine ());
9797 $ this ->assertSame (11 , $ function ->getLastLine ());
9898 $ this ->assertSame ($ file , $ function ->getFilename ());
99- // $this->assertCount(2, $function->getComments());
99+ $ this ->assertCount (2 , $ function ->getComments ());
100100
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 ));
104104
105105 //fn10
106106 $ function = array_shift ($ functions );
@@ -110,24 +110,24 @@ public function testJsFunctionsExtractor()
110110 $ this ->assertSame (13 , $ function ->getLine ());
111111 $ this ->assertSame (13 , $ function ->getLastLine ());
112112 $ this ->assertSame ($ file , $ function ->getFilename ());
113- // $this->assertCount(1, $function->getComments());
113+ $ this ->assertCount (1 , $ function ->getComments ());
114114
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 ));
117117
118118 //fn11
119119 $ function = array_shift ($ functions );
120120 $ 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 ());
123123 $ this ->assertSame (16 , $ function ->getLine ());
124124 $ this ->assertSame (16 , $ function ->getLastLine ());
125125 $ this ->assertSame ($ file , $ function ->getFilename ());
126- // $this->assertCount(2, $function->getComments());
126+ $ this ->assertCount (2 , $ function ->getComments ());
127127
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 ));
131131
132132 //fn12
133133 $ function = array_shift ($ functions );
@@ -137,12 +137,12 @@ public function testJsFunctionsExtractor()
137137 $ this ->assertSame (22 , $ function ->getLine ());
138138 $ this ->assertSame (28 , $ function ->getLastLine ());
139139 $ this ->assertSame ($ file , $ function ->getFilename ());
140- // $this->assertCount(3, $function->getComments());
140+ $ this ->assertCount (3 , $ function ->getComments ());
141141
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 ));
146146
147147 //fn13
148148 $ function = array_shift ($ functions );
0 commit comments