[PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code

This commit is contained in:
Thomas Calvet 2020-01-02 19:17:31 +01:00
parent db3134eba4
commit fb48bbc05b

View File

@ -37,7 +37,6 @@ class SymfonyTestsListenerTrait
private $gatheredDeprecations = array();
private $previousErrorHandler;
private $testsWithWarnings;
private $reportUselessTests;
private $error;
private $runsInSeparateProcess = false;
@ -198,10 +197,6 @@ class SymfonyTestsListenerTrait
public function startTest($test)
{
if (-2 < $this->state && ($test instanceof \PHPUnit\Framework\TestCase || $test instanceof TestCase)) {
if (null !== $test->getTestResultObject()) {
$this->reportUselessTests = $test->getTestResultObject()->isStrictAboutTestsThatDoNotTestAnything();
}
// This event is triggered before the test is re-run in isolation
if ($this->willBeIsolated($test)) {
$this->runsInSeparateProcess = tempnam(sys_get_temp_dir(), 'deprec');
@ -267,11 +262,6 @@ class SymfonyTestsListenerTrait
$classGroups = $Test::getGroups($className);
$groups = $Test::getGroups($className, $test->getName(false));
if (null !== $this->reportUselessTests) {
$test->getTestResultObject()->beStrictAboutTestsThatDoNotTestAnything($this->reportUselessTests);
$this->reportUselessTests = null;
}
if ($errored = null !== $this->error) {
$test->getTestResultObject()->addError($test, $this->error, 0);
$this->error = null;