You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tests/ParserTest.php
+6-18Lines changed: 6 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@
11
11
12
12
namespaceSymfony\Component\Yaml\Tests;
13
13
14
+
useSymfony\Bridge\PhpUnit\ErrorAssert;
14
15
useSymfony\Component\Yaml\Yaml;
15
16
useSymfony\Component\Yaml\Parser;
16
17
@@ -930,27 +931,14 @@ public function testFloatKeys()
930
931
*/
931
932
publicfunctiontestColonInMappingValueException()
932
933
{
933
-
$yaml = <<<EOF
934
+
$parser = $this->parser;
935
+
936
+
ErrorAssert::assertDeprecationsAreTriggered('Using a colon in the unquoted mapping value "bar: baz" in line 1 is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.', function () use ($parser) {
937
+
$yaml = <<<EOF
934
938
foo: bar: baz
935
939
EOF;
936
-
937
-
$deprecations = array();
938
-
set_error_handler(function ($type, $msg) use (&$deprecations) {
$this->assertContains('Using a colon in the unquoted mapping value "bar: baz" in line 1 is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.', $deprecations[0]);
0 commit comments