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)
341341 try {
342342 $ parsedLine = Inline::parse ($ line , $ flags , $ this ->refs );
343343
344- if (!is_string ($ value )) {
344+ if (!is_string ($ parsedLine )) {
345345 $ parseError = true ;
346346 break ;
347347 }
Original file line number Diff line number Diff line change @@ -1687,6 +1687,21 @@ public function testComplexMappingNestedInSequenceThrowsParseException()
16871687 $ this ->parser ->parse ($ yaml );
16881688 }
16891689
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+
16901705 private function loadTestsFromFixtureFiles ($ testsFile )
16911706 {
16921707 $ parser = new Parser ();
You can’t perform that action at this time.
0 commit comments