File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/Symfony/Component/Yaml Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ public function parse($value, $flags = 0)
341
341
try {
342
342
$ parsedLine = Inline::parse ($ line , $ flags , $ this ->refs );
343
343
344
- if (!is_string ($ value )) {
344
+ if (!is_string ($ parsedLine )) {
345
345
$ parseError = true ;
346
346
break ;
347
347
}
Original file line number Diff line number Diff line change @@ -1687,6 +1687,21 @@ public function testComplexMappingNestedInSequenceThrowsParseException()
1687
1687
$ this ->parser ->parse ($ yaml );
1688
1688
}
1689
1689
1690
+ /**
1691
+ * @expectedException \Symfony\Component\Yaml\Exception\ParseException
1692
+ * @expectedExceptionMessage Unable to parse at line 1 (near "[parameters]").
1693
+ */
1694
+ public function testParsingIniThrowsException ()
1695
+ {
1696
+ $ ini = <<<INI
1697
+ [parameters]
1698
+ foo = bar
1699
+ bar = %foo%
1700
+ INI ;
1701
+
1702
+ $ this ->parser ->parse ($ ini );
1703
+ }
1704
+
1690
1705
private function loadTestsFromFixtureFiles ($ testsFile )
1691
1706
{
1692
1707
$ parser = new Parser ();
You can’t perform that action at this time.
0 commit comments