Merge branch '3.4' into 4.0
* 3.4: [Bridge/PhpUnit] hotfix
This commit is contained in:
commit
f75730df46
@ -29,7 +29,7 @@ class SymfonyTestsListenerForV6 extends BaseTestListener
|
||||
|
||||
public function __construct(array $mockedNamespaces = array())
|
||||
{
|
||||
$this->trait = new Legacy\SymfonyTestsListenerTrait($mockedNamespaces);
|
||||
$this->trait = new SymfonyTestsListenerTrait($mockedNamespaces);
|
||||
}
|
||||
|
||||
public function globalListenerDisabled()
|
||||
|
@ -23,7 +23,7 @@ class TestRunner extends \PHPUnit_TextUI_TestRunner
|
||||
*/
|
||||
protected function handleConfiguration(array &$arguments)
|
||||
{
|
||||
$listener = new SymfonyTestsListener();
|
||||
$listener = new SymfonyTestsListenerForV5();
|
||||
|
||||
$result = parent::handleConfiguration($arguments);
|
||||
|
||||
@ -32,7 +32,7 @@ class TestRunner extends \PHPUnit_TextUI_TestRunner
|
||||
$registeredLocally = false;
|
||||
|
||||
foreach ($arguments['listeners'] as $registeredListener) {
|
||||
if ($registeredListener instanceof SymfonyTestsListener) {
|
||||
if ($registeredListener instanceof SymfonyTestsListenerForV5) {
|
||||
$registeredListener->globalListenerDisabled();
|
||||
$registeredLocally = true;
|
||||
break;
|
||||
|
@ -15,17 +15,14 @@ use PHPUnit\TextUI\Command as BaseCommand;
|
||||
|
||||
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
|
||||
class_alias('Symfony\Bridge\PhpUnit\Legacy\Command', 'Symfony\Bridge\PhpUnit\TextUI\Command');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
} else {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class Command extends BaseCommand
|
||||
{
|
||||
class Command extends BaseCommand
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -33,4 +30,5 @@ class Command extends BaseCommand
|
||||
{
|
||||
return new TestRunner($this->arguments['loader']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,17 +16,14 @@ use Symfony\Bridge\PhpUnit\SymfonyTestsListener;
|
||||
|
||||
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
|
||||
class_alias('Symfony\Bridge\PhpUnit\Legacy\TestRunner', 'Symfony\Bridge\PhpUnit\TextUI\TestRunner');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
} else {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class TestRunner extends BaseRunner
|
||||
{
|
||||
class TestRunner extends BaseRunner
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -54,4 +51,5 @@ class TestRunner extends BaseRunner
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user