| @@ 167-181 (lines=15) @@ | ||
| 164 | $this->assertContains('foo', $symbols); |
|
| 165 | } |
|
| 166 | ||
| 167 | public function testFunctionParameterType() |
|
| 168 | { |
|
| 169 | $functionName = new Name('foo'); |
|
| 170 | $node = new Function_($functionName); |
|
| 171 | $node->name = $functionName; |
|
| 172 | $param = new Param('bar'); |
|
| 173 | $param->type = new Name('Baz'); |
|
| 174 | $node->params = [$param]; |
|
| 175 | ||
| 176 | $this->visitor->enterNode($node); |
|
| 177 | ||
| 178 | $symbols = $this->visitor->getCollectedSymbols(); |
|
| 179 | $this->assertCount(1, $symbols); |
|
| 180 | $this->assertContains('Baz', $symbols); |
|
| 181 | } |
|
| 182 | ||
| 183 | public function testFunctionParameterTypeAsString() |
|
| 184 | { |
|
| @@ 183-197 (lines=15) @@ | ||
| 180 | $this->assertContains('Baz', $symbols); |
|
| 181 | } |
|
| 182 | ||
| 183 | public function testFunctionParameterTypeAsString() |
|
| 184 | { |
|
| 185 | $functionName = new Name('foo'); |
|
| 186 | $node = new Function_($functionName); |
|
| 187 | $node->name = $functionName; |
|
| 188 | $param = new Param('bar'); |
|
| 189 | $param->type = 'Baz'; |
|
| 190 | $node->params = [$param]; |
|
| 191 | ||
| 192 | $this->visitor->enterNode($node); |
|
| 193 | ||
| 194 | $symbols = $this->visitor->getCollectedSymbols(); |
|
| 195 | $this->assertCount(1, $symbols); |
|
| 196 | $this->assertContains('Baz', $symbols); |
|
| 197 | } |
|
| 198 | ||
| 199 | public function testMethodParameterType() |
|
| 200 | { |
|
| @@ 199-213 (lines=15) @@ | ||
| 196 | $this->assertContains('Baz', $symbols); |
|
| 197 | } |
|
| 198 | ||
| 199 | public function testMethodParameterType() |
|
| 200 | { |
|
| 201 | $functionName = new Name('foo'); |
|
| 202 | $node = new ClassMethod($functionName); |
|
| 203 | $node->name = $functionName; |
|
| 204 | $param = new Param('bar'); |
|
| 205 | $param->type = new Name('Baz'); |
|
| 206 | $node->params = [$param]; |
|
| 207 | ||
| 208 | $this->visitor->enterNode($node); |
|
| 209 | ||
| 210 | $symbols = $this->visitor->getCollectedSymbols(); |
|
| 211 | $this->assertCount(1, $symbols); |
|
| 212 | $this->assertContains('Baz', $symbols); |
|
| 213 | } |
|
| 214 | ||
| 215 | public function testMethodParameterTypeAsString() |
|
| 216 | { |
|
| @@ 215-229 (lines=15) @@ | ||
| 212 | $this->assertContains('Baz', $symbols); |
|
| 213 | } |
|
| 214 | ||
| 215 | public function testMethodParameterTypeAsString() |
|
| 216 | { |
|
| 217 | $functionName = new Name('foo'); |
|
| 218 | $node = new ClassMethod($functionName); |
|
| 219 | $node->name = $functionName; |
|
| 220 | $param = new Param('bar'); |
|
| 221 | $param->type = 'Baz'; |
|
| 222 | $node->params = [$param]; |
|
| 223 | ||
| 224 | $this->visitor->enterNode($node); |
|
| 225 | ||
| 226 | $symbols = $this->visitor->getCollectedSymbols(); |
|
| 227 | $this->assertCount(1, $symbols); |
|
| 228 | $this->assertContains('Baz', $symbols); |
|
| 229 | } |
|
| 230 | ||
| 231 | public function testFunctionReturnType() |
|
| 232 | { |
|