Skip to content

Commit 86219ff

Browse files
committed
fix risky tests
1 parent 1c1117c commit 86219ff

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

Tests/InlineTest.php

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,42 @@ public function testParseUnquotedAsteriskFollowedByAComment()
193193

194194
/**
195195
* @group legacy
196-
* @dataProvider getReservedIndicators
196+
* @expectedDeprecation Not quoting the scalar "@foo " starting with "@" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
197197
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
198198
*/
199-
public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
199+
public function testParseUnquotedScalarStartingWithReservedAtIndicator()
200200
{
201-
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
201+
Inline::parse('{ foo: @foo }');
202202
}
203203

204-
public function getReservedIndicators()
204+
/**
205+
* @group legacy
206+
* @expectedDeprecation Not quoting the scalar "`foo " starting with "`" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
207+
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
208+
*/
209+
public function testParseUnquotedScalarStartingWithReservedBacktickIndicator()
210+
{
211+
Inline::parse('{ foo: `foo }');
212+
}
213+
214+
/**
215+
* @group legacy
216+
* @expectedDeprecation Not quoting the scalar "|foo " starting with "|" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
217+
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
218+
*/
219+
public function testParseUnquotedScalarStartingWithLiteralStyleIndicator()
205220
{
206-
return array(array('@'), array('`'));
221+
Inline::parse('{ foo: |foo }');
207222
}
208223

209224
/**
210225
* @group legacy
211-
* @dataProvider getScalarIndicators
226+
* @expectedDeprecation Not quoting the scalar ">foo " starting with ">" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
212227
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
213228
*/
214-
public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
229+
public function testParseUnquotedScalarStartingWithFoldedStyleIndicator()
215230
{
216-
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
231+
Inline::parse('{ foo: >foo }');
217232
}
218233

219234
public function getScalarIndicators()

0 commit comments

Comments
 (0)