minor #35188 [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack (fancyweb)

This PR was merged into the 4.3 branch.

Discussion
----------

[PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

As far as I can see, it is unused since 4.0.

Commits
-------

50ba566c0b [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
This commit is contained in:
Nicolas Grekas 2020-01-04 12:19:20 +01:00
commit db874f6cd8
4 changed files with 0 additions and 24 deletions

View File

@ -47,11 +47,6 @@ class SymfonyTestsListenerForV5 extends \PHPUnit_Framework_BaseTestListener
$this->trait->startTest($test);
}
public function addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, $time)
{
$this->trait->addWarning($test, $e, $time);
}
public function endTest(\PHPUnit_Framework_Test $test, $time)
{
$this->trait->endTest($test, $time);

View File

@ -52,11 +52,6 @@ class SymfonyTestsListenerForV6 extends BaseTestListener
$this->trait->startTest($test);
}
public function addWarning(Test $test, Warning $e, $time)
{
$this->trait->addWarning($test, $e, $time);
}
public function endTest(Test $test, $time)
{
$this->trait->endTest($test, $time);

View File

@ -55,11 +55,6 @@ class SymfonyTestsListenerForV7 implements TestListener
$this->trait->startTest($test);
}
public function addWarning(Test $test, Warning $e, float $time): void
{
$this->trait->addWarning($test, $e, $time);
}
public function endTest(Test $test, float $time): void
{
$this->trait->endTest($test, $time);

View File

@ -37,7 +37,6 @@ class SymfonyTestsListenerTrait
private $expectedDeprecations = array();
private $gatheredDeprecations = array();
private $previousErrorHandler;
private $testsWithWarnings;
private $reportUselessTests;
private $error;
private $runsInSeparateProcess = false;
@ -114,7 +113,6 @@ class SymfonyTestsListenerTrait
$Test = 'PHPUnit\Util\Test';
}
$suiteName = $suite->getName();
$this->testsWithWarnings = array();
foreach ($suite->tests() as $test) {
if (!($test instanceof \PHPUnit\Framework\TestCase || $test instanceof TestCase)) {
@ -245,13 +243,6 @@ class SymfonyTestsListenerTrait
}
}
public function addWarning($test, $e, $time)
{
if ($test instanceof \PHPUnit\Framework\TestCase || $test instanceof TestCase) {
$this->testsWithWarnings[$test->getName()] = true;
}
}
public function endTest($test, $time)
{
if (class_exists('PHPUnit_Util_Blacklist', false)) {