Skip to content

Commit

Permalink
minor #13199 [Debug] split tests for deprecated interfaces (nicolas-g…
Browse files Browse the repository at this point in the history
…rekas)

This PR was merged into the 2.6 branch.

Discussion
----------

[Debug] split tests for deprecated interfaces

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Splitting tests for deprecated interfaces in "Legacy" prefixed test classes/methods should be done for every component.
Let's start by this simple one. To anyone: help welcomed for the other components.

Commits
-------

3a18cc6 [Debug] split tests for deprecated interfaces
  • Loading branch information
fabpot committed Jan 4, 2015
2 parents fb23abe + 3a18cc6 commit de14c14
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
Expand Up @@ -23,22 +23,6 @@
*/
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();
Expand Down Expand Up @@ -373,8 +357,10 @@ public function testHandleFatalError()
}
}

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()));
Expand Down

0 comments on commit de14c14

Please sign in to comment.