Skip to content

Commit f3217c3

Browse files
committed
minor #21903 [Yaml] Fix the tests (GuilhemN)
This PR was merged into the 2.7 branch. Discussion ---------- [Yaml] Fix the tests | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Fix tests that are currently useless (previously part of #19782). Commits ------- 5107b94 [Yaml] Fix the tests
2 parents 44dc67d + 5107b94 commit f3217c3

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

src/Symfony/Component/Yaml/Tests/DumperTest.php

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -210,23 +210,25 @@ public function testEscapedEscapeSequencesInQuotedScalar($input, $expected)
210210
public function getEscapeSequences()
211211
{
212212
return array(
213-
'null' => array("\t\\0", '"\t\\\\0"'),
214-
'bell' => array("\t\\a", '"\t\\\\a"'),
215-
'backspace' => array("\t\\b", '"\t\\\\b"'),
216-
'horizontal-tab' => array("\t\\t", '"\t\\\\t"'),
217-
'line-feed' => array("\t\\n", '"\t\\\\n"'),
218-
'vertical-tab' => array("\t\\v", '"\t\\\\v"'),
219-
'form-feed' => array("\t\\f", '"\t\\\\f"'),
220-
'carriage-return' => array("\t\\r", '"\t\\\\r"'),
221-
'escape' => array("\t\\e", '"\t\\\\e"'),
222-
'space' => array("\t\\ ", '"\t\\\\ "'),
223-
'double-quote' => array("\t\\\"", '"\t\\\\\\""'),
224-
'slash' => array("\t\\/", '"\t\\\\/"'),
225-
'backslash' => array("\t\\\\", '"\t\\\\\\\\"'),
226-
'next-line' => array("\t\\N", '"\t\\\\N"'),
227-
'non-breaking-space' => array("\t\\", '"\t\\\\�"'),
228-
'line-separator' => array("\t\\L", '"\t\\\\L"'),
229-
'paragraph-separator' => array("\t\\P", '"\t\\\\P"'),
213+
'empty string' => array('', "''"),
214+
'null' => array("\x0", '"\\0"'),
215+
'bell' => array("\x7", '"\\a"'),
216+
'backspace' => array("\x8", '"\\b"'),
217+
'horizontal-tab' => array("\t", '"\\t"'),
218+
'line-feed' => array("\n", '"\\n"'),
219+
'vertical-tab' => array("\v", '"\\v"'),
220+
'form-feed' => array("\xC", '"\\f"'),
221+
'carriage-return' => array("\r", '"\\r"'),
222+
'escape' => array("\x1B", '"\\e"'),
223+
'space' => array(' ', "' '"),
224+
'double-quote' => array('"', "'\"'"),
225+
'slash' => array('/', '/'),
226+
'backslash' => array('\\', '\\'),
227+
'next-line' => array("\xC2\x85", '"\\N"'),
228+
'non-breaking-space' => array("\xc2\xa0", '"\\_"'),
229+
'line-separator' => array("\xE2\x80\xA8", '"\\L"'),
230+
'paragraph-separator' => array("\xE2\x80\xA9", '"\\P"'),
231+
'colon' => array(':', "':'"),
230232
);
231233
}
232234

0 commit comments

Comments
 (0)