[Debug] split tests for deprecated interfaces

This commit is contained in:
Nicolas Grekas 2015-01-02 10:46:26 +01:00
parent 363e5b41a5
commit 3a18cc623a

View File

@ -23,22 +23,6 @@ use Symfony\Component\Debug\Exception\ContextErrorException;
*/
class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
{
/**
* @var int Error reporting level before running tests.
*/
protected $errorReporting;
public function setUp()
{
$this->errorReporting = error_reporting(E_ALL | E_STRICT);
$this->iniSet('display_errors', '1');
}
public function tearDown()
{
error_reporting($this->errorReporting);
}
public function testRegister()
{
$handler = ErrorHandler::register();
@ -373,8 +357,10 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
}
}
public function testDeprecatedInterface()
public function testLegacyInterface()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
try {
$handler = ErrorHandler::register(0);
$this->assertFalse($handler->handle(0, 'foo', 'foo.php', 12, array()));