Skip to content

Commit 34c922c

Browse files
Merge branch '2.8' into 3.2
* 2.8: Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 Further refactorings to PHPUnit namespaces resolve parameters in definition classes
2 parents 3083165 + 707f112 commit 34c922c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/ParserTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,10 +1380,12 @@ public function testParseDateAsMappingValue()
13801380
*/
13811381
public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yaml)
13821382
{
1383-
$this->setExpectedException(
1384-
'\Symfony\Component\Yaml\Exception\ParseException',
1385-
sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber)
1386-
);
1383+
if (method_exists($this, 'expectException')) {
1384+
$this->expectException('\Symfony\Component\Yaml\Exception\ParseException');
1385+
$this->expectExceptionMessage(sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber));
1386+
} else {
1387+
$this->setExpectedException('\Symfony\Component\Yaml\Exception\ParseException', sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber));
1388+
}
13871389

13881390
$this->parser->parse($yaml);
13891391
}

0 commit comments

Comments
 (0)