Lines Matching refs:error
11 $error = new Error('Some error', $attributes);
13 $this->assertSame('Some error', $error->getRawMessage());
14 $this->assertSame($attributes, $error->getAttributes());
15 $this->assertSame(10, $error->getStartLine());
16 $this->assertSame(11, $error->getEndLine());
17 $this->assertSame('Some error on line 10', $error->getMessage());
19 return $error;
25 public function testSetMessageAndLine(Error $error): void { argument
26 $error->setRawMessage('Some other error');
27 $this->assertSame('Some other error', $error->getRawMessage());
29 $error->setStartLine(15);
30 $this->assertSame(15, $error->getStartLine());
31 $this->assertSame('Some other error on line 15', $error->getMessage());
35 $error = new Error('Some error');
37 $this->assertSame(-1, $error->getStartLine());
38 $this->assertSame(-1, $error->getEndLine());
39 $this->assertSame('Some error on unknown line', $error->getMessage());
44 $error = new Error('Some error', [
49 $this->assertTrue($error->hasColumnInfo());
50 $this->assertSame($startColumn, $error->getStartColumn($code));
51 $this->assertSame($endColumn, $error->getEndColumn($code));
76 $error = new Error('Some error', ['startLine' => 3]);
78 $this->assertFalse($error->hasColumnInfo());
80 $error->getStartColumn('');
86 $error->getEndColumn('');
96 $error = new Error('Some error', [
100 $error->getStartColumn('code');