Skip to content

Commit 4e6f495

Browse files
Merge branch '2.8' into 3.0
* 2.8: update tests to use the new error assertion helper [ci] Upgrade to symfony/phpunit-bridge >=3.2@dev Conflicts: src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php src/Symfony/Component/Yaml/Tests/ParserTest.php
2 parents 18bba0c + 95a2e68 commit 4e6f495

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Tests/ParserTest.php

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

1212
namespace Symfony\Component\Yaml\Tests;
1313

14+
use Symfony\Bridge\PhpUnit\ErrorAssert;
1415
use Symfony\Component\Yaml\Yaml;
1516
use Symfony\Component\Yaml\Parser;
1617

@@ -930,11 +931,14 @@ public function testFloatKeys()
930931
*/
931932
public function testColonInMappingValueException()
932933
{
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
934938
foo: bar: baz
935939
EOF;
936-
937-
$this->parser->parse($yaml);
940+
$parser->parse($yaml);
941+
});
938942
}
939943

940944
public function testColonInMappingValueExceptionNotTriggeredByColonInComment()

0 commit comments

Comments
 (0)