[Yaml] always restore the error handler in tests
The error handler must be restored even when assertions failed.
This commit is contained in:
parent
d6418d4b36
commit
7631202155
@ -896,10 +896,10 @@ EOF;
|
|||||||
|
|
||||||
$this->parser->parse($yaml);
|
$this->parser->parse($yaml);
|
||||||
|
|
||||||
|
restore_error_handler();
|
||||||
|
|
||||||
$this->assertCount(1, $deprecations);
|
$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]);
|
$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()
|
public function testColonInMappingValueExceptionNotTriggeredByColonInComment()
|
||||||
|
Reference in New Issue
Block a user