public function testExtractRangeIndentsMethodCallForFirstLineWithExtraIndent()
 {
     $lines = array('            echo "Something";');
     $this->buffer->expects($this->once())->method('getLines')->will($this->returnValue($lines));
     $action = new ReplaceWithMethodCall(LineRange::fromLines(1, 2), new MethodSignature('testMethod'));
     $this->assertGeneratedMethodCallMatches('$this->testMethod();', $action, 12);
 }
 /**
  * From a range within a method, find the start and end range of that method.
  *
  * @param File $file
  * @param LineRange $range
  *
  * @return LineRange
  */
 public function findMethodRange(File $file, LineRange $range)
 {
     $methodStartLine = $this->getMethodStartLine($file, $range);
     $methodEndLine = $this->getMethodEndLine($file, $range);
     return LineRange::fromLines($methodStartLine, $methodEndLine);
 }