Skip to content

Commit 471d834

Browse files
committed
Use ::class keyword when possible
1 parent 8e9fcae commit 471d834

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/ParserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testTabsInYaml()
6868

6969
$this->fail('YAML files must not contain tabs');
7070
} catch (\Exception $e) {
71-
$this->assertInstanceOf('\Exception', $e, 'YAML files must not contain tabs');
71+
$this->assertInstanceOf(\Exception::class, $e, 'YAML files must not contain tabs');
7272
$this->assertEquals('A YAML file cannot contain tabs as indentation at line 2 (near "'.strpbrk($yaml, "\t").'").', $e->getMessage(), 'YAML files must not contain tabs');
7373
}
7474
}
@@ -1415,7 +1415,7 @@ public function testParseDateAsMappingValue()
14151415
*/
14161416
public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yaml)
14171417
{
1418-
$this->expectException('\Symfony\Component\Yaml\Exception\ParseException');
1418+
$this->expectException(ParseException::class);
14191419
$this->expectExceptionMessage(sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber));
14201420

14211421
$this->parser->parse($yaml);

0 commit comments

Comments
 (0)