@@ -277,24 +277,39 @@ public function testParseUnquotedAsteriskFollowedByAComment()
277
277
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
278
278
* @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar.
279
279
*/
280
- public function testParseUnquotedScalarStartingWithReservedIndicator ( $ indicator )
280
+ public function testParseUnquotedScalarStartingWithReservedAtIndicator ( )
281
281
{
282
- Inline::parse (sprintf ( '{ foo: %sfoo } ' , $ indicator ) );
282
+ Inline::parse ('{ foo: @foo } ' );
283
283
}
284
284
285
- public function getReservedIndicators ()
285
+ /**
286
+ * @group legacy
287
+ * @expectedDeprecation Not quoting the scalar "`foo " starting with "`" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
288
+ * throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
289
+ */
290
+ public function testParseUnquotedScalarStartingWithReservedBacktickIndicator ()
291
+ {
292
+ Inline::parse ('{ foo: `foo } ' );
293
+ }
294
+
295
+ /**
296
+ * @group legacy
297
+ * @expectedDeprecation Not quoting the scalar "|foo " starting with "|" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
298
+ * throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
299
+ */
300
+ public function testParseUnquotedScalarStartingWithLiteralStyleIndicator ()
286
301
{
287
- return array ( array ( ' @ ' ), array ( ' ` ' ) );
302
+ Inline:: parse ( ' { foo: |foo } ' );
288
303
}
289
304
290
305
/**
291
306
* @dataProvider getScalarIndicators
292
307
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
293
308
* @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar.
294
309
*/
295
- public function testParseUnquotedScalarStartingWithScalarIndicator ( $ indicator )
310
+ public function testParseUnquotedScalarStartingWithFoldedStyleIndicator ( )
296
311
{
297
- Inline::parse (sprintf ( '{ foo: %sfoo } ' , $ indicator ) );
312
+ Inline::parse ('{ foo: >foo } ' );
298
313
}
299
314
300
315
public function getScalarIndicators ()
0 commit comments