Skip to content

Commit 396784c

Browse files
[2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
1 parent e754073 commit 396784c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Tests/ParserTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Yaml\Tests;
1313

14-
use Symfony\Bridge\PhpUnit\ErrorAssert;
1514
use Symfony\Component\Yaml\Yaml;
1615
use Symfony\Component\Yaml\Parser;
1716

@@ -927,19 +926,16 @@ public function testFloatKeys()
927926

928927
/**
929928
* @group legacy
929+
* @expectedDeprecation 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.
930930
* throw ParseException in Symfony 3.0
931-
* @requires function Symfony\Bridge\PhpUnit\ErrorAssert::assertDeprecationsAreTriggered
932931
*/
933932
public function testColonInMappingValueException()
934933
{
935-
$parser = $this->parser;
936-
937-
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) {
938-
$yaml = <<<EOF
934+
$yaml = <<<EOF
939935
foo: bar: baz
940936
EOF;
941-
$parser->parse($yaml);
942-
});
937+
938+
$this->parser->parse($yaml);
943939
}
944940

945941
public function testColonInMappingValueExceptionNotTriggeredByColonInComment()

0 commit comments

Comments
 (0)