PhpParser\ErrorTest::testNoColumnInfo PHP Method

testNoColumnInfo() public method

public testNoColumnInfo ( )
    public function testNoColumnInfo()
    {
        $error = new Error('Some error', 3);
        $this->assertSame(false, $error->hasColumnInfo());
        try {
            $error->getStartColumn('');
            $this->fail('Expected RuntimeException');
        } catch (\RuntimeException $e) {
            $this->assertSame('Error does not have column information', $e->getMessage());
        }
        try {
            $error->getEndColumn('');
            $this->fail('Expected RuntimeException');
        } catch (\RuntimeException $e) {
            $this->assertSame('Error does not have column information', $e->getMessage());
        }
    }