[PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code
This commit is contained in:
parent
db3134eba4
commit
fb48bbc05b
@ -37,7 +37,6 @@ class SymfonyTestsListenerTrait
|
|||||||
private $gatheredDeprecations = array();
|
private $gatheredDeprecations = array();
|
||||||
private $previousErrorHandler;
|
private $previousErrorHandler;
|
||||||
private $testsWithWarnings;
|
private $testsWithWarnings;
|
||||||
private $reportUselessTests;
|
|
||||||
private $error;
|
private $error;
|
||||||
private $runsInSeparateProcess = false;
|
private $runsInSeparateProcess = false;
|
||||||
|
|
||||||
@ -198,10 +197,6 @@ class SymfonyTestsListenerTrait
|
|||||||
public function startTest($test)
|
public function startTest($test)
|
||||||
{
|
{
|
||||||
if (-2 < $this->state && ($test instanceof \PHPUnit\Framework\TestCase || $test instanceof TestCase)) {
|
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
|
// This event is triggered before the test is re-run in isolation
|
||||||
if ($this->willBeIsolated($test)) {
|
if ($this->willBeIsolated($test)) {
|
||||||
$this->runsInSeparateProcess = tempnam(sys_get_temp_dir(), 'deprec');
|
$this->runsInSeparateProcess = tempnam(sys_get_temp_dir(), 'deprec');
|
||||||
@ -267,11 +262,6 @@ class SymfonyTestsListenerTrait
|
|||||||
$classGroups = $Test::getGroups($className);
|
$classGroups = $Test::getGroups($className);
|
||||||
$groups = $Test::getGroups($className, $test->getName(false));
|
$groups = $Test::getGroups($className, $test->getName(false));
|
||||||
|
|
||||||
if (null !== $this->reportUselessTests) {
|
|
||||||
$test->getTestResultObject()->beStrictAboutTestsThatDoNotTestAnything($this->reportUselessTests);
|
|
||||||
$this->reportUselessTests = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($errored = null !== $this->error) {
|
if ($errored = null !== $this->error) {
|
||||||
$test->getTestResultObject()->addError($test, $this->error, 0);
|
$test->getTestResultObject()->addError($test, $this->error, 0);
|
||||||
$this->error = null;
|
$this->error = null;
|
||||||
|
Reference in New Issue
Block a user