Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9bd9978

Browse files
committed
minor #17812 [Yaml] always restore the error handler in tests (xabbuh)
This PR was merged into the 2.8 branch. Discussion ---------- [Yaml] always restore the error handler in tests | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17809 (comment) | License | MIT | Doc PR | The error handler must be restored even when assertions failed. Commits ------- 7631202 [Yaml] always restore the error handler in tests
2 parents fc2fa79 + 7631202 commit 9bd9978

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Yaml/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)