[Form] [FrameworkBundle] catch deprecation errors in tests
This commit is contained in:
parent
c21b12e896
commit
ebcb432f07
|
@ -68,6 +68,8 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
|
|||
protected function tearDown()
|
||||
{
|
||||
$this->engine = null;
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
protected function renderEnctype(FormView $view)
|
||||
|
|
|
@ -69,6 +69,8 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
|
|||
protected function tearDown()
|
||||
{
|
||||
$this->engine = null;
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
protected function renderEnctype(FormView $view)
|
||||
|
|
|
@ -45,6 +45,8 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
|
|||
{
|
||||
$this->csrfProvider = null;
|
||||
$this->factory = null;
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
protected function assertXpathNodeValue(\DomElement $element, $expression, $nodeValue)
|
||||
|
|
|
@ -33,14 +33,6 @@ abstract class TypeTestCase extends FormIntegrationTestCase
|
|||
|
||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||
$this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory);
|
||||
|
||||
set_error_handler(array('Symfony\Component\Form\Tests\DeprecationErrorHandler', 'handle'));
|
||||
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
restore_error_handler();
|
||||
}
|
||||
|
||||
public static function assertDateTimeEquals(\DateTime $expected, \DateTime $actual)
|
||||
|
|
|
@ -32,6 +32,13 @@ abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase
|
|||
$this->factory = Forms::createFormFactoryBuilder()
|
||||
->addExtensions($this->getExtensions())
|
||||
->getFormFactory();
|
||||
|
||||
set_error_handler(array('Symfony\Component\Form\Tests\DeprecationErrorHandler', 'handle'));
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
restore_error_handler();
|
||||
}
|
||||
|
||||
protected function getExtensions()
|
||||
|
|
Reference in New Issue