Skip to content

Commit 5f2fcb7

Browse files
committed
Merge branch '2.6' into 2.7
* 2.6: [Debug] fix test [Debug] split tests for deprecated interfaces
2 parents 60a97ec + a054bed commit 5f2fcb7

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php

+5-17
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,6 @@
2323
*/
2424
class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
2525
{
26-
/**
27-
* @var int Error reporting level before running tests.
28-
*/
29-
protected $errorReporting;
30-
31-
public function setUp()
32-
{
33-
$this->errorReporting = error_reporting(E_ALL | E_STRICT);
34-
$this->iniSet('display_errors', '1');
35-
}
36-
37-
public function tearDown()
38-
{
39-
error_reporting($this->errorReporting);
40-
}
41-
4226
public function testRegister()
4327
{
4428
$handler = ErrorHandler::register();
@@ -185,6 +169,8 @@ public function testDefaultLogger()
185169

186170
public function testHandleError()
187171
{
172+
$this->iniSet('error_reporting', -1);
173+
188174
try {
189175
$handler = ErrorHandler::register();
190176
$handler->throwAt(0, true);
@@ -373,8 +359,10 @@ public function testHandleFatalError()
373359
}
374360
}
375361

376-
public function testDeprecatedInterface()
362+
public function testLegacyInterface()
377363
{
364+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
365+
378366
try {
379367
$handler = ErrorHandler::register(0);
380368
$this->assertFalse($handler->handle(0, 'foo', 'foo.php', 12, array()));

0 commit comments

Comments
 (0)