@@ 331-338 (lines=8) @@ | ||
328 | * @param mixed $value |
|
329 | * @return \PHPMD\Node\MethodNode |
|
330 | */ |
|
331 | protected function getMethodMock($metric = null, $value = null) |
|
332 | { |
|
333 | return $this->initFunctionOrMethod( |
|
334 | $this->getMock(MethodNode::class, array(), array(null), '', false), |
|
335 | $metric, |
|
336 | $value |
|
337 | ); |
|
338 | } |
|
339 | ||
340 | /** |
|
341 | * Creates a mocked function node instance. |
|
@@ 347-354 (lines=8) @@ | ||
344 | * @param mixed $value The expected metric return value. |
|
345 | * @return \PHPMD\Node\FunctionNode |
|
346 | */ |
|
347 | protected function createFunctionMock($metric = null, $value = null) |
|
348 | { |
|
349 | return $this->initFunctionOrMethod( |
|
350 | $this->getMock(FunctionNode::class, array(), array(null), '', false), |
|
351 | $metric, |
|
352 | $value |
|
353 | ); |
|
354 | } |
|
355 | ||
356 | /** |
|
357 | * Initializes the getMetric() method of the given function or method node. |