mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-27 04:24:43 +01:00
Remove Error::(get|set)RawLine()
These have been superseded by Error::(get|set)StartLine().
This commit is contained in:
parent
f3c7dc9d89
commit
9e5d3bbe25
@ -153,14 +153,4 @@ class Error extends \RuntimeException
|
||||
$this->message .= ' on line ' . $this->getStartLine();
|
||||
}
|
||||
}
|
||||
|
||||
/** @deprecated Use getStartLine() instead */
|
||||
public function getRawLine() {
|
||||
return $this->getStartLine();
|
||||
}
|
||||
|
||||
/** @deprecated Use setStartLine() instead */
|
||||
public function setRawLine($line) {
|
||||
$this->setStartLine($line);
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ class ErrorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($attributes, $error->getAttributes());
|
||||
$this->assertSame(10, $error->getStartLine());
|
||||
$this->assertSame(11, $error->getEndLine());
|
||||
$this->assertSame(10, $error->getRawLine());
|
||||
$this->assertSame('Some error on line 10', $error->getMessage());
|
||||
|
||||
return $error;
|
||||
@ -31,10 +30,6 @@ class ErrorTest extends \PHPUnit_Framework_TestCase
|
||||
$error->setStartLine(15);
|
||||
$this->assertSame(15, $error->getStartLine());
|
||||
$this->assertSame('Some other error on line 15', $error->getMessage());
|
||||
|
||||
$error->setRawLine(17);
|
||||
$this->assertSame(17, $error->getRawLine());
|
||||
$this->assertSame('Some other error on line 17', $error->getMessage());
|
||||
}
|
||||
|
||||
public function testUnknownLine() {
|
||||
@ -42,7 +37,6 @@ class ErrorTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertSame(-1, $error->getStartLine());
|
||||
$this->assertSame(-1, $error->getEndLine());
|
||||
$this->assertSame(-1, $error->getRawLine());
|
||||
$this->assertSame('Some error on unknown line', $error->getMessage());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user