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:
commit
db874f6cd8
@ -47,11 +47,6 @@ class SymfonyTestsListenerForV5 extends \PHPUnit_Framework_BaseTestListener
|
|||||||
$this->trait->startTest($test);
|
$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)
|
public function endTest(\PHPUnit_Framework_Test $test, $time)
|
||||||
{
|
{
|
||||||
$this->trait->endTest($test, $time);
|
$this->trait->endTest($test, $time);
|
||||||
|
@ -52,11 +52,6 @@ class SymfonyTestsListenerForV6 extends BaseTestListener
|
|||||||
$this->trait->startTest($test);
|
$this->trait->startTest($test);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addWarning(Test $test, Warning $e, $time)
|
|
||||||
{
|
|
||||||
$this->trait->addWarning($test, $e, $time);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function endTest(Test $test, $time)
|
public function endTest(Test $test, $time)
|
||||||
{
|
{
|
||||||
$this->trait->endTest($test, $time);
|
$this->trait->endTest($test, $time);
|
||||||
|
@ -55,11 +55,6 @@ class SymfonyTestsListenerForV7 implements TestListener
|
|||||||
$this->trait->startTest($test);
|
$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
|
public function endTest(Test $test, float $time): void
|
||||||
{
|
{
|
||||||
$this->trait->endTest($test, $time);
|
$this->trait->endTest($test, $time);
|
||||||
|
@ -37,7 +37,6 @@ class SymfonyTestsListenerTrait
|
|||||||
private $expectedDeprecations = array();
|
private $expectedDeprecations = array();
|
||||||
private $gatheredDeprecations = array();
|
private $gatheredDeprecations = array();
|
||||||
private $previousErrorHandler;
|
private $previousErrorHandler;
|
||||||
private $testsWithWarnings;
|
|
||||||
private $reportUselessTests;
|
private $reportUselessTests;
|
||||||
private $error;
|
private $error;
|
||||||
private $runsInSeparateProcess = false;
|
private $runsInSeparateProcess = false;
|
||||||
@ -114,7 +113,6 @@ class SymfonyTestsListenerTrait
|
|||||||
$Test = 'PHPUnit\Util\Test';
|
$Test = 'PHPUnit\Util\Test';
|
||||||
}
|
}
|
||||||
$suiteName = $suite->getName();
|
$suiteName = $suite->getName();
|
||||||
$this->testsWithWarnings = array();
|
|
||||||
|
|
||||||
foreach ($suite->tests() as $test) {
|
foreach ($suite->tests() as $test) {
|
||||||
if (!($test instanceof \PHPUnit\Framework\TestCase || $test instanceof TestCase)) {
|
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)
|
public function endTest($test, $time)
|
||||||
{
|
{
|
||||||
if (class_exists('PHPUnit_Util_Blacklist', false)) {
|
if (class_exists('PHPUnit_Util_Blacklist', false)) {
|
||||||
|
Reference in New Issue
Block a user