|
@@ 191-199 (lines=9) @@
|
| 188 |
|
* @param string $fileName Optional file name for the source file. |
| 189 |
|
* @return PHP_Depend_Code_Function |
| 190 |
|
*/ |
| 191 |
|
protected function getPHPDependFunctionMock($fileName = '/foo/bar.php') |
| 192 |
|
{ |
| 193 |
|
$function = $this->getMock(ASTFunction::class, array(), array(null)); |
| 194 |
|
$function->expects($this->atLeastOnce()) |
| 195 |
|
->method('getCompilationUnit') |
| 196 |
|
->willReturn($this->getPHPDependFileMock($fileName)); |
| 197 |
|
|
| 198 |
|
return $function; |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
/** |
| 202 |
|
* Creates a mocked PHP_Depend method instance. |
|
@@ 207-215 (lines=9) @@
|
| 204 |
|
* @param string $fileName Optional file name for the source file. |
| 205 |
|
* @return PHP_Depend_Code_CodeMethod |
| 206 |
|
*/ |
| 207 |
|
protected function getPHPDependMethodMock($fileName = '/foo/bar.php') |
| 208 |
|
{ |
| 209 |
|
$method = $this->getMock(ASTMethod::class, array(), array(null)); |
| 210 |
|
$method->expects($this->atLeastOnce()) |
| 211 |
|
->method('getCompilationUnit') |
| 212 |
|
->willReturn($this->getPHPDependFileMock($fileName)); |
| 213 |
|
|
| 214 |
|
return $method; |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
/** |
| 218 |
|
* Creates a mocked PHP_Depend file instance. |