Skip to content

Commit 20668c7

Browse files
committed
[Yaml] always restore the error handler in tests
The error handler must be restored even when assertions failed.
1 parent 871f18d commit 20668c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/ParserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,10 +896,10 @@ public function testColonInMappingValueException()
896896

897897
$this->parser->parse($yaml);
898898

899+
restore_error_handler();
900+
899901
$this->assertCount(1, $deprecations);
900902
$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]);
901-
902-
restore_error_handler();
903903
}
904904

905905
public function testColonInMappingValueExceptionNotTriggeredByColonInComment()

0 commit comments

Comments
 (0)