Skip to content

Commit f1c4a3c

Browse files
committed
minor #39775 [WIP] Use ::class keyword when possible (fabpot)
This PR was merged into the 4.4 branch. Discussion ---------- [WIP] Use ::class keyword when possible | Q | A | ------------- | --- | Branch? | 4.4 <!-- see below --> | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | n/a Commits ------- 036a36cb14 Use ::class keyword when possible
2 parents 9bbbc93 + 471d834 commit f1c4a3c

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)