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())
|
public function __construct(array $mockedNamespaces = array())
|
||||||
{
|
{
|
||||||
$this->trait = new Legacy\SymfonyTestsListenerTrait($mockedNamespaces);
|
$this->trait = new SymfonyTestsListenerTrait($mockedNamespaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function globalListenerDisabled()
|
public function globalListenerDisabled()
|
||||||
|
@ -23,7 +23,7 @@ class TestRunner extends \PHPUnit_TextUI_TestRunner
|
|||||||
*/
|
*/
|
||||||
protected function handleConfiguration(array &$arguments)
|
protected function handleConfiguration(array &$arguments)
|
||||||
{
|
{
|
||||||
$listener = new SymfonyTestsListener();
|
$listener = new SymfonyTestsListenerForV5();
|
||||||
|
|
||||||
$result = parent::handleConfiguration($arguments);
|
$result = parent::handleConfiguration($arguments);
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class TestRunner extends \PHPUnit_TextUI_TestRunner
|
|||||||
$registeredLocally = false;
|
$registeredLocally = false;
|
||||||
|
|
||||||
foreach ($arguments['listeners'] as $registeredListener) {
|
foreach ($arguments['listeners'] as $registeredListener) {
|
||||||
if ($registeredListener instanceof SymfonyTestsListener) {
|
if ($registeredListener instanceof SymfonyTestsListenerForV5) {
|
||||||
$registeredListener->globalListenerDisabled();
|
$registeredListener->globalListenerDisabled();
|
||||||
$registeredLocally = true;
|
$registeredLocally = true;
|
||||||
break;
|
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', '<')) {
|
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');
|
class_alias('Symfony\Bridge\PhpUnit\Legacy\Command', 'Symfony\Bridge\PhpUnit\TextUI\Command');
|
||||||
|
} else {
|
||||||
return;
|
/**
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
class Command extends BaseCommand
|
class Command extends BaseCommand
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@ -33,4 +30,5 @@ class Command extends BaseCommand
|
|||||||
{
|
{
|
||||||
return new TestRunner($this->arguments['loader']);
|
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', '<')) {
|
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');
|
class_alias('Symfony\Bridge\PhpUnit\Legacy\TestRunner', 'Symfony\Bridge\PhpUnit\TextUI\TestRunner');
|
||||||
|
} else {
|
||||||
return;
|
/**
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
class TestRunner extends BaseRunner
|
class TestRunner extends BaseRunner
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@ -54,4 +51,5 @@ class TestRunner extends BaseRunner
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user