[Yaml] always restore the error handler in tests

The error handler must be restored even when assertions failed.
This commit is contained in:
Christian Flothmann 2016-02-15 19:17:14 +01:00
parent d6418d4b36
commit 7631202155

View File

@ -896,10 +896,10 @@ EOF;
$this->parser->parse($yaml);
restore_error_handler();
$this->assertCount(1, $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]);
restore_error_handler();
}
public function testColonInMappingValueExceptionNotTriggeredByColonInComment()