Skip to content

Commit

Permalink
[PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyweb committed Jan 14, 2020
1 parent db3134e commit fb48bbc
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
Expand Up @@ -37,7 +37,6 @@ class SymfonyTestsListenerTrait
private $gatheredDeprecations = array();
private $previousErrorHandler;
private $testsWithWarnings;
private $reportUselessTests;
private $error;
private $runsInSeparateProcess = false;

Expand Down Expand Up @@ -198,10 +197,6 @@ public function addSkippedTest($test, \Exception $e, $time)
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');
Expand Down Expand Up @@ -267,11 +262,6 @@ public function endTest($test, $time)
$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;
Expand Down

0 comments on commit fb48bbc

Please sign in to comment.